about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/pinnwand/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/pinnwand/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/pinnwand/default.nix24
1 files changed, 17 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/servers/pinnwand/default.nix b/nixpkgs/pkgs/servers/pinnwand/default.nix
index 563c539c825e..a2f417d88fae 100644
--- a/nixpkgs/pkgs/servers/pinnwand/default.nix
+++ b/nixpkgs/pkgs/servers/pinnwand/default.nix
@@ -1,4 +1,4 @@
-{ lib, python3, fetchFromGitHub }:
+{ lib, python3, fetchFromGitHub, poetry, nixosTests }:
 
 let
   python = python3.override {
@@ -14,13 +14,20 @@ let
   };
 in with python.pkgs; buildPythonApplication rec {
   pname = "pinnwand";
-  version = "1.1.2";
+  version = "1.2.2";
+  format = "pyproject";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "0iincxkfyyx85ggx9ilms2f8aq4lcbg3rkqgrr4wlsflzhljqd0p";
+  src = fetchFromGitHub {
+    owner = "supakeen";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0cxdpc3lxgzakzgvdyyrn234380dm05svnwr8av5nrjp4nm9s8z4";
   };
 
+  nativeBuildInputs = [
+    poetry
+  ];
+
   propagatedBuildInputs = [
     click
     docutils
@@ -30,11 +37,14 @@ 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;
+
   meta = with lib; {
     homepage = "https://supakeen.com/project/pinnwand/";
     license = licenses.mit;