2022-05-17 13:11:24 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pkg-config,
|
2022-06-16 12:42:31 +02:00
|
|
|
meson,
|
2022-05-17 13:11:24 +02:00
|
|
|
ninja,
|
2022-07-29 12:21:19 +02:00
|
|
|
git,
|
2022-05-17 13:11:24 +02:00
|
|
|
libdrm,
|
|
|
|
libinput,
|
|
|
|
libxcb,
|
|
|
|
libxkbcommon,
|
|
|
|
mesa,
|
|
|
|
mount,
|
|
|
|
pango,
|
|
|
|
wayland,
|
|
|
|
wayland-protocols,
|
|
|
|
wayland-scanner,
|
|
|
|
wlroots,
|
|
|
|
xcbutilwm,
|
|
|
|
xwayland,
|
2022-07-27 13:57:27 +02:00
|
|
|
debug ? false,
|
2022-05-17 13:11:24 +02:00
|
|
|
enableXWayland ? true,
|
2022-07-27 13:57:27 +02:00
|
|
|
legacyRenderer ? false,
|
2022-05-17 13:11:24 +02:00
|
|
|
version ? "git",
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
2022-06-29 13:46:41 +02:00
|
|
|
pname = "hyprland" + lib.optionalString debug "-debug";
|
2022-05-17 13:11:24 +02:00
|
|
|
inherit version;
|
2022-08-12 22:12:24 +02:00
|
|
|
|
|
|
|
src = lib.cleanSourceWith {
|
|
|
|
filter = name: type: let
|
|
|
|
baseName = baseNameOf (toString name);
|
|
|
|
in
|
|
|
|
! (
|
|
|
|
lib.hasSuffix ".nix" baseName
|
|
|
|
);
|
|
|
|
src = lib.cleanSource ../.;
|
|
|
|
};
|
2022-05-08 18:27:40 +02:00
|
|
|
|
2022-05-17 13:11:24 +02:00
|
|
|
nativeBuildInputs = [
|
2022-06-16 12:42:31 +02:00
|
|
|
meson
|
2022-05-17 13:11:24 +02:00
|
|
|
ninja
|
|
|
|
pkg-config
|
2022-05-08 18:27:40 +02:00
|
|
|
];
|
|
|
|
|
2022-08-21 17:58:03 +02:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"man"
|
|
|
|
];
|
|
|
|
|
2022-05-17 13:11:24 +02:00
|
|
|
buildInputs =
|
|
|
|
[
|
2022-07-29 12:21:19 +02:00
|
|
|
git
|
2022-05-17 13:11:24 +02:00
|
|
|
libdrm
|
|
|
|
libinput
|
|
|
|
libxcb
|
|
|
|
libxkbcommon
|
|
|
|
mesa
|
|
|
|
pango
|
|
|
|
wayland
|
|
|
|
wayland-protocols
|
|
|
|
wayland-scanner
|
|
|
|
(wlroots.override {inherit enableXWayland;})
|
|
|
|
xcbutilwm
|
|
|
|
]
|
|
|
|
++ lib.optional enableXWayland xwayland;
|
|
|
|
|
2022-06-29 13:46:41 +02:00
|
|
|
mesonBuildType =
|
|
|
|
if debug
|
|
|
|
then "debug"
|
|
|
|
else "release";
|
2022-05-08 18:27:40 +02:00
|
|
|
|
2022-07-27 13:57:27 +02:00
|
|
|
mesonFlags = builtins.concatLists [
|
2022-08-27 20:45:48 +02:00
|
|
|
(lib.optional (!enableXWayland) "-Dxwayland=disabled")
|
2022-08-12 22:12:24 +02:00
|
|
|
(lib.optional legacyRenderer "-DLEGACY_RENDERER:STRING=true")
|
2022-07-27 13:57:27 +02:00
|
|
|
];
|
2022-05-08 20:18:13 +02:00
|
|
|
|
2022-06-16 12:42:31 +02:00
|
|
|
patches = [
|
|
|
|
# make meson use the provided wlroots instead of the git submodule
|
|
|
|
./meson-build.patch
|
|
|
|
];
|
2022-05-08 18:27:40 +02:00
|
|
|
|
2022-07-08 16:46:42 +02:00
|
|
|
# Fix hardcoded paths to /usr installation
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s#/usr#$out#" src/render/OpenGL.cpp
|
|
|
|
'';
|
|
|
|
|
2022-05-17 13:11:24 +02:00
|
|
|
passthru.providedSessions = ["hyprland"];
|
2022-05-16 12:33:00 +02:00
|
|
|
|
2022-05-08 18:27:40 +02:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/vaxerski/Hyprland";
|
2022-05-17 13:11:24 +02:00
|
|
|
description = "A dynamic tiling Wayland compositor that doesn't sacrifice on its looks";
|
2022-05-08 18:27:40 +02:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
2022-05-17 13:11:24 +02:00
|
|
|
mainProgram = "Hyprland";
|
2022-05-08 18:27:40 +02:00
|
|
|
};
|
|
|
|
}
|