Merge pull request #331116 from pbsds/fix-finalattrs-docheck-1722356587
treewide: finalAttrs.doCheck -> finalAttrs.finalPackage.doCheck
This commit is contained in:
commit
b926e6ece9
@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# but setting it to shared works even in pkgsStatic
|
||||
"-Ddefault_library=shared"
|
||||
|
||||
(lib.strings.mesonEnable "testing" finalAttrs.doCheck)
|
||||
(lib.strings.mesonEnable "testing" finalAttrs.finalPackage.doCheck)
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ python3 ];
|
||||
|
@ -95,7 +95,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DENABLE_TESTS=${lib.boolToString finalAttrs.doCheck}"
|
||||
"-DENABLE_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
|
||||
"-DGSETTINGS_LOCALINSTALL=ON"
|
||||
"-DGSETTINGS_COMPILE=ON"
|
||||
];
|
||||
|
@ -30,10 +30,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
jansson
|
||||
openssl
|
||||
cmocka
|
||||
] ++ lib.optionals finalAttrs.doCheck [ libpcap ];
|
||||
] ++ lib.optionals finalAttrs.finalPackage.doCheck [ libpcap ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBNGBLASTER_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
"-DBNGBLASTER_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
"-DBNGBLASTER_VERSION=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
|
@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail " DIRECTORY ." " DIRECTORY . EXCLUDE_FROM_ALL"
|
||||
''
|
||||
+ lib.optionalString finalAttrs.doCheck ''
|
||||
+ lib.optionalString finalAttrs.finalPackage.doCheck ''
|
||||
# Required for tests.
|
||||
cp ${lib.getDev catch2}/include/catch2/catch.hpp test/
|
||||
'';
|
||||
|
@ -149,7 +149,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
checkInputs = [ kdePackages.qtdeclarative ];
|
||||
|
||||
postConfigure = lib.optionalString finalAttrs.doCheck ''
|
||||
postConfigure = lib.optionalString finalAttrs.finalPackage.doCheck ''
|
||||
ln -s ${testData} $cmakeDir/test-data
|
||||
'';
|
||||
|
||||
|
@ -69,7 +69,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
mkdir -p $doc/share/doc
|
||||
cp -a doc $doc/share/doc/iwd
|
||||
cp -a README AUTHORS TODO $doc/share/doc/iwd
|
||||
'' + lib.optionalString finalAttrs.doCheck ''
|
||||
'' + lib.optionalString finalAttrs.finalPackage.doCheck ''
|
||||
mkdir -p $test/bin
|
||||
cp -a test/* $test/bin/
|
||||
'';
|
||||
|
@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_TESTING" (finalAttrs.doCheck or false))
|
||||
(lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
|
||||
# we need INSTALL_FHS to be true as the various artifacts are otherwise just dumped in the root
|
||||
# of $out and the fixupPhase cleans things up anyway
|
||||
(lib.cmakeBool "INSTALL_FHS" true)
|
||||
|
@ -98,8 +98,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(pluginName: "-DPLUGIN_${lib.toUpper pluginName}=${lib.toUpper (lib.boolToString finalAttrs.passthru.enablePluginStatus.${pluginName})}")
|
||||
(lib.attrNames finalAttrs.passthru.enablePluginStatus)
|
||||
)
|
||||
++ [ "-DSKIP_TESTS=${lib.toUpper (lib.boolToString (!finalAttrs.doCheck))}" ]
|
||||
++ lib.optionals finalAttrs.doCheck [ "-DGTEST_INCLUDE_DIR=${gtest.dev}/include" ]
|
||||
++ [ "-DSKIP_TESTS=${lib.toUpper (lib.boolToString (!finalAttrs.finalPackage.doCheck))}" ]
|
||||
++ lib.optionals finalAttrs.finalPackage.doCheck [ "-DGTEST_INCLUDE_DIR=${gtest.dev}/include" ]
|
||||
++ lib.optionals finalAttrs.passthru.enablePluginStatus.http [ "-DCRYPTOPP_INCLUDE_DIRS=${cryptopp.dev}/include/cryptopp" ]
|
||||
++ lib.optionals finalAttrs.passthru.enablePluginStatus.xrootd [ "-DXROOTD_INCLUDE_DIR=${xrootd.dev}/include/xrootd" ]
|
||||
;
|
||||
|
@ -26,10 +26,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ boost libcpr ]
|
||||
++ lib.optionals finalAttrs.doCheck [ catch2_3 trompeloeil ];
|
||||
++ lib.optionals finalAttrs.finalPackage.doCheck [ catch2_3 trompeloeil ];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "INFLUXCXX_TESTING" finalAttrs.doCheck)
|
||||
(lib.cmakeBool "INFLUXCXX_TESTING" finalAttrs.finalPackage.doCheck)
|
||||
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" "-E;BoostSupportTest") # requires network access
|
||||
];
|
||||
|
||||
|
@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DLIBDICT_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
"-DLIBDICT_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
"-DLIBDICT_SHARED=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
||||
];
|
||||
|
||||
|
@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs:
|
||||
(nvim-lpeg-dylib ps)
|
||||
luabitop
|
||||
mpack
|
||||
] ++ lib.optionals finalAttrs.doCheck [
|
||||
] ++ lib.optionals finalAttrs.finalPackage.doCheck [
|
||||
luv
|
||||
coxpcall
|
||||
busted
|
||||
@ -105,7 +105,7 @@ in {
|
||||
tree-sitter
|
||||
unibilium
|
||||
] ++ lib.optionals stdenv.isDarwin [ libiconv CoreServices ]
|
||||
++ lib.optionals finalAttrs.doCheck [ glibcLocales procps ]
|
||||
++ lib.optionals finalAttrs.finalPackage.doCheck [ glibcLocales procps ]
|
||||
;
|
||||
|
||||
doCheck = false;
|
||||
|
@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DPHMAP_BUILD_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
"-DPHMAP_BUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
"-DPHMAP_BUILD_EXAMPLES=OFF"
|
||||
];
|
||||
|
||||
|
@ -63,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
substituteInPlace src/app/webbrowser/morph-browser.desktop.in.in \
|
||||
--replace 'Icon=@CMAKE_INSTALL_FULL_DATADIR@/morph-browser/morph-browser.svg' 'Icon=/run/current-system/sw/share/icons/hicolor/scalable/apps/morph-browser.svg' \
|
||||
--replace 'X-Lomiri-Splash-Image=@CMAKE_INSTALL_FULL_DATADIR@/morph-browser/morph-browser-splash.svg' 'X-Lomiri-Splash-Image=lomiri-app-launch/splash/morph-browser.svg'
|
||||
'' + lib.optionalString (!finalAttrs.doCheck) ''
|
||||
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace 'add_subdirectory(tests)' ""
|
||||
'';
|
||||
|
@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
substituteInPlace src/core/trust/terminal_agent.h \
|
||||
--replace-fail '/bin/whiptail' '${lib.getExe' newt "whiptail"}'
|
||||
'' + lib.optionalString (!finalAttrs.doCheck) ''
|
||||
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail 'add_subdirectory(tests)' ""
|
||||
'';
|
||||
|
@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# For our automatic pkg-config output patcher to work, prefix must be used here
|
||||
substituteInPlace libu1db-qt.pc.in \
|
||||
--replace-fail 'libdir=''${exec_prefix}/lib' 'libdir=''${prefix}/lib'
|
||||
'' + lib.optionalString (!finalAttrs.doCheck) ''
|
||||
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
|
||||
# Other locations add dependencies to custom check target from tests
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail 'add_subdirectory(tests)' 'add_custom_target(check COMMAND "echo check dummy")'
|
||||
|
@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" '${placeholder "out"}/${qtbase.qtQmlPrefix}'
|
||||
'' + lib.optionalString (!finalAttrs.doCheck) ''
|
||||
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
|
||||
sed -i CMakeLists.txt \
|
||||
-e '/add_subdirectory(tests)/d'
|
||||
'';
|
||||
|
@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
substituteInPlace data/biometryd.pc.in \
|
||||
--replace-fail 'libdir=''${exec_prefix}' 'libdir=''${prefix}' \
|
||||
--replace-fail 'includedir=''${exec_prefix}' 'includedir=''${prefix}' \
|
||||
'' + lib.optionalString (!finalAttrs.doCheck) ''
|
||||
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
|
||||
sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
|
||||
'';
|
||||
|
||||
|
@ -96,7 +96,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "GSETTINGS_LOCALINSTALL" true)
|
||||
(lib.cmakeBool "GSETTINGS_COMPILE" true)
|
||||
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.doCheck)
|
||||
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
|
||||
(lib.cmakeBool "ENABLE_UBUNTU_COMPAT" true) # just in case something needs it
|
||||
(lib.cmakeBool "BUILD_DOC" true) # lacks QML docs, needs qdoc: https://github.com/NixOS/nixpkgs/pull/245379
|
||||
];
|
||||
|
@ -124,7 +124,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
doxygen
|
||||
gdk-pixbuf # setup hook
|
||||
pkg-config
|
||||
(python3.withPackages (ps: with ps; lib.optionals finalAttrs.doCheck [
|
||||
(python3.withPackages (ps: with ps; lib.optionals finalAttrs.finalPackage.doCheck [
|
||||
python-dbusmock
|
||||
tornado
|
||||
]))
|
||||
|
@ -86,7 +86,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DENABLE_TESTS=${lib.boolToString finalAttrs.doCheck}"
|
||||
"-DENABLE_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
|
||||
];
|
||||
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# Don't install test binary
|
||||
sed -i tests/tst_plugin.pro \
|
||||
-e '/TARGET = tst_plugin/a INSTALLS -= target'
|
||||
'' + lib.optionalString (!finalAttrs.doCheck) ''
|
||||
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
|
||||
sed -i accounts-qml-module.pro -e '/tests/d'
|
||||
'';
|
||||
|
||||
|
@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(cmakeBool "BOX2D_BUILD_UNIT_TESTS" finalAttrs.doCheck)
|
||||
(cmakeBool "BOX2D_BUILD_UNIT_TESTS" finalAttrs.finalPackage.doCheck)
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
|
@ -78,7 +78,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
mesonFlags = [
|
||||
"-Ddocs=true"
|
||||
"-Dtelepathy_backend=${lib.boolToString telepathySupport}"
|
||||
"-Dtests=${lib.boolToString (finalAttrs.doCheck && stdenv.isLinux)}"
|
||||
"-Dtests=${lib.boolToString (finalAttrs.finalPackage.doCheck && stdenv.isLinux)}"
|
||||
];
|
||||
|
||||
# backends/eds/lib/libfolks-eds.so.26.0.0.p/edsf-persona-store.c:10697:4:
|
||||
|
@ -137,7 +137,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
doCheck = false; # fails with "ModuleNotFoundError: No module named 'gi'"
|
||||
doInstallCheck = finalAttrs.doCheck;
|
||||
doInstallCheck = finalAttrs.finalPackage.doCheck;
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
|
@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-R069LuOmjCFj7dHXiMjuK7WUupk5+dVd8IDKY/wBn2o=";
|
||||
};
|
||||
|
||||
patches = lib.optionals finalAttrs.doCheck [
|
||||
patches = lib.optionals finalAttrs.finalPackage.doCheck [
|
||||
(substituteAll {
|
||||
# Do not let cmake's fetchContent download unity
|
||||
src = ./remove-fetchcontent-usage.patch;
|
||||
@ -48,9 +48,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmake
|
||||
doxygen
|
||||
validatePkgConfig
|
||||
] ++ lib.optionals finalAttrs.doCheck [ ruby ];
|
||||
] ++ lib.optionals finalAttrs.finalPackage.doCheck [ ruby ];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_TESTING=${if finalAttrs.doCheck then "ON" else "OFF"}" ];
|
||||
cmakeFlags = [ "-DBUILD_TESTING=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}" ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -54,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
mesonFlags = [
|
||||
"-Dgtk_doc=true"
|
||||
] ++ lib.optionals (!finalAttrs.doCheck) [
|
||||
] ++ lib.optionals (!finalAttrs.finalPackage.doCheck) [
|
||||
"-Dtests=false"
|
||||
];
|
||||
|
||||
|
@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
cmakeFlags = [
|
||||
# See https://github.com/asmaloney/libE57Format/blob/9372bdea8db2cc0c032a08f6d655a53833d484b8/test/README.md
|
||||
(if finalAttrs.doCheck
|
||||
(if finalAttrs.finalPackage.doCheck
|
||||
then "-DE57_TEST_DATA_PATH=${finalAttrs.libE57Format-test-data_src}"
|
||||
else "-DE57_BUILD_TEST=OFF"
|
||||
)
|
||||
|
@ -59,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
mesonFlags = [
|
||||
"-Degl=${if (x11Support && !stdenv.isDarwin) then "yes" else "no"}"
|
||||
"-Dglx=${if x11Support then "yes" else "no"}"
|
||||
"-Dtests=${lib.boolToString finalAttrs.doCheck}"
|
||||
"-Dtests=${lib.boolToString finalAttrs.finalPackage.doCheck}"
|
||||
"-Dx11=${lib.boolToString x11Support}"
|
||||
];
|
||||
|
||||
|
@ -66,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "disable32bit" true)
|
||||
(lib.cmakeBool "BUILD_TESTS" finalAttrs.doCheck)
|
||||
(lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck)
|
||||
];
|
||||
|
||||
# we turn on additional warnings due to hardening
|
||||
|
@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeFeature "QML_BOX2D_LIBRARY" "${qmlbox2d}/${qtbase.qtQmlPrefix}/Box2D.2.1")
|
||||
(lib.cmakeBool "BUILD_TESTING" (finalAttrs.doCheck or false))
|
||||
(lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake extra-cmake-modules gettext ninja qttools wrapQtAppsHook ];
|
||||
|
@ -17,7 +17,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals finalAttrs.doCheck [
|
||||
buildInputs = lib.optionals finalAttrs.finalPackage.doCheck [
|
||||
valgrind
|
||||
];
|
||||
|
||||
|
@ -76,7 +76,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
value = "${perl.pkgs.DBDSQLite}/${perl.libPrefix}";
|
||||
})
|
||||
] ++ lib.optionals atLeast223 [
|
||||
(lib.mesonEnable "tests" finalAttrs.doCheck)
|
||||
(lib.mesonEnable "tests" finalAttrs.finalPackage.doCheck)
|
||||
];
|
||||
|
||||
preConfigure = "export NIX_STATE_DIR=$TMPDIR";
|
||||
|
@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBKCRACK_BUILD_TESTING=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
"-DBKCRACK_BUILD_TESTING=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
|
Loading…
Reference in New Issue
Block a user