about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/distro/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/distro/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/distro/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/distro/default.nix b/nixpkgs/pkgs/development/python-modules/distro/default.nix
new file mode 100644
index 000000000000..09868b2f7555
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/distro/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchPypi, buildPythonPackage, pytest, pytestcov, tox }:
+
+buildPythonPackage rec {
+  pname = "distro";
+  version = "1.4.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n";
+  };
+
+  # TODO: Enable more tests on NixOS (20 out of 173 are failing, 10 due to the
+  # missing lsb_release binary):
+  patches = [ ./nixos.patch ];
+
+  checkInputs = [ pytest pytestcov ];
+
+  checkPhase = ''
+    py.test
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/nir0s/distro;
+    description = "Linux Distribution - a Linux OS platform information API.";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ nand0p ];
+  };
+}