mirror of
https://github.com/hyprwm/aquamarine.git
synced 2024-11-17 01:25: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,51 +21,63 @@
|
|||
wayland-scanner,
|
||||
version ? "git",
|
||||
doCheck ? false,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "aquamarine";
|
||||
inherit version doCheck;
|
||||
src = ../.;
|
||||
debug ? false,
|
||||
}: let
|
||||
inherit (builtins) foldl';
|
||||
inherit (lib.lists) flatten;
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
depsBuildBuild = [
|
||||
pkg-config
|
||||
adapters = flatten [
|
||||
stdenvAdapters.useMoldLinker
|
||||
(lib.optional debug stdenvAdapters.keepDebugInfo)
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
hyprwayland-scanner
|
||||
pkg-config
|
||||
];
|
||||
customStdenv = foldl' (acc: adapter: adapter acc) stdenv adapters;
|
||||
in
|
||||
customStdenv.mkDerivation {
|
||||
pname = "aquamarine";
|
||||
inherit version doCheck;
|
||||
src = ../.;
|
||||
|
||||
buildInputs = [
|
||||
hwdata
|
||||
hyprutils
|
||||
libdisplay-info
|
||||
libdrm
|
||||
libffi
|
||||
libGL
|
||||
libinput
|
||||
mesa
|
||||
pixman
|
||||
seatd
|
||||
udev
|
||||
wayland
|
||||
wayland-protocols
|
||||
wayland-scanner
|
||||
];
|
||||
strictDeps = true;
|
||||
|
||||
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 = {
|
||||
homepage = "https://github.com/hyprwm/aquamarine";
|
||||
description = "A very light linux rendering backend library";
|
||||
license = lib.licenses.bsd3;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
outputs = ["out" "dev"];
|
||||
|
||||
cmakeBuildType =
|
||||
if debug
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue