about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytest-datadir/default.nix
blob: b1cdb1033a64fe1800b09b1dd36cb45cc88fec7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ lib, stdenv, 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 ];
  };
}