about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/wheel-filename
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/wheel-filename')
-rw-r--r--nixpkgs/pkgs/development/python-modules/wheel-filename/default.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/wheel-filename/default.nix b/nixpkgs/pkgs/development/python-modules/wheel-filename/default.nix
new file mode 100644
index 000000000000..fd1ec9d946a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/wheel-filename/default.nix
@@ -0,0 +1,58 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, fetchpatch
+, pytestCheckHook
+, pythonOlder
+, setuptools
+, wheel
+}:
+
+buildPythonPackage rec {
+  pname = "wheel-filename";
+  version = "1.4.1";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "jwodder";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-M3XGHG733X5qKuMS6mvFSFHYOwWPaBMXw+w0eYo6ByE=";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "remove-wheel-dependency-constraint.patch";
+      url = "https://github.com/jwodder/wheel-filename/commit/11cfa57c8a32fa2a52fb5fe537859997bb642e75.patch";
+      hash = "sha256-ssePCVlJuHPJpPyFET3FnnWRlslLnZbnfn42g52yVN4=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    setuptools
+    wheel
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  postPatch = ''
+    substituteInPlace tox.ini \
+      --replace " --cov=wheel_filename --no-cov-on-fail" ""
+  '';
+
+  pythonImportsCheck = [
+    "wheel_filename"
+  ];
+
+  meta = with lib; {
+    description = "Parse wheel filenames";
+    mainProgram = "wheel-filename";
+    homepage = "https://github.com/jwodder/wheel-filename";
+    license = with licenses; [ mit ];
+    maintainers = with lib.maintainers; [ ayazhafiz ];
+  };
+}