about summary refs log tree commit diff
path: root/pkgs/development/python-modules/iso3166
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2017-04-17 00:47:12 +0200
committerJörg Thalheim <joerg@thalheim.io>2017-04-17 01:24:29 +0200
commita7d2be1471bb31bb047027aa0d3f06370926e0b8 (patch)
tree345d755a4a657d584ce135f108907bb144b30f09 /pkgs/development/python-modules/iso3166
parent51770c85e49b42c6aaa5ebfd9cb37171e8374863 (diff)
pythonPackages.iso3166: enable tests
fixes #24884
Diffstat (limited to 'pkgs/development/python-modules/iso3166')
-rw-r--r--pkgs/development/python-modules/iso3166/default.nix19
1 files changed, 14 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/iso3166/default.nix b/pkgs/development/python-modules/iso3166/default.nix
index d85860a5986fc..4d9792ebbb820 100644
--- a/pkgs/development/python-modules/iso3166/default.nix
+++ b/pkgs/development/python-modules/iso3166/default.nix
@@ -1,15 +1,24 @@
-{ stdenv, fetchurl, buildPythonPackage }:
- 
+{ stdenv, fetchFromGitHub, buildPythonPackage, pytest }:
+
 buildPythonPackage rec {
   name = "${pname}-${version}";
   pname = "iso3166";
   version = "0.8";
 
-  src = fetchurl {
-    url = "mirror://pypi/i/${pname}/${name}.tar.gz";
-    sha256 = "fbeb17bed90d15b1f6d6794aa2ea458e5e273a1d29b6f4939423c97640e14933";
+  src = fetchFromGitHub {
+    owner = "deactivated";
+    repo = "python-iso3166";
+    # repo has no version tags
+    rev = "f04e499447bbff10af701cf3dd81f6bcdf02f7d7";
+    sha256 = "0zs9za9dr2nl5srxir08yibmp6nffcapmzala0fgh8ny7y6rafrx";
   };
 
+  buildInputs = [ pytest ];
+
+  checkPhase = ''
+    py.test
+  '';
+
   meta = with stdenv.lib; {
     homepage = https://github.com/deactivated/python-iso3166;
     description = "Self-contained ISO 3166-1 country definitions";