aquamarine/nix/default.nix

84 lines
1.4 KiB
Nix
Raw Normal View History

2024-07-01 09:52:16 +02:00
{
lib,
stdenv,
2024-11-05 07:48:06 +01:00
stdenvAdapters,
2024-07-01 09:52:16 +02:00
cmake,
2024-07-02 18:53:21 +02:00
hwdata,
2024-07-01 09:52:16 +02:00
hyprutils,
hyprwayland-scanner,
libdisplay-info,
libdrm,
libffi,
2024-07-11 22:49:52 +02:00
libGL,
2024-07-01 09:52:16 +02:00
libinput,
mesa,
pixman,
pkg-config,
2024-10-20 13:34:53 +02:00
seatd,
2024-07-01 09:52:16 +02:00
udev,
wayland,
wayland-protocols,
2024-09-01 16:11:21 +02:00
wayland-scanner,
2024-07-01 09:52:16 +02:00
version ? "git",
doCheck ? false,
2024-11-05 07:48:06 +01:00
debug ? false,
}: let
inherit (builtins) foldl';
inherit (lib.lists) flatten;
2024-07-01 09:52:16 +02:00
2024-11-05 07:48:06 +01:00
adapters = flatten [
stdenvAdapters.useMoldLinker
(lib.optional debug stdenvAdapters.keepDebugInfo)
2024-09-01 16:11:21 +02:00
];
2024-11-05 07:48:06 +01:00
customStdenv = foldl' (acc: adapter: adapter acc) stdenv adapters;
in
customStdenv.mkDerivation {
pname = "aquamarine";
inherit version doCheck;
src = ../.;
2024-07-01 09:52:16 +02:00
2024-11-05 07:48:06 +01:00
strictDeps = true;
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
cmake
hyprwayland-scanner
pkg-config
];
2024-07-01 09:52:16 +02:00
2024-11-05 07:48:06 +01:00
buildInputs = [
hwdata
hyprutils
libdisplay-info
libdrm
libffi
libGL
libinput
mesa
pixman
seatd
udev
wayland
wayland-protocols
wayland-scanner
];
2024-07-01 09:52:16 +02:00
2024-11-05 07:48:06 +01:00
outputs = ["out" "dev"];
2024-07-01 09:52:16 +02:00
2024-11-05 07:48:06 +01:00
cmakeBuildType =
if debug
then "Debug"
else "RelWithDebInfo";
2024-07-01 09:52:16 +02:00
2024-11-05 07:48:06 +01:00
meta = {
homepage = "https://github.com/hyprwm/aquamarine";
description = "A very light linux rendering backend library";
license = lib.licenses.bsd3;
platforms = lib.platforms.linux;
};
}