about summary refs log tree commit diff
path: root/pkgs/applications/version-management
diff options
context:
space:
mode:
authorChristoph Heiss <christoph@c8h4.io>2023-03-21 23:49:03 +0100
committerChristoph Heiss <christoph@c8h4.io>2023-11-11 13:01:31 +0100
commit1a7c5a811250ae1ba8bd5daab129100e80e0d6f3 (patch)
tree03930505bf08696a9ca296e7d046787ad5a988ea /pkgs/applications/version-management
parenta9730572cb3df0685d93a5d608fa19c04d4091f5 (diff)
downloadnixlib-1a7c5a811250ae1ba8bd5daab129100e80e0d6f3.tar
nixlib-1a7c5a811250ae1ba8bd5daab129100e80e0d6f3.tar.gz
nixlib-1a7c5a811250ae1ba8bd5daab129100e80e0d6f3.tar.bz2
nixlib-1a7c5a811250ae1ba8bd5daab129100e80e0d6f3.tar.lz
nixlib-1a7c5a811250ae1ba8bd5daab129100e80e0d6f3.tar.xz
nixlib-1a7c5a811250ae1ba8bd5daab129100e80e0d6f3.tar.zst
nixlib-1a7c5a811250ae1ba8bd5daab129100e80e0d6f3.zip
sourcehut.hubsrht: 0.14.14 -> 0.17.2
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
Diffstat (limited to 'pkgs/applications/version-management')
-rw-r--r--pkgs/applications/version-management/sourcehut/hub.nix24
1 files changed, 21 insertions, 3 deletions
diff --git a/pkgs/applications/version-management/sourcehut/hub.nix b/pkgs/applications/version-management/sourcehut/hub.nix
index c3a9c509f893..50fab20a3489 100644
--- a/pkgs/applications/version-management/sourcehut/hub.nix
+++ b/pkgs/applications/version-management/sourcehut/hub.nix
@@ -1,21 +1,35 @@
 { lib
 , fetchFromSourcehut
+, buildGoModule
 , buildPythonPackage
+, python
 , srht
 , pyyaml
+, unzip
 }:
 
 buildPythonPackage rec {
   pname = "hubsrht";
-  version = "0.14.14";
+  version = "0.17.2";
 
   src = fetchFromSourcehut {
     owner = "~sircmpwn";
     repo = "hub.sr.ht";
     rev = version;
-    sha256 = "sha256-4n6oQ+AAvdJY/5KflxAp62chjyrlSUkmt319DKZk33w=";
+    sha256 = "sha256-A+lvRsPz5EBnM0gB4PJuxSMpELZTrK14ORxDbTKPXWg=";
   };
 
+  postPatch = ''
+    substituteInPlace Makefile --replace "all: api" ""
+  '';
+
+  hubsrht-api = buildGoModule ({
+    inherit src version;
+    pname = "hubsrht-api";
+    modRoot = "api";
+    vendorHash = "sha256-K5EmZ4U+xItTR85+SCwhwg5KUGLkKHo9Nr2pkvmJpfo=";
+  } // import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion = "0.17.20"; });
+
   propagatedBuildInputs = [
     srht
     pyyaml
@@ -23,9 +37,13 @@ buildPythonPackage rec {
 
   preBuild = ''
     export PKGVER=${version}
+    export SRHT_PATH=${srht}/${python.sitePackages}/srht
+  '';
+
+  postInstall = ''
+    ln -s ${hubsrht-api}/bin/api $out/bin/hubsrht-api
   '';
 
-  dontUseSetuptoolsCheck = true;
   pythonImportsCheck = [ "hubsrht" ];
 
   meta = with lib; {