summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristoph Heiss <christoph@c8h4.io>2023-03-21 23:49:14 +0100
committerChristoph Heiss <christoph@c8h4.io>2023-11-11 13:01:32 +0100
commit30054093c9f080b8dcb6022b384824ff1dbebc61 (patch)
tree91485e7c8df070227fe250ebdcd6084d67947509
parentb0fb4dc3a9bd487e0543e77fdc595472e1137ef4 (diff)
downloadnixpkgs-30054093c9f080b8dcb6022b384824ff1dbebc61.tar
nixpkgs-30054093c9f080b8dcb6022b384824ff1dbebc61.tar.gz
nixpkgs-30054093c9f080b8dcb6022b384824ff1dbebc61.tar.bz2
nixpkgs-30054093c9f080b8dcb6022b384824ff1dbebc61.tar.lz
nixpkgs-30054093c9f080b8dcb6022b384824ff1dbebc61.tar.xz
nixpkgs-30054093c9f080b8dcb6022b384824ff1dbebc61.tar.zst
nixpkgs-30054093c9f080b8dcb6022b384824ff1dbebc61.zip
sourcehut.mansrht: 0.15.26 -> 0.16.1
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
-rw-r--r--pkgs/applications/version-management/sourcehut/man.nix21
1 files changed, 19 insertions, 2 deletions
diff --git a/pkgs/applications/version-management/sourcehut/man.nix b/pkgs/applications/version-management/sourcehut/man.nix
index dadc508edd8..e88f7338ee3 100644
--- a/pkgs/applications/version-management/sourcehut/man.nix
+++ b/pkgs/applications/version-management/sourcehut/man.nix
@@ -1,22 +1,35 @@
 { lib
 , fetchFromSourcehut
+, buildGoModule
 , buildPythonPackage
 , srht
 , pygit2
 , python
+, unzip
 }:
 
 buildPythonPackage rec {
   pname = "mansrht";
-  version = "0.15.26";
+  version = "0.16.1";
 
   src = fetchFromSourcehut {
     owner = "~sircmpwn";
     repo = "man.sr.ht";
     rev = version;
-    sha256 = "sha256-5xZH6DrTXMdWd26OGICp7lZ/QDjACIa7zNUJHB7jzGo=";
+    sha256 = "sha256-94G9/Kzt1gaQ2CaXtsJYCB6W5OTdn27XhVdpNJ9a5cE=";
   };
 
+  postPatch = ''
+    substituteInPlace Makefile --replace "all: api" ""
+  '';
+
+  mansrht-api = buildGoModule ({
+    inherit src version;
+    pname = "mansrht-api";
+    modRoot = "api";
+    vendorHash = "sha256-K5EmZ4U+xItTR85+SCwhwg5KUGLkKHo9Nr2pkvmJpfo=";
+  } // import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion = "0.17.20"; });
+
   propagatedBuildInputs = [
     srht
     pygit2
@@ -27,6 +40,10 @@ buildPythonPackage rec {
     export SRHT_PATH=${srht}/${python.sitePackages}/srht
   '';
 
+  postInstall = ''
+    ln -s ${mansrht-api}/bin/api $out/bin/mansrht-api
+  '';
+
   pythonImportsCheck = [ "mansrht" ];
 
   meta = with lib; {