summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaito Bezarius <masterancpp@gmail.com>2023-06-04 14:08:41 +0200
committerRaito Bezarius <masterancpp@gmail.com>2024-02-11 21:58:51 +0100
commite57d5580acc75aaca8fc255515b552dc76c8e081 (patch)
tree688e5395837f5b03a69f3be6c8fd6b053e215321
parentMerge pull request #287898 from trofi/sptk-gcc-13-fix (diff)
downloadnixpkgs-origin/gitpw.tar.gz
git-pw: init at 2.6.0origin/gitpw
https://github.com/getpatchwork/git-pw
-rw-r--r--pkgs/by-name/gi/git-pw/package.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/by-name/gi/git-pw/package.nix b/pkgs/by-name/gi/git-pw/package.nix
new file mode 100644
index 000000000000..6dbcc369e370
--- /dev/null
+++ b/pkgs/by-name/gi/git-pw/package.nix
@@ -0,0 +1,59 @@
+{ lib
+, git
+, python3
+, fetchFromGitHub
+, testers
+, git-pw
+}:
+
+python3.pkgs.buildPythonApplication rec {
+ pname = "git-pw";
+ version = "2.6.0";
+ format = "pyproject";
+
+ PBR_VERSION = version;
+
+ src = fetchFromGitHub {
+ owner = "getpatchwork";
+ repo = "git-pw";
+ rev = version;
+ hash = "sha256-3IiFU6qGI2MDTBOLQ2qyT5keUMNTNG3sxhtGR3bkIBc=";
+ };
+
+ postPatch = ''
+ # We don't want to run the coverage.
+ substituteInPlace tox.ini --replace "--cov=git_pw --cov-report" ""
+ '';
+
+ nativeBuildInputs = with python3.pkgs; [
+ pbr
+ setuptools
+ ];
+
+ propagatedBuildInputs = with python3.pkgs; [
+ pyyaml
+ arrow
+ click
+ requests
+ tabulate
+ ];
+
+ nativeCheckInputs = with python3.pkgs; [
+ pytest
+ git
+ ];
+
+ # This is needed because `git-pw` always rely on an ambiant git.
+ # Furthermore, this doesn't really make sense to resholve git inside this derivation.
+ # As `testVersion` does not offer the right knob, we can just `overrideAttrs`-it ourselves.
+ passthru.tests.version = (testers.testVersion { package = git-pw; }).overrideAttrs (old: {
+ buildInputs = (old.buildInputs or [ ]) ++ [ git ];
+ });
+
+ meta = with lib; {
+ description = "A tool for integrating Git with Patchwork, the web-based patch tracking system";
+ homepage = "https://github.com/getpatchwork/git-pw";
+ license = licenses.mit;
+ maintainers = with maintainers; [ raitobezarius ];
+ };
+}