git.iko.soy/typeable/nixpkgs
on master help sign in
pinnwand: 1.1.2 -> 1.2.0

Build the package from Git using pyproject.toml and enable tests.

commit433db3a30c5f779c4abe5a72a62595ca0af2d520 authorMartin Weinelt <hexa@darmstadt.ccc.de> dateSat 20 Jun 2020, 17:08 (6 years ago) parentcb50679
2 files changed+32−7
pkgs/servers/pinnwand/add-build-backend.patch+12 pkgs/servers/pinnwand/default.nix+20−7
pkgs/servers/pinnwand/add-build-backend.patchnew file+12
@@ -0,0 +1,12 @@
1+diff --git a/pyproject.toml b/pyproject.toml
2+index 3c4e87e..af27304 100644
3+--- a/pyproject.toml
4++++ b/pyproject.toml
5+@@ -58,5 +58,6 @@ exclude = '''
6+ pinnwand = 'pinnwand.__main__:main'
7+
8+ [build-system]
9+-requires = ["setuptools", "wheel"]
10++requires = ["poetry>=0.12"]
11++build-backend = "poetry.masonry.api"
12+
pkgs/servers/pinnwand/default.nix+20−7
@@ -1,4 +1,4 @@
1−{ lib, python3, fetchFromGitHub, nixosTests }:
1+{ lib, python3, fetchFromGitHub, poetry, nixosTests }:
22
33let
44 python = python3.override {
@@ -14,13 +14,25 @@ let
1414 };
1515in with python.pkgs; buildPythonApplication rec {
1616 pname = "pinnwand";
17− version = "1.1.2";
17+ version = "1.2.0";
18+ format = "pyproject";
1819
19− src = fetchPypi {
20− inherit pname version;
21− sha256 = "0iincxkfyyx85ggx9ilms2f8aq4lcbg3rkqgrr4wlsflzhljqd0p";
20+ src = fetchFromGitHub {
21+ owner = "supakeen";
22+ repo = pname;
23+ rev = "v${version}";
24+ sha256 = "n5PH21QmU8YAb0WKXAKZR4wjfFTSSOtvlRq7yxRVZNE=";
2225 };
2326
27+ patches = [
28+ # https://github.com/supakeen/pinnwand/issues/93
29+ ./add-build-backend.patch
30+ ];
31+
32+ nativeBuildInputs = [
33+ poetry
34+ ];
35+
2436 propagatedBuildInputs = [
2537 click
2638 docutils
@@ -30,9 +42,10 @@ in with python.pkgs; buildPythonApplication rec {
3042 sqlalchemy
3143 ];
3244
33− # tests are only available when fetching from GitHub, where they in turn don't have a setup.py :(
45+ checkInputs = [ pytest ];
46+
3447 checkPhase = ''
35− $out/bin/pinnwand --help > /dev/null
48+ pytest
3649 '';
3750
3851 passthru.tests = nixosTests.pinnwand;