summary refs log tree commit diff
path: root/pkgs/applications/version-management/sourcehut/todo.nix
diff options
context:
space:
mode:
authorJulien Moutinho <julm+nixpkgs@sourcephile.fr>2022-05-06 00:09:09 +0200
committertomberek <tomberek@users.noreply.github.com>2022-06-08 19:46:04 -0400
commit876f3a8bf0eebc5c6cb50c5fecf420f6cb3f2836 (patch)
tree0b1e1d91e63b0530eb101c8c14c3cfbcb8783e9f /pkgs/applications/version-management/sourcehut/todo.nix
parent1722530759bedeb82f7470cbfb09328fd22783f3 (diff)
downloadnixpkgs-876f3a8bf0eebc5c6cb50c5fecf420f6cb3f2836.tar
nixpkgs-876f3a8bf0eebc5c6cb50c5fecf420f6cb3f2836.tar.gz
nixpkgs-876f3a8bf0eebc5c6cb50c5fecf420f6cb3f2836.tar.bz2
nixpkgs-876f3a8bf0eebc5c6cb50c5fecf420f6cb3f2836.tar.lz
nixpkgs-876f3a8bf0eebc5c6cb50c5fecf420f6cb3f2836.tar.xz
nixpkgs-876f3a8bf0eebc5c6cb50c5fecf420f6cb3f2836.tar.zst
nixpkgs-876f3a8bf0eebc5c6cb50c5fecf420f6cb3f2836.zip
sourcehut.todosrht: 0.67.2 -> 0.71.0
Diffstat (limited to 'pkgs/applications/version-management/sourcehut/todo.nix')
-rw-r--r--pkgs/applications/version-management/sourcehut/todo.nix22
1 files changed, 20 insertions, 2 deletions
diff --git a/pkgs/applications/version-management/sourcehut/todo.nix b/pkgs/applications/version-management/sourcehut/todo.nix
index 1446e68fa69..4611c63dd0b 100644
--- a/pkgs/applications/version-management/sourcehut/todo.nix
+++ b/pkgs/applications/version-management/sourcehut/todo.nix
@@ -1,5 +1,6 @@
 { lib
 , fetchFromSourcehut
+, buildGoModule
 , buildPythonPackage
 , srht
 , redis
@@ -8,23 +9,36 @@
 , pytest
 , factory_boy
 , python
+, unzip
 }:
 
 buildPythonPackage rec {
   pname = "todosrht";
-  version = "0.67.2";
+  version = "0.71.0";
 
   src = fetchFromSourcehut {
     owner = "~sircmpwn";
     repo = "todo.sr.ht";
     rev = version;
-    sha256 = "sha256-/QHsMlhzyah85ubZyx8j4GDUoITuWcLDJKosbZGeOZU=";
+    sha256 = "sha256-IIZKN006UIrdcxF+LYkUtc97QoCnWqzX8036vMctWHY=";
   };
 
   patches = [
     # Revert change breaking Unix socket support for Redis
     patches/redis-socket/todo/0001-Revert-Add-webhook-queue-monitoring.patch
   ];
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace "all: api" ""
+  '';
+
+
+  todosrht-api = buildGoModule ({
+    inherit src version;
+    pname = "todosrht-api";
+    modRoot = "api";
+    vendorSha256 = "sha256-ttGT7lUh8O+9KvbaEGWUsthefXQ2ATeli0tnlXCjZFk=";
+  } // import ./fix-gqlgen-trimpath.nix {inherit unzip;});
 
   nativeBuildInputs = srht.nativeBuildInputs;
 
@@ -40,6 +54,10 @@ buildPythonPackage rec {
     export SRHT_PATH=${srht}/${python.sitePackages}/srht
   '';
 
+  postInstall = ''
+    ln -s ${todosrht-api}/bin/api $out/bin/todosrht-api
+  '';
+
   # pytest tests fail
   checkInputs = [
     pytest