e4d383983d
Packaged for pyatv tests.
47 lines
928 B
Nix
47 lines
928 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, setuptools
|
|
, setuptools-scm
|
|
, wheel
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "mockfs";
|
|
version = "1.1.4";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mockfs";
|
|
repo = "mockfs";
|
|
rev = "v${version}";
|
|
hash = "sha256-JwSkOI0dz9ZetfE0ZL3CthvcCSXGFYX+yQZy/oC6VBk=";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -i '/addopts/d' pytest.ini
|
|
'';
|
|
|
|
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
setuptools-scm
|
|
wheel
|
|
];
|
|
|
|
pythonImportsCheck = [ "mockfs" ];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "A simple mock filesystem for use in unit tests";
|
|
homepage = "https://github.com/mockfs/mockfs";
|
|
changelog = "https://github.com/mockfs/mockfs/blob/${src.rev}/CHANGES.rst";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|