2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
python,
|
|
|
|
buildPythonPackage,
|
|
|
|
isPy3k,
|
|
|
|
fetchPypi,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pymetar";
|
2021-10-17 02:12:59 +00:00
|
|
|
version = "1.4";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-17 02:12:59 +00:00
|
|
|
sha256 = "48dbe6c4929961021cb61e49bb9e0605b54c4b61b9fb9ade51076705a08ecd54";
|
2020-04-24 23:36:52 +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
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A command-line tool to show the weather report by a given station ID";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pymetar";
|
2021-07-14 22:03:04 +00:00
|
|
|
homepage = "https://github.com/klausman/pymetar";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ erosennin ];
|
|
|
|
};
|
|
|
|
}
|