about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorSarah Brofeldt <sbrofeldt@gmail.com>2018-09-06 10:26:32 +0200
committerGitHub <noreply@github.com>2018-09-06 10:26:32 +0200
commit574f89350746c9fa623e935dda0689d71fe8e877 (patch)
tree94456c3f0f8122725e5f118071db14d4d2af74e7 /pkgs
parent7158e7442f9e28d3b9cad9264063a76657fad070 (diff)
parent7de5708e9ed312b331bbf0953f4fd30ea8a94e22 (diff)
downloadnixlib-574f89350746c9fa623e935dda0689d71fe8e877.tar
nixlib-574f89350746c9fa623e935dda0689d71fe8e877.tar.gz
nixlib-574f89350746c9fa623e935dda0689d71fe8e877.tar.bz2
nixlib-574f89350746c9fa623e935dda0689d71fe8e877.tar.lz
nixlib-574f89350746c9fa623e935dda0689d71fe8e877.tar.xz
nixlib-574f89350746c9fa623e935dda0689d71fe8e877.tar.zst
nixlib-574f89350746c9fa623e935dda0689d71fe8e877.zip
Merge pull request #46124 from erosennin/pymetar-1.0
pythonPackages.pymetar: 0.21 -> 1.0 
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/pymetar/default.nix20
1 files changed, 15 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/pymetar/default.nix b/pkgs/development/python-modules/pymetar/default.nix
index a918528bdf87..339ddcbc7910 100644
--- a/pkgs/development/python-modules/pymetar/default.nix
+++ b/pkgs/development/python-modules/pymetar/default.nix
@@ -1,20 +1,30 @@
-{ stdenv, buildPythonPackage, isPy3k, fetchPypi }:
+{ stdenv, python, buildPythonPackage, isPy3k, fetchPypi }:
 
 buildPythonPackage rec {
   pname = "pymetar";
-  version = "0.21";
+  version = "1.0";
 
-  disabled = isPy3k;
+  disabled = !isPy3k;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1sh3nm5ilnsgpnzbb2wv4xndnizjayw859qp72798jadqpcph69k";
+    sha256 = "1n4k5aic4sgp43ki6j3zdw9b21r3biqqws8ah57b77n44b8wzrap";
   };
 
+  checkPhase = ''
+    cd testing/smoketest
+    tar xzf reports.tgz
+    mkdir logs
+    patchShebangs runtests.sh
+    substituteInPlace runtests.sh --replace "break" "exit 1"  # fail properly
+    export PYTHONPATH="$PYTHONPATH:$out/${python.sitePackages}"
+    ./runtests.sh
+  '';
+
   meta = with stdenv.lib; {
     description = "A command-line tool to show the weather report by a given station ID";
     homepage = http://www.schwarzvogel.de/software/pymetar.html;
-    license = licenses.gpl2;
+    license = licenses.gpl2Plus;
     maintainers = with maintainers; [ erosennin ];
   };
 }