nautilus: fix cross compilation (#373662)
[NixPkgs.git] / pkgs / development / python-modules / dictdiffer / default.nix
blob496c3d51af71f1f03086ca9794af283e733cd00c
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pytestCheckHook,
6   pythonOlder,
7   setuptools-scm,
8 }:
10 buildPythonPackage rec {
11   pname = "dictdiffer";
12   version = "0.9.0";
13   format = "setuptools";
15   disabled = pythonOlder "3.7";
17   src = fetchFromGitHub {
18     owner = "inveniosoftware";
19     repo = pname;
20     rev = "v${version}";
21     hash = "sha256-lQyPs3lQWtsvNPuvvwJUTDzrFaOX5uwGuRHe3yWUheU=";
22   };
24   nativeBuildInputs = [ setuptools-scm ];
26   nativeCheckInputs = [ pytestCheckHook ];
28   postPatch = ''
29     substituteInPlace setup.py \
30       --replace "'pytest-runner>=2.7'," ""
31     substituteInPlace pytest.ini \
32       --replace ' --isort --pydocstyle --pycodestyle --doctest-glob="*.rst" --doctest-modules --cov=dictdiffer --cov-report=term-missing' ""
33   '';
35   pythonImportsCheck = [ "dictdiffer" ];
37   meta = with lib; {
38     description = "Module to diff and patch dictionaries";
39     homepage = "https://github.com/inveniosoftware/dictdiffer";
40     license = licenses.mit;
41     maintainers = with maintainers; [ fab ];
42   };