about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/jsonschema/default.nix
blob: db6be9f99182d84eefb366d38bc4b7e9e116c233 (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
{ stdenv, buildPythonPackage, fetchPypi, python
, nose, mock, vcversioner, functools32 }:

buildPythonPackage rec {
  pname = "jsonschema";
  version = "2.6.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg";
  };

  checkInputs = [ nose mock vcversioner ];
  propagatedBuildInputs = [ functools32 ];

  postPatch = ''
    substituteInPlace jsonschema/tests/test_jsonschema_test_suite.py \
      --replace "python" "${python.pythonForBuild.interpreter}"
  '';

  checkPhase = ''
    nosetests
  '';

  meta = with stdenv.lib; {
    homepage = https://github.com/Julian/jsonschema;
    description = "An implementation of JSON Schema validation for Python";
    license = licenses.mit;
    maintainers = with maintainers; [ domenkozar ];
  };
}