mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 02:35:59 +01:00
nix: add stdenvAdapters
This commit is contained in:
parent
8d732fa8af
commit
a49bc3583f
1 changed files with 53 additions and 40 deletions
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
stdenvAdapters,
|
||||
cmake,
|
||||
hwdata,
|
||||
hyprutils,
|
||||
|
@ -20,8 +21,19 @@
|
|||
wayland-scanner,
|
||||
version ? "git",
|
||||
doCheck ? false,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
debug ? false,
|
||||
}: let
|
||||
inherit (builtins) foldl';
|
||||
inherit (lib.lists) flatten;
|
||||
|
||||
adapters = flatten [
|
||||
stdenvAdapters.useMoldLinker
|
||||
(lib.optional debug stdenvAdapters.keepDebugInfo)
|
||||
];
|
||||
|
||||
customStdenv = foldl' (acc: adapter: adapter acc) stdenv adapters;
|
||||
in
|
||||
customStdenv.mkDerivation {
|
||||
pname = "aquamarine";
|
||||
inherit version doCheck;
|
||||
src = ../.;
|
||||
|
@ -57,9 +69,10 @@ stdenv.mkDerivation {
|
|||
|
||||
outputs = ["out" "dev"];
|
||||
|
||||
cmakeBuildType = "RelWithDebInfo";
|
||||
|
||||
dontStrip = true;
|
||||
cmakeBuildType =
|
||||
if debug
|
||||
then "Debug"
|
||||
else "RelWithDebInfo";
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/hyprwm/aquamarine";
|
||||
|
|
Loading…
Reference in a new issue