sourcehut.hubsrht: 0.17.2 -> 0.17.5

Also refactor it to the same common structure as all other sourcehut
packages, thus opening the possibility to even further simplify this in
the future.

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2024-02-07 10:10:08 +01:00
parent 50fa834713
commit c36acb6afe
No known key found for this signature in database
GPG Key ID: 1538094429952F86

View File

@ -11,30 +11,34 @@
, unzip
}:
buildPythonPackage rec {
pname = "hubsrht";
version = "0.17.2";
pyproject = true;
disabled = pythonOlder "3.7";
let
version = "0.17.5";
gqlgen = import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion = "0.17.41"; };
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "hub.sr.ht";
rev = version;
sha256 = "sha256-A+lvRsPz5EBnM0gB4PJuxSMpELZTrK14ORxDbTKPXWg=";
hash = "sha256-GbBxK3XE+Y6Jiap0Nxa8vk4Kv6IbcdSi4NN59AeKwjA=";
};
postPatch = ''
substituteInPlace Makefile --replace "all: api" ""
'';
hubsrht-api = buildGoModule ({
inherit src version;
pname = "hubsrht-api";
modRoot = "api";
vendorHash = "sha256-K5EmZ4U+xItTR85+SCwhwg5KUGLkKHo9Nr2pkvmJpfo=";
} // import ./fix-gqlgen-trimpath.nix { inherit unzip; });
vendorHash = "sha256-wmuM0SxQbohTDaU8zmkw1TQTmqhOy1yAl1jRWk6TKL8=";
} // gqlgen);
in
buildPythonPackage rec {
inherit src version;
pname = "hubsrht";
pyproject = true;
disabled = pythonOlder "3.7";
postPatch = ''
substituteInPlace Makefile --replace "all: api" ""
'';
nativeBuildInputs = [
pip