mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
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
2 changed files with 32 additions and 7 deletions
12
pkgs/servers/pinnwand/add-build-backend.patch
Normal file
12
pkgs/servers/pinnwand/add-build-backend.patch
Normal 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"
|
||||
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue