2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, python, buildPythonPackage, isPy3k, fetchPypi }:
|
2018-03-02 16:12:08 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pymetar";
|
2019-01-02 21:41:22 +00:00
|
|
|
version = "1.1";
|
2018-03-02 16:12:08 +00:00
|
|
|
|
2018-09-05 21:32:08 +01:00
|
|
|
disabled = !isPy3k;
|
2018-03-02 16:12:08 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-01-02 21:41:22 +00:00
|
|
|
sha256 = "0y42l7mmp7jn4pzg66x3k57c6hqpxc22mgzgaqqpblkx2kzh42n9";
|
2018-03-02 16:12:08 +00:00
|
|
|
};
|
|
|
|
|
2018-09-05 21:56:18 +01: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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
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";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.schwarzvogel.de/software/pymetar.html";
|
2018-09-05 21:26:25 +01:00
|
|
|
license = licenses.gpl2Plus;
|
2018-03-02 16:12:08 +00:00
|
|
|
maintainers = with maintainers; [ erosennin ];
|
|
|
|
};
|
|
|
|
}
|