567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{
|
|
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";
|
|
tag = "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 = {
|
|
description = "User interface for JSON";
|
|
homepage = "https://github.com/hjson/hjson-py";
|
|
changelog = "https://github.com/hjson/hjson-py/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
mainProgram = "hjson";
|
|
};
|
|
}
|