diff options
Diffstat (limited to 'pkgs/applications/version-management/sourcehut/man.nix')
-rw-r--r-- | pkgs/applications/version-management/sourcehut/man.nix | 21 |
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 dadc508edd86..b01d739a0600 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; }); + 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; { |