1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonImportsCheckHook
5, makeWrapper
6}:
7
8buildPythonPackage rec {
9 pname = "hjson";
10 version = "3.0.2";
11
12 # N.B. pypi src tarball does not have tests
13 src = fetchFromGitHub {
14 owner = "hjson";
15 repo = "hjson-py";
16 rev = "v${version}";
17 sha256 = "1jc7j790rcqnhbrfj4lhnz3f6768dc55aij840wmx16jylfqpc2n";
18 };
19
20 nativeBuildInputs = [ makeWrapper pythonImportsCheckHook ];
21
22 pythonImportsCheck = [ "hjson" ];
23
24 postInstall = ''
25 rm $out/bin/hjson.cmd
26 wrapProgram $out/bin/hjson --set PYTHONPATH "$PYTHONPATH"
27 '';
28
29 meta = with lib; {
30 description = "A user interface for JSON";
31 homepage = "https://github.com/hjson/hjson-py";
32 license = licenses.mit;
33 maintainers = with maintainers; [ bhipple ];
34 };
35}