gpgme: respect the doCheck parameter

The current `gpgme` expression ignores the `doCheck` parameter because
upstream's `Makefile` runs the tests automatically as part of the
`buildPhase`.  Let's run the tests as part of the `checkPhase` iff
`doCheck` is set, like the rest of nixpkgs' packages.

In particular, with this commit, `pkgsCross.*.gpgme` will no longer
attempt to run the tests (tests are not supposed to be run when
host!=build).
This commit is contained in:
Adam Joseph 2022-08-18 07:49:15 +00:00 committed by GitHub
parent d35b2c4eeb
commit c864ea9d03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,8 +110,13 @@ stdenv.mkDerivation rec {
++ lib.optional stdenv.hostPlatform.is32bit "-D_FILE_OFFSET_BITS=64"
);
# prevent tests from being run during the buildPhase
makeFlags = [ "tests=" ];
doCheck = true;
checkFlags = [ "-C" "tests" ];
passthru.tests = {
python = python3.pkgs.gpgme;
qt = libsForQt5.qgpgme;