From 6f2890041ee795c807c68905c603f78007a701bf Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 19 Feb 2021 18:16:19 +0100 Subject: [PATCH] perlPackages.GlibObjectIntrospection: fix test and unmark as broken The patched GIR path was referring to the not-yet built package. Note that the package was working fine and that only the tests were failing due to some GIR path issues. It shouldn't have been marked as broken in the first place. GitHub: follows #68115 GitHub: closes #68116 --- pkgs/top-level/perl-packages.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 3ac7695f4418..66e869dd873f 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -8742,13 +8742,20 @@ let url = "mirror://cpan/authors/id/X/XA/XAOC/Glib-Object-Introspection-0.049.tar.gz"; sha256 = "0mxg6pz8qfyipw0ypr54alij0c4adzg94f62702b2a6hkp5jhij6"; }; - checkInputs = [ pkgs.cairo ]; + checkInputs = [ pkgs.cairo CairoGObject ]; propagatedBuildInputs = [ pkgs.gobject-introspection Glib ]; + preCheck = '' + # Our gobject-introspection patches make the shared library paths absolute + # in the GIR files. When running tests, the library is not yet installed, + # though, so we need to replace the absolute path with a local one during build. + # We are using a symlink that we will delete after the execution of the tests. + mkdir -p $out/lib + ln -s $PWD/build/*.so $out/lib/ + ''; + postCheck = '' + rm -r $out/lib + ''; meta = { - broken = true; # TODO: tests failing because "failed to load libregress.so" - # see https://github.com/NixOS/nixpkgs/pull/68115 - # and https://github.com/NixOS/nixpkgs/issues/68116 - # adding pkgs.gnome3.gjs does not fix it description = "Dynamically create Perl language bindings"; license = lib.licenses.lgpl2Plus; };