python3Packages.hjson: fix wrapper

And add a basic import test with the standard hook.
This commit is contained in:
Benjamin Hipple 2020-11-29 16:00:27 -05:00 committed by Sandro Jäckel
parent 752b6a95db
commit 60d8c843d6
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -1,6 +1,8 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, pythonImportsCheckHook
, makeWrapper
}:
buildPythonPackage rec {
@ -15,6 +17,15 @@ buildPythonPackage rec {
sha256 = "1jc7j790rcqnhbrfj4lhnz3f6768dc55aij840wmx16jylfqpc2n";
};
nativeBuildInputs = [ makeWrapper pythonImportsCheckHook ];
pythonImportsCheck = [ "hjson" ];
postInstall = ''
rm $out/bin/hjson.cmd
wrapProgram $out/bin/hjson --set PYTHONPATH "$PYTHONPATH"
'';
meta = with stdenv.lib; {
description = "A user interface for JSON";
homepage = "https://github.com/hjson/hjson-py";