diff options
author | Christoph Heiss <christoph@c8h4.io> | 2024-02-07 11:46:43 +0100 |
---|---|---|
committer | Christoph Heiss <christoph@c8h4.io> | 2024-02-07 14:58:11 +0100 |
commit | 93d24be6c77ee707b99bc199e9daeafb3e168e4c (patch) | |
tree | 704c1ad4ee6e110edfb3c52d22432d3ea3bdf855 /pkgs/applications/version-management | |
parent | 3f35705fae430ee2aed28c31d1838e0f71a41122 (diff) | |
download | nixlib-93d24be6c77ee707b99bc199e9daeafb3e168e4c.tar nixlib-93d24be6c77ee707b99bc199e9daeafb3e168e4c.tar.gz nixlib-93d24be6c77ee707b99bc199e9daeafb3e168e4c.tar.bz2 nixlib-93d24be6c77ee707b99bc199e9daeafb3e168e4c.tar.lz nixlib-93d24be6c77ee707b99bc199e9daeafb3e168e4c.tar.xz nixlib-93d24be6c77ee707b99bc199e9daeafb3e168e4c.tar.zst nixlib-93d24be6c77ee707b99bc199e9daeafb3e168e4c.zip |
sourcehut.hgsrht: refactor to align with other sourcehut packages
This provides the same common structure as all other sourcehut packages, thus opening the possibility to even further simplify this in the future. Signed-off-by: Christoph Heiss <christoph@c8h4.io>
Diffstat (limited to 'pkgs/applications/version-management')
-rw-r--r-- | pkgs/applications/version-management/sourcehut/hg.nix | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/pkgs/applications/version-management/sourcehut/hg.nix b/pkgs/applications/version-management/sourcehut/hg.nix index ec660981eeb5..fafbb032636f 100644 --- a/pkgs/applications/version-management/sourcehut/hg.nix +++ b/pkgs/applications/version-management/sourcehut/hg.nix @@ -13,8 +13,7 @@ , setuptools }: -buildPythonPackage rec { - pname = "hgsrht"; +let version = "0.32.4"; gqlgen = import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion = "0.17.20"; }; @@ -26,18 +25,10 @@ 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"; @@ -56,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 |