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