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,
|
gtest,
|
||||||
pixman,
|
pixman,
|
||||||
version ? "git",
|
version ? "git",
|
||||||
doCheck ? false,
|
|
||||||
debug ? false,
|
debug ? false,
|
||||||
# whether to use the mold linker
|
# whether to use the mold linker
|
||||||
# disable this for older machines without SSE4_2 and AVX2 support
|
# disable this for older machines without SSE4_2 and AVX2 support
|
||||||
|
|
@ -15,9 +14,8 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (builtins) foldl';
|
inherit (builtins) foldl';
|
||||||
inherit (lib.attrsets) mapAttrsToList;
|
|
||||||
inherit (lib.lists) flatten optional;
|
inherit (lib.lists) flatten optional;
|
||||||
inherit (lib.strings) cmakeBool optionalString;
|
inherit (lib.strings) optionalString;
|
||||||
|
|
||||||
adapters = flatten [
|
adapters = flatten [
|
||||||
(lib.optional withMold stdenvAdapters.useMoldLinker)
|
(lib.optional withMold stdenvAdapters.useMoldLinker)
|
||||||
|
|
@ -28,16 +26,18 @@ let
|
||||||
in
|
in
|
||||||
customStdenv.mkDerivation {
|
customStdenv.mkDerivation {
|
||||||
pname = "hyprutils" + optionalString debug "-debug";
|
pname = "hyprutils" + optionalString debug "-debug";
|
||||||
inherit version doCheck;
|
inherit version;
|
||||||
src = ../.;
|
src = ../.;
|
||||||
|
|
||||||
|
doCheck = debug;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
pkg-config
|
pkg-config
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = flatten [
|
buildInputs = flatten [
|
||||||
(optional doCheck gtest)
|
(optional debug gtest)
|
||||||
pixman
|
pixman
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -48,10 +48,6 @@ customStdenv.mkDerivation {
|
||||||
|
|
||||||
cmakeBuildType = if debug then "Debug" else "RelWithDebInfo";
|
cmakeBuildType = if debug then "Debug" else "RelWithDebInfo";
|
||||||
|
|
||||||
cmakeFlags = mapAttrsToList cmakeBool {
|
|
||||||
"DISABLE_TESTING" = !doCheck;
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/hyprwm/hyprutils";
|
homepage = "https://github.com/hyprwm/hyprutils";
|
||||||
description = "Small C++ library for utilities used across the Hypr* ecosystem";
|
description = "Small C++ library for utilities used across the Hypr* ecosystem";
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,6 @@ in {
|
||||||
inherit version;
|
inherit version;
|
||||||
};
|
};
|
||||||
hyprutils-debug = final.hyprutils.override {debug = true;};
|
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