Use lib.meta.availableOn for optional Valgrind dependency
This commit is contained in:
parent
afe09e41df
commit
1f007dd009
|
@ -21,7 +21,7 @@
|
||||||
, enableLdap ? true, openldap
|
, enableLdap ? true, openldap
|
||||||
, enableNetworkManager ? true, networkmanager
|
, enableNetworkManager ? true, networkmanager
|
||||||
, enableLibetpan ? true, libetpan
|
, enableLibetpan ? true, libetpan
|
||||||
, enableValgrind ? true, valgrind
|
, enableValgrind ? !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind, valgrind
|
||||||
, enableSvg ? true, librsvg
|
, enableSvg ? true, librsvg
|
||||||
|
|
||||||
# Configure claws-mail's plugins
|
# Configure claws-mail's plugins
|
||||||
|
|
|
@ -28,7 +28,7 @@ let
|
||||||
, embedSupport ? false
|
, embedSupport ? false
|
||||||
, ipv6Support ? true
|
, ipv6Support ? true
|
||||||
, systemdSupport ? stdenv.isLinux
|
, systemdSupport ? stdenv.isLinux
|
||||||
, valgrindSupport ? !stdenv.isDarwin
|
, valgrindSupport ? !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind
|
||||||
, ztsSupport ? apxs2Support
|
, ztsSupport ? apxs2Support
|
||||||
}@args:
|
}@args:
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,9 @@
|
||||||
, publicsuffix-list
|
, publicsuffix-list
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
|
enableValgrindTests = !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind;
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
pname = "libpsl";
|
pname = "libpsl";
|
||||||
version = "0.21.0";
|
version = "0.21.0";
|
||||||
|
|
||||||
|
@ -32,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||||
pkg-config
|
pkg-config
|
||||||
python3
|
python3
|
||||||
libxslt
|
libxslt
|
||||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
] ++ lib.optionals enableValgrindTests [
|
||||||
valgrind
|
valgrind
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -60,7 +62,7 @@ stdenv.mkDerivation rec {
|
||||||
"--with-psl-distfile=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
|
"--with-psl-distfile=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
|
||||||
"--with-psl-file=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
|
"--with-psl-file=${publicsuffix-list}/share/publicsuffix/public_suffix_list.dat"
|
||||||
"--with-psl-testfile=${publicsuffix-list}/share/publicsuffix/test_psl.txt"
|
"--with-psl-testfile=${publicsuffix-list}/share/publicsuffix/test_psl.txt"
|
||||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
] ++ lib.optionals enableValgrindTests [
|
||||||
"--enable-valgrind-tests"
|
"--enable-valgrind-tests"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
, vulkanDrivers ? ["auto"]
|
, vulkanDrivers ? ["auto"]
|
||||||
, eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ]
|
, eglPlatforms ? [ "x11" ] ++ lib.optionals stdenv.isLinux [ "wayland" ]
|
||||||
, OpenGL, Xplugin
|
, OpenGL, Xplugin
|
||||||
, withValgrind ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32, valgrind-light
|
, withValgrind ? !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind-light, valgrind-light
|
||||||
, enableGalliumNine ? stdenv.isLinux
|
, enableGalliumNine ? stdenv.isLinux
|
||||||
, enableOSMesa ? stdenv.isLinux
|
, enableOSMesa ? stdenv.isLinux
|
||||||
}:
|
}:
|
||||||
|
|
|
@ -364,7 +364,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
# oci8 (7.4, 7.3, 7.2)
|
# oci8 (7.4, 7.3, 7.2)
|
||||||
# odbc (7.4, 7.3, 7.2)
|
# odbc (7.4, 7.3, 7.2)
|
||||||
{ name = "opcache";
|
{ name = "opcache";
|
||||||
buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.isDarwin && lib.versionAtLeast php.version "8.0") [
|
buildInputs = [ pcre2 ] ++ lib.optionals (lib.versionAtLeast php.version "8.0" && !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind) [
|
||||||
valgrind.dev
|
valgrind.dev
|
||||||
];
|
];
|
||||||
patches = lib.optionals (lib.versionOlder php.version "7.4") [
|
patches = lib.optionals (lib.versionOlder php.version "7.4") [
|
||||||
|
|
Loading…
Reference in a new issue