1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, setuptools
5, setuptools-scm
6, wheel
7, pytestCheckHook
8}:
9
10buildPythonPackage rec {
11 pname = "mockfs";
12 version = "1.1.4";
13 format = "pyproject";
14
15 src = fetchFromGitHub {
16 owner = "mockfs";
17 repo = "mockfs";
18 rev = "v${version}";
19 hash = "sha256-JwSkOI0dz9ZetfE0ZL3CthvcCSXGFYX+yQZy/oC6VBk=";
20 };
21
22 postPatch = ''
23 sed -i '/addopts/d' pytest.ini
24 '';
25
26 env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
27
28 nativeBuildInputs = [
29 setuptools
30 setuptools-scm
31 wheel
32 ];
33
34 pythonImportsCheck = [ "mockfs" ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 ];
39
40 meta = with lib; {
41 description = "A simple mock filesystem for use in unit tests";
42 homepage = "https://github.com/mockfs/mockfs";
43 changelog = "https://github.com/mockfs/mockfs/blob/${src.rev}/CHANGES.rst";
44 license = licenses.mit;
45 maintainers = with maintainers; [ ];
46 };
47}