Merge pull request #125959 from mdevlamynck/fix-test-graphene

graphene: fix nixos test

authored by

Jan Tojnar and committed by
GitHub
1470b9bc 7e89fb12

+15 -2
+7 -2
pkgs/development/libraries/graphene/0001-meson-add-options-for-tests-installation-dirs.patch
··· 23 23 + value: '', 24 24 + description: 'Installation directory for binary files in tests') 25 25 diff --git a/tests/meson.build b/tests/meson.build 26 - index 77281f5..c4c7fac 100644 26 + index 77281f5..7522456 100644 27 27 --- a/tests/meson.build 28 28 +++ b/tests/meson.build 29 29 @@ -21,8 +21,17 @@ unit_tests = [ ··· 71 71 ), 72 72 env: ['MUTEST_OUTPUT=tap'], 73 73 protocol: 'tap', 74 - @@ -70,13 +79,13 @@ if build_gir and host_system == 'linux' and not meson.is_cross_build() 74 + @@ -66,17 +75,18 @@ endif 75 + if build_gir and host_system == 'linux' and not meson.is_cross_build() 76 + foreach unit: ['introspection.py'] 77 + wrapper = '@0@.test'.format(unit) 78 + + install_data(unit, install_dir: test_bindir) 79 + custom_target(wrapper, 75 80 output: wrapper, 76 81 command: [ 77 82 gen_installed_test,
+8
pkgs/development/libraries/graphene/default.nix
··· 12 12 , docbook_xsl 13 13 , docbook_xml_dtd_43 14 14 , gobject-introspection 15 + , makeWrapper 15 16 }: 16 17 17 18 stdenv.mkDerivation rec { ··· 41 42 pkg-config 42 43 gobject-introspection 43 44 python3 45 + makeWrapper 44 46 ]; 45 47 46 48 buildInputs = [ ··· 62 64 63 65 postPatch = '' 64 66 patchShebangs tests/gen-installed-test.py 67 + PATH=${python3.withPackages (pp: [ pp.pygobject3 pp.tappy ])}/bin:$PATH patchShebangs tests/introspection.py 68 + ''; 69 + 70 + postFixup = '' 71 + wrapProgram "${placeholder "installedTests"}/libexec/installed-tests/graphene-1.0/introspection.py" \ 72 + --prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0" 65 73 ''; 66 74 67 75 passthru = {