about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/haxor-news/default.nix24
-rw-r--r--pkgs/applications/office/watson/default.nix27
2 files changed, 34 insertions, 17 deletions
diff --git a/pkgs/applications/misc/haxor-news/default.nix b/pkgs/applications/misc/haxor-news/default.nix
index dc771fc2d5e4..c82e5026ff18 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";
diff --git a/pkgs/applications/office/watson/default.nix b/pkgs/applications/office/watson/default.nix
index a1fcfd5de700..e0f0c58b4506 100644
--- a/pkgs/applications/office/watson/default.nix
+++ b/pkgs/applications/office/watson/default.nix
@@ -1,13 +1,14 @@
-{ stdenv, pythonPackages }:
+{ stdenv, pythonPackages, fetchpatch }:
 
-pythonPackages.buildPythonApplication rec {
+with pythonPackages;
+
+buildPythonApplication rec {
   pname = "td-watson";
-  name = "${pname}-${version}";
-  version = "1.4.0";
+  version = "1.5.2";
 
-  src = pythonPackages.fetchPypi {
+  src = fetchPypi {
     inherit version pname;
-    sha256 = "1py0g4990jmvq0dn7jasda7f10kzr41bix46hnbyc1rshjzc17hq";
+    sha256 = "6e03d44a9278807fe5245e9ed0943f13ffb88e11249a02655c84cb86260b27c8";
   };
 
   # uses tox, test invocation fails
@@ -15,8 +16,16 @@ pythonPackages.buildPythonApplication rec {
   checkPhase = ''
     py.test -vs tests
  '';
-  checkInputs = with pythonPackages; [ py pytest pytest-datafiles mock pytest-mock pytestrunner ];
-  propagatedBuildInputs = with pythonPackages; [ requests click arrow ];
+
+  patches = [
+    (fetchpatch {
+      url = https://github.com/TailorDev/Watson/commit/f5760c71cbc22de4e12ede8f6f7257515a9064d3.patch;
+      sha256 = "0s9h26915ilpbd0qhmvk77r3gmrsdrl5l7dqxj0l5q66fp0z6b0g";
+    })
+  ];
+
+  checkInputs = [ py pytest pytest-datafiles mock pytest-mock pytestrunner ];
+  propagatedBuildInputs = [ requests click arrow ];
 
   meta = with stdenv.lib; {
     homepage = https://tailordev.github.io/Watson/;
@@ -24,4 +33,4 @@ pythonPackages.buildPythonApplication rec {
     license = licenses.mit;
     maintainers = with maintainers; [ mguentner ] ;
   };
-}
\ No newline at end of file
+}