diff --git a/perl/default.nix b/perl/default.nix index 742263067..dc0de1b2b 100644 --- a/perl/default.nix +++ b/perl/default.nix @@ -57,5 +57,10 @@ perl.pkgs.toPerlModule ( postUnpack = "sourceRoot=$sourceRoot/perl"; passthru = { inherit perl; }; + + doInstallCheck = true; + installCheckPhase = '' + env PERL5LIB="$PERL5LIB:$out/${perl.libPrefix}" perl -e 'use Nix::Store' + ''; } ) diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs index a1f72cf7c..dfdd64d28 100644 --- a/perl/lib/Nix/Store.xs +++ b/perl/lib/Nix/Store.xs @@ -5,14 +5,12 @@ // can i make it any more obvious? #include "lix/libutil/result.hh" -// Without this, Perl defines NDEBUG, which makes the assertions -// ineffective and might break Lix -#define DEBUGGING - #include "EXTERN.h" #include "perl.h" #include "XSUB.h" +#undef NDEBUG + /* Prevent a clash between some Perl and libstdc++ macros. */ #undef do_open #undef do_close