summary refs log tree commit diff
path: root/pkgs/applications/misc/haxor-news/default.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2017-12-31 13:55:27 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2017-12-31 13:55:27 +0100
commit670c194dab0aedcd02feee74933ed43f79417caf (patch)
treea7d3cd9b61da6c56300ad14e9b4e9a6d48896638 /pkgs/applications/misc/haxor-news/default.nix
parent8a255d73b4d1418b8395350435aecfcf403430f2 (diff)
downloadnixpkgs-670c194dab0aedcd02feee74933ed43f79417caf.tar
nixpkgs-670c194dab0aedcd02feee74933ed43f79417caf.tar.gz
nixpkgs-670c194dab0aedcd02feee74933ed43f79417caf.tar.bz2
nixpkgs-670c194dab0aedcd02feee74933ed43f79417caf.tar.lz
nixpkgs-670c194dab0aedcd02feee74933ed43f79417caf.tar.xz
nixpkgs-670c194dab0aedcd02feee74933ed43f79417caf.tar.zst
nixpkgs-670c194dab0aedcd02feee74933ed43f79417caf.zip
haxor-news: 0.4.2 -> 0.4.3
For some reason tests are failing. Note they were already failing before
this update.
Diffstat (limited to 'pkgs/applications/misc/haxor-news/default.nix')
-rw-r--r--pkgs/applications/misc/haxor-news/default.nix24
1 files changed, 16 insertions, 8 deletions
diff --git a/pkgs/applications/misc/haxor-news/default.nix b/pkgs/applications/misc/haxor-news/default.nix
index dc771fc2d5e..c82e5026ff1 100644
--- a/pkgs/applications/misc/haxor-news/default.nix
+++ b/pkgs/applications/misc/haxor-news/default.nix
@@ -1,15 +1,17 @@
-{ stdenv, fetchurl, pythonPackages }:
+{ stdenv, fetchurl, python }:
 
-pythonPackages.buildPythonApplication rec {
-  version = "0.4.2";
-  name = "haxor-news-${version}";
+with python.pkgs;
 
-  src = fetchurl {
-    url = "https://github.com/donnemartin/haxor-news/archive/${version}.tar.gz";
-    sha256 = "0543k5ys044f2a1q8k36djnnq2h2dffnwbkva9snjjy30nlwwdgs";
+buildPythonApplication rec {
+  pname = "haxor-news";
+  version = "0.4.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "5b9af8338a0f8b95a8133b66ef106553823813ac171c0aefa3f3f2dbeb4d7f88";
   };
 
-  propagatedBuildInputs = with pythonPackages; [
+  propagatedBuildInputs = [
     click
     colorama
     requests
@@ -18,6 +20,12 @@ pythonPackages.buildPythonApplication rec {
     six
   ];
 
+  checkInputs = [ mock ];
+
+  checkPhase = ''
+    ${python.interpreter} -m unittest discover -s tests -v
+  '';
+
   meta = with stdenv.lib; {
     homepage = https://github.com/donnemartin/haxor-news;
     description = "Browse Hacker News like a haxor";