mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
sourcehut.hubsrht: 0.14.14 -> 0.17.2
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
a9730572cb
commit
1a7c5a8112
@ -1,21 +1,35 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, fetchFromSourcehut
|
, fetchFromSourcehut
|
||||||
|
, buildGoModule
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
, python
|
||||||
, srht
|
, srht
|
||||||
, pyyaml
|
, pyyaml
|
||||||
|
, unzip
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "hubsrht";
|
pname = "hubsrht";
|
||||||
version = "0.14.14";
|
version = "0.17.2";
|
||||||
|
|
||||||
src = fetchFromSourcehut {
|
src = fetchFromSourcehut {
|
||||||
owner = "~sircmpwn";
|
owner = "~sircmpwn";
|
||||||
repo = "hub.sr.ht";
|
repo = "hub.sr.ht";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-4n6oQ+AAvdJY/5KflxAp62chjyrlSUkmt319DKZk33w=";
|
sha256 = "sha256-A+lvRsPz5EBnM0gB4PJuxSMpELZTrK14ORxDbTKPXWg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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; gqlgenVersion = "0.17.20"; });
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
srht
|
srht
|
||||||
pyyaml
|
pyyaml
|
||||||
@ -23,9 +37,13 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
export PKGVER=${version}
|
export PKGVER=${version}
|
||||||
|
export SRHT_PATH=${srht}/${python.sitePackages}/srht
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
ln -s ${hubsrht-api}/bin/api $out/bin/hubsrht-api
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dontUseSetuptoolsCheck = true;
|
|
||||||
pythonImportsCheck = [ "hubsrht" ];
|
pythonImportsCheck = [ "hubsrht" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user