graphene: only wrap introspection.py if present

appears to only be installed on linux
This commit is contained in:
Robert Scott 2021-11-11 13:24:36 +00:00
parent ede17adc10
commit 324eeb148e

View File

@ -67,9 +67,13 @@ stdenv.mkDerivation rec {
PATH=${python3.withPackages (pp: [ pp.pygobject3 pp.tappy ])}/bin:$PATH patchShebangs tests/introspection.py
'';
postFixup = ''
wrapProgram "${placeholder "installedTests"}/libexec/installed-tests/graphene-1.0/introspection.py" \
--prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0"
postFixup = let
introspectionPy = "${placeholder "installedTests"}/libexec/installed-tests/graphene-1.0/introspection.py";
in ''
if [ -x '${introspectionPy}' ] ; then
wrapProgram '${introspectionPy}' \
--prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0"
fi
'';
passthru = {