qrencode: move test into passthru

This is needed to break a dependency for systemd.
This commit is contained in:
nikstur 2024-01-16 22:16:13 +01:00
parent 4fe3cac67d
commit b7420a771c

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl, pkg-config, SDL2, libpng, libiconv, libobjc }:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: rec {
pname = "qrencode";
version = "4.1.1";
@ -16,13 +16,9 @@ stdenv.mkDerivation rec {
buildInputs = [ libiconv libpng ]
++ lib.optionals stdenv.isDarwin [ libobjc ];
configureFlags = [
"--with-tests"
];
nativeCheckInputs = [ SDL2 ];
doCheck = true;
doCheck = false;
checkPhase = ''
runHook preCheck
@ -34,6 +30,11 @@ stdenv.mkDerivation rec {
runHook postCheck
'';
passthru.tests = finalAttrs.finalPackage.overrideAttrs (_: {
configureFlags = [ "--with-tests" ];
doCheck = true;
});
meta = with lib; {
homepage = "https://fukuchi.org/works/qrencode/";
description = "C library for encoding data in a QR Code symbol";
@ -47,4 +48,4 @@ stdenv.mkDerivation rec {
platforms = platforms.all;
mainProgram = "qrencode";
};
}
})