Skip to content

Commit

Permalink
nix: add stdenvAdapters
Browse files Browse the repository at this point in the history
  • Loading branch information
fufexan committed Nov 7, 2024
1 parent 8d732fa commit a49bc35
Showing 1 changed file with 53 additions and 40 deletions.
93 changes: 53 additions & 40 deletions nix/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
lib,
stdenv,
stdenvAdapters,
cmake,
hwdata,
hyprutils,
Expand All @@ -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;

depsBuildBuild = [
pkg-config
];

nativeBuildInputs = [
cmake
hyprwayland-scanner
pkg-config
];

outputs = ["out" "dev"];
buildInputs = [
hwdata
hyprutils
libdisplay-info
libdrm
libffi
libGL
libinput
mesa
pixman
seatd
udev
wayland
wayland-protocols
wayland-scanner
];

cmakeBuildType = "RelWithDebInfo";
outputs = ["out" "dev"];

dontStrip = true;
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;
};
}
meta = {
homepage = "https://github.com/hyprwm/aquamarine";
description = "A very light linux rendering backend library";
license = lib.licenses.bsd3;
platforms = lib.platforms.linux;
};
}

0 comments on commit a49bc35

Please sign in to comment.