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