about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytest-datadir/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pytest-datadir/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pytest-datadir/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pytest-datadir/default.nix b/nixpkgs/pkgs/development/python-modules/pytest-datadir/default.nix
new file mode 100644
index 000000000000..1dc218c08085
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/pytest-datadir/default.nix
@@ -0,0 +1,32 @@
+{ lib, buildPythonPackage, fetchFromGitHub
+, setuptools_scm, pytest, cmake
+}:
+
+buildPythonPackage rec {
+  pname = "pytest-datadir";
+  version = "1.3.1";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "gabrielcnr";
+    repo = pname;
+    rev = version;
+    sha256 = "0kwgp6sqnqnmww5r0dkmyfpi0lmw0iwxz3fnwn2fs8w6bvixzznf";
+  };
+
+  nativeBuildInputs = [ setuptools_scm ];
+
+  preBuild = ''
+    export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
+  '';
+
+  checkInputs = [ pytest ];
+  checkPhase = "pytest";
+
+  meta = with lib; {
+    homepage = "https://github.com/gabrielcnr/pytest-datadir";
+    description = "pytest plugin for manipulating test data directories and files";
+    license = licenses.mit;
+    maintainers = with maintainers; [ metadark ];
+  };
+}