mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 04:56:00 +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,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
|
stdenvAdapters,
|
||||||
cmake,
|
cmake,
|
||||||
hwdata,
|
hwdata,
|
||||||
hyprutils,
|
hyprutils,
|
||||||
|
@ -20,8 +21,19 @@
|
||||||
wayland-scanner,
|
wayland-scanner,
|
||||||
version ? "git",
|
version ? "git",
|
||||||
doCheck ? false,
|
doCheck ? false,
|
||||||
}:
|
debug ? false,
|
||||||
stdenv.mkDerivation {
|
}: 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";
|
pname = "aquamarine";
|
||||||
inherit version doCheck;
|
inherit version doCheck;
|
||||||
src = ../.;
|
src = ../.;
|
||||||
|
@ -57,9 +69,10 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
outputs = ["out" "dev"];
|
outputs = ["out" "dev"];
|
||||||
|
|
||||||
cmakeBuildType = "RelWithDebInfo";
|
cmakeBuildType =
|
||||||
|
if debug
|
||||||
dontStrip = true;
|
then "Debug"
|
||||||
|
else "RelWithDebInfo";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://github.com/hyprwm/aquamarine";
|
homepage = "https://github.com/hyprwm/aquamarine";
|
||||||
|
|
Loading…
Reference in a new issue