pinnwand: 1.1.2 -> 1.2.0
Build the package from Git using pyproject.toml and enable tests.
This commit is contained in:
parent
cb50679f0e
commit
433db3a30c
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/pyproject.toml b/pyproject.toml
|
||||||
|
index 3c4e87e..af27304 100644
|
||||||
|
--- a/pyproject.toml
|
||||||
|
+++ b/pyproject.toml
|
||||||
|
@@ -58,5 +58,6 @@ exclude = '''
|
||||||
|
pinnwand = 'pinnwand.__main__:main'
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
-requires = ["setuptools", "wheel"]
|
||||||
|
+requires = ["poetry>=0.12"]
|
||||||
|
+build-backend = "poetry.masonry.api"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, python3, fetchFromGitHub, nixosTests }:
|
{ lib, python3, fetchFromGitHub, poetry, nixosTests }:
|
||||||
|
|
||||||
let
|
let
|
||||||
python = python3.override {
|
python = python3.override {
|
||||||
|
@ -14,13 +14,25 @@ let
|
||||||
};
|
};
|
||||||
in with python.pkgs; buildPythonApplication rec {
|
in with python.pkgs; buildPythonApplication rec {
|
||||||
pname = "pinnwand";
|
pname = "pinnwand";
|
||||||
version = "1.1.2";
|
version = "1.2.0";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "supakeen";
|
||||||
sha256 = "0iincxkfyyx85ggx9ilms2f8aq4lcbg3rkqgrr4wlsflzhljqd0p";
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "n5PH21QmU8YAb0WKXAKZR4wjfFTSSOtvlRq7yxRVZNE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# https://github.com/supakeen/pinnwand/issues/93
|
||||||
|
./add-build-backend.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
poetry
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
click
|
click
|
||||||
docutils
|
docutils
|
||||||
|
@ -30,9 +42,10 @@ in with python.pkgs; buildPythonApplication rec {
|
||||||
sqlalchemy
|
sqlalchemy
|
||||||
];
|
];
|
||||||
|
|
||||||
# tests are only available when fetching from GitHub, where they in turn don't have a setup.py :(
|
checkInputs = [ pytest ];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
$out/bin/pinnwand --help > /dev/null
|
pytest
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests = nixosTests.pinnwand;
|
passthru.tests = nixosTests.pinnwand;
|
||||||
|
|
Loading…
Reference in New Issue