From 324eeb148e80a9b37659d1f3e20828839159365d Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Thu, 11 Nov 2021 13:24:36 +0000 Subject: [PATCH] graphene: only wrap introspection.py if present appears to only be installed on linux --- pkgs/development/libraries/graphene/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/graphene/default.nix b/pkgs/development/libraries/graphene/default.nix index a8e0d1179826..a0bfc6f017ad 100644 --- a/pkgs/development/libraries/graphene/default.nix +++ b/pkgs/development/libraries/graphene/default.nix @@ -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 = {