mirror of
https://github.com/hyprwm/hyprutils.git
synced 2024-11-17 06:05:59 +01:00
nix: add debug flag
enable keepDebugInfo adapter on debug build with mold linker
This commit is contained in:
parent
fd4be8b9ca
commit
3ce0cde870
1 changed files with 34 additions and 21 deletions
|
@ -1,36 +1,49 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
|
stdenvAdapters,
|
||||||
cmake,
|
cmake,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
pixman,
|
pixman,
|
||||||
version ? "git",
|
version ? "git",
|
||||||
doCheck ? false,
|
doCheck ? false,
|
||||||
}:
|
debug ? false,
|
||||||
stdenv.mkDerivation {
|
}: let
|
||||||
pname = "hyprutils";
|
inherit (builtins) foldl';
|
||||||
inherit version doCheck;
|
inherit (lib.lists) flatten;
|
||||||
src = ../.;
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
adapters = flatten [
|
||||||
cmake
|
stdenvAdapters.useMoldLinker
|
||||||
pkg-config
|
(lib.optional debug stdenvAdapters.keepDebugInfo)
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
customStdenv = foldl' (acc: adapter: adapter acc) stdenv adapters;
|
||||||
pixman
|
in
|
||||||
];
|
customStdenv.mkDerivation {
|
||||||
|
pname = "hyprutils";
|
||||||
|
inherit version doCheck;
|
||||||
|
src = ../.;
|
||||||
|
|
||||||
outputs = ["out" "dev"];
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
cmakeBuildType = "RelWithDebInfo";
|
buildInputs = [
|
||||||
|
pixman
|
||||||
|
];
|
||||||
|
|
||||||
dontStrip = true;
|
outputs = ["out" "dev"];
|
||||||
|
|
||||||
meta = with lib; {
|
cmakeBuildType =
|
||||||
homepage = "https://github.com/hyprwm/hyprutils";
|
if debug
|
||||||
description = "Small C++ library for utilities used across the Hypr* ecosystem";
|
then "Debug"
|
||||||
license = licenses.bsd3;
|
else "RelWithDebInfo";
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
meta = with lib; {
|
||||||
}
|
homepage = "https://github.com/hyprwm/hyprutils";
|
||||||
|
description = "Small C++ library for utilities used across the Hypr* ecosystem";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue