From b57ed0fa1de7c6a138e310c009f969dcda347f7c Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 00:03:52 +0200 Subject: sourcehut.gitsrht: 0.77.3 -> 0.78.18 --- .../version-management/sourcehut/git.nix | 54 +++++++++++++--------- 1 file changed, 33 insertions(+), 21 deletions(-) (limited to 'pkgs/applications/version-management/sourcehut/git.nix') diff --git a/pkgs/applications/version-management/sourcehut/git.nix b/pkgs/applications/version-management/sourcehut/git.nix index 318bee4cf5177..e56022604fa7d 100644 --- a/pkgs/applications/version-management/sourcehut/git.nix +++ b/pkgs/applications/version-management/sourcehut/git.nix @@ -1,47 +1,57 @@ { lib , fetchFromSourcehut -, buildPythonPackage , buildGoModule +, buildPythonPackage , python , srht , pygit2 , scmsrht +, unzip }: let - version = "0.77.3"; + version = "0.78.18"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "git.sr.ht"; rev = version; - sha256 = "sha256-eJvXCcmdiUzTK0EqNJkLEZsAfr6toD/378HObnMbOWM="; + sha256 = "sha256-pGWphdFKaOIBIKWMxfNAFqXZQx/qHcrwb5Ylj9uag7s="; }; - buildShell = src: buildGoModule { + gitApi = buildGoModule ({ inherit src version; - pname = "gitsrht-shell"; - vendorSha256 = "sha256-aqUFICp0C2reqb2p6JCPAUIRsxzSv0t9BHoNWrTYfqk="; - }; + pname = "gitsrht-api"; + modRoot = "api"; + vendorSha256 = "sha256-0YI20liP0X1McfiSUy29zJk2UqqAPBIfIfPLoJOE1uI="; + } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); - buildDispatcher = src: buildGoModule { + gitDispatch = buildGoModule { inherit src version; - pname = "gitsrht-dispatcher"; + pname = "gitsrht-dispatch"; + modRoot = "gitsrht-dispatch"; vendorSha256 = "sha256-qWXPHo86s6iuRBhRMtmD5jxnAWKdrWHtA/iSUkdw89M="; }; - buildKeys = src: buildGoModule { + gitKeys = buildGoModule { inherit src version; pname = "gitsrht-keys"; + modRoot = "gitsrht-keys"; vendorSha256 = "sha256-9pojS69HCKVHUceyOpGtv9ewcxFD4WsOVsEzkmWJkF4="; }; - buildUpdateHook = src: buildGoModule { + gitShell = buildGoModule { inherit src version; - pname = "gitsrht-update-hook"; - vendorSha256 = "sha256-sBlG7EFqdDm7CkAHVX50Mf4N3sl1rPNmWExG/bfbfGA="; + pname = "gitsrht-shell"; + modRoot = "gitsrht-shell"; + vendorSha256 = "sha256-WqfvSPuVsOHA//86u33atMfeA11+DJhjLmWy8Ivq0NI="; }; - updateHook = buildUpdateHook "${src}/gitsrht-update-hook"; + gitUpdateHook = buildGoModule { + inherit src version; + pname = "gitsrht-update-hook"; + modRoot = "gitsrht-update-hook"; + vendorSha256 = "sha256-Bc3yPabS2S+qiroHFKrtkII/CfzBDYQ6xWxKHAME+Tc="; + }; in buildPythonPackage rec { @@ -52,6 +62,10 @@ buildPythonPackage rec { # Revert change breaking Unix socket support for Redis patches/redis-socket/git/0001-Revert-Add-webhook-queue-monitoring.patch ]; + postPatch = '' + substituteInPlace Makefile \ + --replace "all: api gitsrht-dispatch gitsrht-keys gitsrht-shell gitsrht-update-hook" "" + ''; nativeBuildInputs = srht.nativeBuildInputs; @@ -68,14 +82,12 @@ buildPythonPackage rec { postInstall = '' mkdir -p $out/bin - cp ${buildShell "${src}/gitsrht-shell"}/bin/gitsrht-shell $out/bin/gitsrht-shell - cp ${buildDispatcher "${src}/gitsrht-dispatch"}/bin/gitsrht-dispatch $out/bin/gitsrht-dispatch - cp ${buildKeys "${src}/gitsrht-keys"}/bin/gitsrht-keys $out/bin/gitsrht-keys - cp ${updateHook}/bin/gitsrht-update-hook $out/bin/gitsrht-update-hook + ln -s ${gitApi}/bin/api $out/bin/gitsrht-api + ln -s ${gitDispatch}/bin/gitsrht-dispatch $out/bin/gitsrht-dispatch + ln -s ${gitKeys}/bin/gitsrht-keys $out/bin/gitsrht-keys + ln -s ${gitShell}/bin/gitsrht-shell $out/bin/gitsrht-shell + ln -s ${gitUpdateHook}/bin/gitsrht-update-hook $out/bin/gitsrht-update-hook ''; - passthru = { - inherit updateHook; - }; pythonImportsCheck = [ "gitsrht" ]; -- cgit 1.4.1