mirror of
https://github.com/hyprwm/hyprutils.git
synced 2025-12-20 02:20:16 +01:00
Nix: always test in debug mode
This commit is contained in:
parent
1454845751
commit
31f29957df
2 changed files with 6 additions and 10 deletions
|
|
@ -7,7 +7,6 @@
|
|||
gtest,
|
||||
pixman,
|
||||
version ? "git",
|
||||
doCheck ? false,
|
||||
debug ? false,
|
||||
# whether to use the mold linker
|
||||
# disable this for older machines without SSE4_2 and AVX2 support
|
||||
|
|
@ -15,9 +14,8 @@
|
|||
}:
|
||||
let
|
||||
inherit (builtins) foldl';
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.lists) flatten optional;
|
||||
inherit (lib.strings) cmakeBool optionalString;
|
||||
inherit (lib.strings) optionalString;
|
||||
|
||||
adapters = flatten [
|
||||
(lib.optional withMold stdenvAdapters.useMoldLinker)
|
||||
|
|
@ -28,16 +26,18 @@ let
|
|||
in
|
||||
customStdenv.mkDerivation {
|
||||
pname = "hyprutils" + optionalString debug "-debug";
|
||||
inherit version doCheck;
|
||||
inherit version;
|
||||
src = ../.;
|
||||
|
||||
doCheck = debug;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = flatten [
|
||||
(optional doCheck gtest)
|
||||
(optional debug gtest)
|
||||
pixman
|
||||
];
|
||||
|
||||
|
|
@ -48,10 +48,6 @@ customStdenv.mkDerivation {
|
|||
|
||||
cmakeBuildType = if debug then "Debug" else "RelWithDebInfo";
|
||||
|
||||
cmakeFlags = mapAttrsToList cmakeBool {
|
||||
"DISABLE_TESTING" = !doCheck;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/hyprwm/hyprutils";
|
||||
description = "Small C++ library for utilities used across the Hypr* ecosystem";
|
||||
|
|
|
|||
|
|
@ -18,6 +18,6 @@ in {
|
|||
inherit version;
|
||||
};
|
||||
hyprutils-debug = final.hyprutils.override {debug = true;};
|
||||
hyprutils-with-tests = final.hyprutils.override {doCheck = true;};
|
||||
hyprutils-with-tests = final.hyprutils-debug;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue