about summary refs log tree commit diff
path: root/pkgs/development/python-modules/cpe/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/cpe/default.nix')
-rw-r--r--pkgs/development/python-modules/cpe/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/cpe/default.nix b/pkgs/development/python-modules/cpe/default.nix
new file mode 100644
index 0000000000000..5aa48feea09dd
--- /dev/null
+++ b/pkgs/development/python-modules/cpe/default.nix
@@ -0,0 +1,37 @@
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  pytestCheckHook,
+  pythonOlder,
+  setuptools,
+}:
+
+buildPythonPackage rec {
+  pname = "cpe";
+  version = "1.3.0";
+  pyproject = true;
+
+  disabled = pythonOlder "3.10";
+
+  src = fetchFromGitHub {
+    owner = "nilp0inter";
+    repo = "cpe";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-nHFgsFNoDf1VJI7XOe62NOuL67AZCP/LFsymt7Q8L2U=";
+  };
+
+  build-system = [ setuptools ];
+
+  nativeCheckInputs = [ pytestCheckHook ];
+
+  pythonImportsCheck = [ "cpe" ];
+
+  meta = {
+    changelog = "https://github.com/nilp0inter/cpe/releases/tag/v${version}";
+    description = "Common platform enumeration for python";
+    homepage = "https://github.com/nilp0inter/cpe";
+    license = lib.licenses.gpl3Only;
+    maintainers = with lib.maintainers; [ tochiaha ];
+  };
+}