nixpkgs/pkgs/development/python-modules/pymetar/default.nix

31 lines
828 B
Nix
Raw Normal View History

{ lib, python, buildPythonPackage, isPy3k, fetchPypi }:
2018-03-02 16:12:08 +00:00
buildPythonPackage rec {
pname = "pymetar";
2021-03-24 09:28:23 +00:00
version = "1.2";
2018-03-02 16:12:08 +00:00
2018-09-05 20:32:08 +00:00
disabled = !isPy3k;
2018-03-02 16:12:08 +00:00
src = fetchPypi {
inherit pname version;
2021-03-24 09:28:23 +00:00
sha256 = "f9a8caa21eff5367427da55a469ef396293ae4cc93797ab2f1a66a2924fbdc68";
2018-03-02 16:12:08 +00:00
};
2018-09-05 20:56:18 +00:00
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 lib; {
2018-03-02 16:12:08 +00:00
description = "A command-line tool to show the weather report by a given station ID";
homepage = "http://www.schwarzvogel.de/software/pymetar.html";
2018-09-05 20:26:25 +00:00
license = licenses.gpl2Plus;
2018-03-02 16:12:08 +00:00
maintainers = with maintainers; [ erosennin ];
};
}