2022-05-08 21:18:13 +03:00
|
|
|
{ lib, stdenv, fetchFromGitHub, src, pkg-config, cmake, ninja, libdrm, libinput
|
|
|
|
, libxcb, libxkbcommon, mesa, mount, pango, wayland, wayland-protocols
|
|
|
|
, wayland-scanner, wlroots, xcbutilwm, xwayland, enableXWayland ? true }:
|
2022-05-08 19:27:40 +03:00
|
|
|
|
2022-05-08 21:18:13 +03:00
|
|
|
stdenv.mkDerivation rec {
|
2022-05-08 19:27:40 +03:00
|
|
|
pname = "hyprland";
|
2022-05-08 21:18:13 +03:00
|
|
|
version = "git";
|
|
|
|
inherit src;
|
2022-05-08 19:27:40 +03:00
|
|
|
|
2022-05-08 22:07:41 +03:00
|
|
|
nativeBuildInputs = [ cmake ninja pkg-config wayland ]
|
|
|
|
++ lib.optional enableXWayland xwayland;
|
2022-05-08 19:27:40 +03:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libdrm
|
|
|
|
libinput
|
|
|
|
libxcb
|
|
|
|
libxkbcommon
|
|
|
|
mesa
|
|
|
|
pango
|
|
|
|
wayland-protocols
|
|
|
|
wayland-scanner
|
|
|
|
wlroots
|
2022-05-08 21:18:13 +03:00
|
|
|
(wlroots.override { inherit enableXWayland; })
|
2022-05-08 19:27:40 +03:00
|
|
|
xcbutilwm
|
|
|
|
];
|
|
|
|
|
2022-05-08 21:18:13 +03:00
|
|
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]
|
|
|
|
++ lib.optional (!enableXWayland) "-DNO_XWAYLAND=true";
|
2022-05-08 19:27:40 +03:00
|
|
|
|
2022-05-08 21:18:13 +03:00
|
|
|
prePatch = ''
|
|
|
|
make config
|
|
|
|
'';
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
pushd ../hyprctl
|
|
|
|
make all
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cd ../
|
|
|
|
mkdir -p $out/share/wayland-sessions
|
2022-05-16 13:33:00 +03:00
|
|
|
cp ./example/hyprland.desktop $out/share/wayland-sessions
|
2022-05-08 21:18:13 +03:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ./build/Hyprland $out/bin
|
|
|
|
cp ./hyprctl/hyprctl $out/bin
|
|
|
|
mkdir -p $out/share/hyprland
|
|
|
|
cp ./assets/wall_2K.png $out/share/hyprland
|
|
|
|
cp ./assets/wall_4K.png $out/share/hyprland
|
|
|
|
cp ./assets/wall_8K.png $out/share/hyprland
|
2022-05-08 19:27:40 +03:00
|
|
|
'';
|
|
|
|
|
2022-05-16 13:33:00 +03:00
|
|
|
passthru.providedSessions = [ "hyprland" ];
|
|
|
|
|
2022-05-08 19:27:40 +03:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/vaxerski/Hyprland";
|
|
|
|
description =
|
|
|
|
"A dynamic tiling Wayland compositor that doesn't sacrifice on its looks";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|