From 30054093c9f080b8dcb6022b384824ff1dbebc61 Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Tue, 21 Mar 2023 23:49:14 +0100 Subject: [PATCH] sourcehut.mansrht: 0.15.26 -> 0.16.1 Signed-off-by: Christoph Heiss --- .../version-management/sourcehut/man.nix | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/man.nix b/pkgs/applications/version-management/sourcehut/man.nix index dadc508edd86..e88f7338ee3c 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; {