Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 56 lines 1.3 kB view raw
1{ 2 lib, 3 git, 4 python3, 5 fetchFromGitHub, 6 testers, 7 git-pw, 8}: 9 10python3.pkgs.buildPythonApplication rec { 11 pname = "git-pw"; 12 version = "2.7.1"; 13 format = "pyproject"; 14 15 PBR_VERSION = version; 16 17 src = fetchFromGitHub { 18 owner = "getpatchwork"; 19 repo = "git-pw"; 20 tag = version; 21 hash = "sha256-Ce+Nc2NZ42dIpeLg8OutD8ONxj1XRiNodGbTWlkK9qw="; 22 }; 23 24 nativeBuildInputs = with python3.pkgs; [ 25 pbr 26 setuptools 27 ]; 28 29 propagatedBuildInputs = with python3.pkgs; [ 30 pyyaml 31 arrow 32 click 33 requests 34 tabulate 35 ]; 36 37 nativeCheckInputs = with python3.pkgs; [ 38 pytest-cov-stub 39 pytestCheckHook 40 git 41 ]; 42 43 # This is needed because `git-pw` always rely on an ambient git. 44 # Furthermore, this doesn't really make sense to resholve git inside this derivation. 45 # As `testVersion` does not offer the right knob, we can just `overrideAttrs`-it ourselves. 46 passthru.tests.version = (testers.testVersion { package = git-pw; }).overrideAttrs (old: { 47 buildInputs = (old.buildInputs or [ ]) ++ [ git ]; 48 }); 49 50 meta = with lib; { 51 description = "Tool for integrating Git with Patchwork, the web-based patch tracking system"; 52 homepage = "https://github.com/getpatchwork/git-pw"; 53 license = licenses.mit; 54 maintainers = with maintainers; [ raitobezarius ]; 55 }; 56}