2019-06-16 21:59:06 +02:00
|
|
|
{ stdenv, fetchPypi, buildPythonPackage, pytest, pytestcov }:
|
2017-03-20 17:36:57 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "distro";
|
2020-06-06 08:47:04 +02:00
|
|
|
version = "1.5.0";
|
2017-03-20 17:36:57 +01:00
|
|
|
|
2019-03-14 13:09:57 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-06 08:47:04 +02:00
|
|
|
sha256 = "0e58756ae38fbd8fc3020d54badb8eae17c5b9dcbed388b17bb55b8a5928df92";
|
2019-03-14 13:09:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# TODO: Enable more tests on NixOS (20 out of 173 are failing, 10 due to the
|
|
|
|
# missing lsb_release binary):
|
|
|
|
patches = [ ./nixos.patch ];
|
|
|
|
|
2019-02-15 12:58:47 +01:00
|
|
|
checkInputs = [ pytest pytestcov ];
|
2017-03-20 17:36:57 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
2019-02-15 12:58:47 +01:00
|
|
|
py.test
|
2017-03-20 17:36:57 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/nir0s/distro";
|
2017-03-20 17:36:57 +01:00
|
|
|
description = "Linux Distribution - a Linux OS platform information API.";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ nand0p ];
|
|
|
|
};
|
|
|
|
}
|