about summary refs log tree commit diff
path: root/pkgs/applications/version-management/sourcehut/lists.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/version-management/sourcehut/lists.nix')
-rw-r--r--pkgs/applications/version-management/sourcehut/lists.nix21
1 files changed, 19 insertions, 2 deletions
diff --git a/pkgs/applications/version-management/sourcehut/lists.nix b/pkgs/applications/version-management/sourcehut/lists.nix
index 3ba6375a91380..d264553112156 100644
--- a/pkgs/applications/version-management/sourcehut/lists.nix
+++ b/pkgs/applications/version-management/sourcehut/lists.nix
@@ -1,5 +1,6 @@
 { lib
 , fetchFromSourcehut
+, buildGoModule
 , buildPythonPackage
 , srht
 , asyncpg
@@ -8,23 +9,35 @@
 , emailthreads
 , redis
 , python
+, unzip
 }:
 
 buildPythonPackage rec {
   pname = "listssrht";
-  version = "0.51.7";
+  version = "0.51.9";
 
   src = fetchFromSourcehut {
     owner = "~sircmpwn";
     repo = "lists.sr.ht";
     rev = version;
-    sha256 = "sha256-oNY5A98oVoL2JKO0fU/8YVl8u7ywmHb/RHD8A6z9yIM=";
+    sha256 = "sha256-6iyt0XXAHvyp4bA+VW9uA9YP9wq2Rf/WYVZxylSRf7k=";
   };
 
+  listssrht-api = buildGoModule ({
+    inherit src version;
+    pname = "listssrht-api";
+    modRoot = "api";
+    vendorSha256 = "sha256-xnmMkRSokbhWD+kz0XQ9AinYdm6/50FRBISURPvlzD0=";
+  } // import ./fix-gqlgen-trimpath.nix {inherit unzip;});
+
   patches = [
     # Revert change breaking Unix socket support for Redis
     patches/redis-socket/lists/0001-Revert-Add-webhook-queue-monitoring.patch
   ];
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace "all: api" ""
+  '';
 
   nativeBuildInputs = srht.nativeBuildInputs;
 
@@ -42,6 +55,10 @@ buildPythonPackage rec {
     export SRHT_PATH=${srht}/${python.sitePackages}/srht
   '';
 
+  postInstall = ''
+    ln -s ${listssrht-api}/bin/api $out/bin/listssrht-api
+  '';
+
   pythonImportsCheck = [ "listssrht" ];
 
   meta = with lib; {