about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorChristoph Heiss <christoph@c8h4.io>2024-02-07 10:10:08 +0100
committerChristoph Heiss <christoph@c8h4.io>2024-02-07 14:47:16 +0100
commitc36acb6afe9dce6df10dc4181c394c798bef7206 (patch)
tree340ae266ff0df1df01c7fbeb289ff00b7de4dab2 /pkgs/applications
parent50fa834713a0e59b2572984bf1357ebfbf4aeedd (diff)
downloadnixlib-c36acb6afe9dce6df10dc4181c394c798bef7206.tar
nixlib-c36acb6afe9dce6df10dc4181c394c798bef7206.tar.gz
nixlib-c36acb6afe9dce6df10dc4181c394c798bef7206.tar.bz2
nixlib-c36acb6afe9dce6df10dc4181c394c798bef7206.tar.lz
nixlib-c36acb6afe9dce6df10dc4181c394c798bef7206.tar.xz
nixlib-c36acb6afe9dce6df10dc4181c394c798bef7206.tar.zst
nixlib-c36acb6afe9dce6df10dc4181c394c798bef7206.zip
sourcehut.hubsrht: 0.17.2 -> 0.17.5
Also refactor it to 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')
-rw-r--r--pkgs/applications/version-management/sourcehut/hub.nix30
1 files changed, 17 insertions, 13 deletions
diff --git a/pkgs/applications/version-management/sourcehut/hub.nix b/pkgs/applications/version-management/sourcehut/hub.nix
index bc7d243a7c0a..eddfa9e9c559 100644
--- a/pkgs/applications/version-management/sourcehut/hub.nix
+++ b/pkgs/applications/version-management/sourcehut/hub.nix
@@ -11,30 +11,34 @@
 , unzip
 }:
 
-buildPythonPackage rec {
-  pname = "hubsrht";
-  version = "0.17.2";
-  pyproject = true;
-
-  disabled = pythonOlder "3.7";
+let
+  version = "0.17.5";
+  gqlgen = import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion = "0.17.41"; };
 
   src = fetchFromSourcehut {
     owner = "~sircmpwn";
     repo = "hub.sr.ht";
     rev = version;
-    sha256 = "sha256-A+lvRsPz5EBnM0gB4PJuxSMpELZTrK14ORxDbTKPXWg=";
+    hash = "sha256-GbBxK3XE+Y6Jiap0Nxa8vk4Kv6IbcdSi4NN59AeKwjA=";
   };
 
-  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; });
+    vendorHash = "sha256-wmuM0SxQbohTDaU8zmkw1TQTmqhOy1yAl1jRWk6TKL8=";
+  } // gqlgen);
+in
+buildPythonPackage rec {
+  inherit src version;
+  pname = "hubsrht";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
+  postPatch = ''
+    substituteInPlace Makefile --replace "all: api" ""
+  '';
 
   nativeBuildInputs = [
     pip