nix: add stdenvAdapters

This commit is contained in:
Mihai Fufezan 2024-11-05 08:48:06 +02:00
parent 8d732fa8af
commit a49bc3583f
Signed by: fufexan
SSH key fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg

View file

@ -1,6 +1,7 @@
{ {
lib, lib,
stdenv, stdenv,
stdenvAdapters,
cmake, cmake,
hwdata, hwdata,
hyprutils, hyprutils,
@ -20,51 +21,63 @@
wayland-scanner, wayland-scanner,
version ? "git", version ? "git",
doCheck ? false, doCheck ? false,
}: debug ? false,
stdenv.mkDerivation { }: let
pname = "aquamarine"; inherit (builtins) foldl';
inherit version doCheck; inherit (lib.lists) flatten;
src = ../.;
strictDeps = true; adapters = flatten [
stdenvAdapters.useMoldLinker
depsBuildBuild = [ (lib.optional debug stdenvAdapters.keepDebugInfo)
pkg-config
]; ];
nativeBuildInputs = [ customStdenv = foldl' (acc: adapter: adapter acc) stdenv adapters;
cmake in
hyprwayland-scanner customStdenv.mkDerivation {
pkg-config pname = "aquamarine";
]; inherit version doCheck;
src = ../.;
buildInputs = [ strictDeps = true;
hwdata
hyprutils
libdisplay-info
libdrm
libffi
libGL
libinput
mesa
pixman
seatd
udev
wayland
wayland-protocols
wayland-scanner
];
outputs = ["out" "dev"]; depsBuildBuild = [
pkg-config
];
cmakeBuildType = "RelWithDebInfo"; nativeBuildInputs = [
cmake
hyprwayland-scanner
pkg-config
];
dontStrip = true; buildInputs = [
hwdata
hyprutils
libdisplay-info
libdrm
libffi
libGL
libinput
mesa
pixman
seatd
udev
wayland
wayland-protocols
wayland-scanner
];
meta = { outputs = ["out" "dev"];
homepage = "https://github.com/hyprwm/aquamarine";
description = "A very light linux rendering backend library"; cmakeBuildType =
license = lib.licenses.bsd3; if debug
platforms = lib.platforms.linux; then "Debug"
}; else "RelWithDebInfo";
}
meta = {
homepage = "https://github.com/hyprwm/aquamarine";
description = "A very light linux rendering backend library";
license = lib.licenses.bsd3;
platforms = lib.platforms.linux;
};
}