diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/version-management/sourcehut/hg.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/version-management/sourcehut/hg.nix | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/applications/version-management/sourcehut/hg.nix b/nixpkgs/pkgs/applications/version-management/sourcehut/hg.nix index 6bc266232902..b4219b0a8396 100644 --- a/nixpkgs/pkgs/applications/version-management/sourcehut/hg.nix +++ b/nixpkgs/pkgs/applications/version-management/sourcehut/hg.nix @@ -13,9 +13,10 @@ , setuptools }: -buildPythonPackage rec { - pname = "hgsrht"; +let version = "0.32.4"; + gqlgen = import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion = "0.17.20"; }; + pyproject = true; disabled = pythonOlder "3.7"; @@ -24,24 +25,16 @@ buildPythonPackage rec { owner = "~sircmpwn"; repo = "hg.sr.ht"; rev = version; - sha256 = "mYkA44c9wy/Iy1h1lXkVpc9gN7rQXFm4T3YBlQ1Dj60="; + hash = "sha256-mYkA44c9wy/Iy1h1lXkVpc9gN7rQXFm4T3YBlQ1Dj60="; vc = "hg"; }; - postPatch = '' - substituteInPlace Makefile \ - --replace "all: api hgsrht-keys" "" - - substituteInPlace hgsrht-shell \ - --replace /var/log/hgsrht-shell /var/log/sourcehut/hgsrht-shell - ''; - hgsrht-api = buildGoModule ({ inherit src version; pname = "hgsrht-api"; modRoot = "api"; vendorHash = "sha256-vuOYpnF3WjA6kOe9MVSuVMhJBQqCmIex+QUBJrP+VDs="; - } // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); + } // gqlgen); hgsrht-keys = buildGoModule { inherit src version; @@ -54,6 +47,18 @@ buildPythonPackage rec { --replace /var/log/hgsrht-keys /var/log/sourcehut/hgsrht-keys ''; }; +in +buildPythonPackage rec { + inherit src version; + pname = "hgsrht"; + + postPatch = '' + substituteInPlace Makefile \ + --replace "all: api hgsrht-keys" "" + + substituteInPlace hgsrht-shell \ + --replace /var/log/hgsrht-shell /var/log/sourcehut/hgsrht-shell + ''; nativeBuildInputs = [ pip @@ -83,6 +88,6 @@ buildPythonPackage rec { homepage = "https://git.sr.ht/~sircmpwn/hg.sr.ht"; description = "Mercurial repository hosting service for the sr.ht network"; license = licenses.agpl3Only; - maintainers = with maintainers; [ eadwu ]; + maintainers = with maintainers; [ eadwu christoph-heiss ]; }; } |