From a1c5f4e2205cff910b849c19ab6218241582d574 Mon Sep 17 00:00:00 2001 From: Matthias Devlamynck Date: Sun, 6 Jun 2021 16:22:23 +0200 Subject: [PATCH] graphene: fix nixos test The file introspection.py was missing in the installed-tests files and it requires python3 to run. --- ...1-meson-add-options-for-tests-installation-dirs.patch | 9 +++++++-- pkgs/development/libraries/graphene/default.nix | 8 ++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/graphene/0001-meson-add-options-for-tests-installation-dirs.patch b/pkgs/development/libraries/graphene/0001-meson-add-options-for-tests-installation-dirs.patch index a82a06d427b..9111217ea08 100644 --- a/pkgs/development/libraries/graphene/0001-meson-add-options-for-tests-installation-dirs.patch +++ b/pkgs/development/libraries/graphene/0001-meson-add-options-for-tests-installation-dirs.patch @@ -23,7 +23,7 @@ index b9a2fb5..4b8629f 100644 + value: '', + description: 'Installation directory for binary files in tests') diff --git a/tests/meson.build b/tests/meson.build -index 77281f5..c4c7fac 100644 +index 77281f5..7522456 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -21,8 +21,17 @@ unit_tests = [ @@ -71,7 +71,12 @@ index 77281f5..c4c7fac 100644 ), env: ['MUTEST_OUTPUT=tap'], protocol: 'tap', -@@ -70,13 +79,13 @@ if build_gir and host_system == 'linux' and not meson.is_cross_build() +@@ -66,17 +75,18 @@ endif + if build_gir and host_system == 'linux' and not meson.is_cross_build() + foreach unit: ['introspection.py'] + wrapper = '@0@.test'.format(unit) ++ install_data(unit, install_dir: test_bindir) + custom_target(wrapper, output: wrapper, command: [ gen_installed_test, diff --git a/pkgs/development/libraries/graphene/default.nix b/pkgs/development/libraries/graphene/default.nix index a9c647268ac..a8e0d117982 100644 --- a/pkgs/development/libraries/graphene/default.nix +++ b/pkgs/development/libraries/graphene/default.nix @@ -12,6 +12,7 @@ , docbook_xsl , docbook_xml_dtd_43 , gobject-introspection +, makeWrapper }: stdenv.mkDerivation rec { @@ -41,6 +42,7 @@ stdenv.mkDerivation rec { pkg-config gobject-introspection python3 + makeWrapper ]; buildInputs = [ @@ -62,6 +64,12 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs tests/gen-installed-test.py + 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" ''; passthru = {