pinnwand: 1.1.2 -> 1.2.0

Build the package from Git using pyproject.toml and enable tests.
This commit is contained in:
Martin Weinelt 2020-06-20 17:08:33 +02:00
parent cb50679f0e
commit 433db3a30c
No known key found for this signature in database
GPG key ID: BD4AA0528F63F17E
2 changed files with 32 additions and 7 deletions

View file

@ -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"

View file

@ -1,4 +1,4 @@
{ lib, python3, fetchFromGitHub, nixosTests }:
{ lib, python3, fetchFromGitHub, poetry, nixosTests }:
let
python = python3.override {
@ -14,13 +14,25 @@ let
};
in with python.pkgs; buildPythonApplication rec {
pname = "pinnwand";
version = "1.1.2";
version = "1.2.0";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "0iincxkfyyx85ggx9ilms2f8aq4lcbg3rkqgrr4wlsflzhljqd0p";
src = fetchFromGitHub {
owner = "supakeen";
repo = pname;
rev = "v${version}";
sha256 = "n5PH21QmU8YAb0WKXAKZR4wjfFTSSOtvlRq7yxRVZNE=";
};
patches = [
# https://github.com/supakeen/pinnwand/issues/93
./add-build-backend.patch
];
nativeBuildInputs = [
poetry
];
propagatedBuildInputs = [
click
docutils
@ -30,9 +42,10 @@ in with python.pkgs; buildPythonApplication rec {
sqlalchemy
];
# tests are only available when fetching from GitHub, where they in turn don't have a setup.py :(
checkInputs = [ pytest ];
checkPhase = ''
$out/bin/pinnwand --help > /dev/null
pytest
'';
passthru.tests = nixosTests.pinnwand;