blob: 46ae9f518a34d70177685774418db8a63d2d2f00 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
makeWrapper,
pytestCheckHook,
python,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "hjson";
version = "3.0.2";
pyproject = true;
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "hjson";
repo = "hjson-py";
rev = "refs/tags/v${version}";
hash = "sha256-VrCLHfXShF45IEhGVQpryBzjxreQEunyghazDNKRh8k=";
};
build-system = [ setuptools ];
nativeBuildInputs = [ makeWrapper ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "hjson" ];
postInstall = ''
rm $out/bin/hjson.cmd
wrapProgram $out/bin/hjson \
--set PYTHONPATH "$PYTHONPATH" \
--prefix PATH : ${lib.makeBinPath [ python ]}
'';
disabledTestPaths = [
# AttributeError: b'/build/source/hjson/tool.py:14: Deprecati[151 chars]ools' != b''
"hjson/tests/test_tool.py"
];
meta = with lib; {
description = "A user interface for JSON";
homepage = "https://github.com/hjson/hjson-py";
changelog = "https://github.com/hjson/hjson-py/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ bhipple ];
mainProgram = "hjson";
};
}
|