sourcehut.*: add format

- add nativeBuildInputs
- disable on unsupported Python releases
This commit is contained in:
Fabian Affolter 2023-11-28 11:33:29 +01:00
parent 77df474b75
commit 30748250bc
11 changed files with 123 additions and 1 deletions

View File

@ -11,6 +11,9 @@
, lxml , lxml
, python , python
, unzip , unzip
, pip
, pythonOlder
, setuptools
}: }:
let let
version = "0.86.10"; version = "0.86.10";
@ -39,12 +42,20 @@ in
buildPythonPackage rec { buildPythonPackage rec {
inherit src version; inherit src version;
pname = "buildsrht"; pname = "buildsrht";
pyproject = true;
disabled = pythonOlder "3.7";
postPatch = '' postPatch = ''
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace "all: api worker" "" --replace "all: api worker" ""
''; '';
nativeBuildInputs = [
pip
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
srht srht
redis redis

View File

@ -21,12 +21,17 @@
, importlib-metadata , importlib-metadata
, tinycss2 , tinycss2
, sassc , sassc
, pythonOlder
, minify , minify
, setuptools
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "srht"; pname = "srht";
version = "0.69.15"; version = "0.69.15";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromSourcehut { src = fetchFromSourcehut {
owner = "~sircmpwn"; owner = "~sircmpwn";
@ -41,6 +46,10 @@ buildPythonPackage rec {
patches/redis-socket/core/0001-Fix-Unix-socket-support-in-RedisQueueCollector.patch patches/redis-socket/core/0001-Fix-Unix-socket-support-in-RedisQueueCollector.patch
]; ];
nativeBuildInputs = [
setuptools
];
propagatedNativeBuildInputs = [ propagatedNativeBuildInputs = [
sassc sassc
minify minify

View File

@ -7,7 +7,10 @@
, scmsrht , scmsrht
, pygit2 , pygit2
, minio , minio
, pythonOlder
, unzip , unzip
, pip
, setuptools
}: }:
let let
version = "0.84.2"; version = "0.84.2";
@ -78,12 +81,20 @@ in
buildPythonPackage rec { buildPythonPackage rec {
inherit src version; inherit src version;
pname = "gitsrht"; pname = "gitsrht";
pyproject = true;
disabled = pythonOlder "3.7";
postPatch = '' postPatch = ''
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace "all: api gitsrht-dispatch gitsrht-keys gitsrht-shell gitsrht-update-hook" "" --replace "all: api gitsrht-dispatch gitsrht-keys gitsrht-shell gitsrht-update-hook" ""
''; '';
nativeBuildInputs = [
pip
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
srht srht
scmsrht scmsrht

View File

@ -8,11 +8,17 @@
, unidiff , unidiff
, python , python
, unzip , unzip
, pip
, pythonOlder
, setuptools
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "hgsrht"; pname = "hgsrht";
version = "0.32.4"; version = "0.32.4";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromSourcehut { src = fetchFromSourcehut {
owner = "~sircmpwn"; owner = "~sircmpwn";
@ -49,6 +55,11 @@ buildPythonPackage rec {
''; '';
}; };
nativeBuildInputs = [
pip
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
python-hglib python-hglib
scmsrht scmsrht

View File

@ -4,13 +4,19 @@
, buildPythonPackage , buildPythonPackage
, python , python
, srht , srht
, setuptools
, pip
, pyyaml , pyyaml
, pythonOlder
, unzip , unzip
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "hubsrht"; pname = "hubsrht";
version = "0.17.2"; version = "0.17.2";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromSourcehut { src = fetchFromSourcehut {
owner = "~sircmpwn"; owner = "~sircmpwn";
@ -30,6 +36,11 @@ buildPythonPackage rec {
vendorHash = "sha256-K5EmZ4U+xItTR85+SCwhwg5KUGLkKHo9Nr2pkvmJpfo="; vendorHash = "sha256-K5EmZ4U+xItTR85+SCwhwg5KUGLkKHo9Nr2pkvmJpfo=";
} // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); } // import ./fix-gqlgen-trimpath.nix { inherit unzip; });
nativeBuildInputs = [
pip
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
srht srht
pyyaml pyyaml
@ -44,7 +55,13 @@ buildPythonPackage rec {
ln -s ${hubsrht-api}/bin/api $out/bin/hubsrht-api ln -s ${hubsrht-api}/bin/api $out/bin/hubsrht-api
''; '';
pythonImportsCheck = [ "hubsrht" ];
# Module has no tests
doCheck = false;
pythonImportsCheck = [
"hubsrht"
];
meta = with lib; { meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/hub.sr.ht"; homepage = "https://git.sr.ht/~sircmpwn/hub.sr.ht";

View File

@ -9,11 +9,17 @@
, emailthreads , emailthreads
, python , python
, unzip , unzip
, pip
, pythonOlder
, setuptools
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "listssrht"; pname = "listssrht";
version = "0.57.8"; version = "0.57.8";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromSourcehut { src = fetchFromSourcehut {
owner = "~sircmpwn"; owner = "~sircmpwn";
@ -34,6 +40,11 @@ buildPythonPackage rec {
--replace "all: api" "" --replace "all: api" ""
''; '';
nativeBuildInputs = [
pip
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
srht srht
aiosmtpd aiosmtpd

View File

@ -6,11 +6,17 @@
, pygit2 , pygit2
, python , python
, unzip , unzip
, pip
, pythonOlder
, setuptools
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "mansrht"; pname = "mansrht";
version = "0.16.1"; version = "0.16.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromSourcehut { src = fetchFromSourcehut {
owner = "~sircmpwn"; owner = "~sircmpwn";
@ -30,6 +36,11 @@ buildPythonPackage rec {
vendorHash = "sha256-K5EmZ4U+xItTR85+SCwhwg5KUGLkKHo9Nr2pkvmJpfo="; vendorHash = "sha256-K5EmZ4U+xItTR85+SCwhwg5KUGLkKHo9Nr2pkvmJpfo=";
} // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); } // import ./fix-gqlgen-trimpath.nix { inherit unzip; });
nativeBuildInputs = [
pip
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
srht srht
pygit2 pygit2

View File

@ -13,6 +13,9 @@
, zxcvbn , zxcvbn
, python , python
, unzip , unzip
, pip
, pythonOlder
, setuptools
}: }:
let let
version = "0.64.8"; version = "0.64.8";
@ -35,12 +38,20 @@ in
buildPythonPackage rec { buildPythonPackage rec {
pname = "metasrht"; pname = "metasrht";
inherit version src; inherit version src;
pyproject = true;
disabled = pythonOlder "3.7";
postPatch = '' postPatch = ''
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace "all: api" "" --replace "all: api" ""
''; '';
nativeBuildInputs = [
pip
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
alembic alembic
bcrypt bcrypt

View File

@ -3,8 +3,11 @@
, buildGoModule , buildGoModule
, buildPythonPackage , buildPythonPackage
, srht , srht
, pip
, pyyaml , pyyaml
, python , python
, pythonOlder
, setuptools
, unzip , unzip
}: }:
@ -28,12 +31,20 @@ in
buildPythonPackage rec { buildPythonPackage rec {
inherit src version; inherit src version;
pname = "pastesrht"; pname = "pastesrht";
pyproject = true;
disabled = pythonOlder "3.7";
postPatch = '' postPatch = ''
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace "all: api" "" --replace "all: api" ""
''; '';
nativeBuildInputs = [
pip
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
srht srht
pyyaml pyyaml

View File

@ -4,11 +4,16 @@
, srht , srht
, pyyaml , pyyaml
, buildsrht , buildsrht
, pythonOlder
, setuptools
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "scmsrht"; pname = "scmsrht";
version = "0.22.23"; version = "0.22.23";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromSourcehut { src = fetchFromSourcehut {
owner = "~sircmpwn"; owner = "~sircmpwn";
@ -17,6 +22,10 @@ buildPythonPackage rec {
sha256 = "sha256-058dOEYJDY3jtxH1VkV1CFq5CZTkauSnTWg57DCnNtw="; sha256 = "sha256-058dOEYJDY3jtxH1VkV1CFq5CZTkauSnTWg57DCnNtw=";
}; };
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
srht srht
pyyaml pyyaml
@ -28,6 +37,7 @@ buildPythonPackage rec {
''; '';
dontUseSetuptoolsCheck = true; dontUseSetuptoolsCheck = true;
pythonImportsCheck = [ "scmsrht" ]; pythonImportsCheck = [ "scmsrht" ];
meta = with lib; { meta = with lib; {

View File

@ -8,11 +8,16 @@
, factory-boy , factory-boy
, python , python
, unzip , unzip
, pythonOlder
, setuptools
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "todosrht"; pname = "todosrht";
version = "0.74.6"; version = "0.74.6";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromSourcehut { src = fetchFromSourcehut {
owner = "~sircmpwn"; owner = "~sircmpwn";
@ -33,6 +38,10 @@ buildPythonPackage rec {
vendorHash = "sha256-rvfG5F6ez8UM0dYVhKfzwtb7ZEJlaKMBAfKDbo3Aofc="; vendorHash = "sha256-rvfG5F6ez8UM0dYVhKfzwtb7ZEJlaKMBAfKDbo3Aofc=";
} // import ./fix-gqlgen-trimpath.nix { inherit unzip; }); } // import ./fix-gqlgen-trimpath.nix { inherit unzip; });
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [ propagatedBuildInputs = [
srht srht
alembic alembic