nix: change build system to meson

flake.nix: change wlroots url to mirror, update version
flake.lock: update wlroots & nixpkgs
nix/update-inputs.sh: update wlroots url
This commit is contained in:
Mihai Fufezan 2022-06-16 13:42:31 +03:00
parent f58bb0187b
commit 8bd7234d72
No known key found for this signature in database
GPG key ID: 5899325F2F120900
5 changed files with 55 additions and 40 deletions

View file

@ -3,7 +3,7 @@
stdenv,
fetchFromGitHub,
pkg-config,
cmake,
meson,
ninja,
libdrm,
libinput,
@ -27,7 +27,7 @@ stdenv.mkDerivation {
src = ../.;
nativeBuildInputs = [
cmake
meson
ninja
pkg-config
];
@ -48,33 +48,14 @@ stdenv.mkDerivation {
]
++ lib.optional enableXWayland xwayland;
cmakeFlags =
["-DCMAKE_BUILD_TYPE=Release"]
++ lib.optional (!enableXWayland) "-DNO_XWAYLAND=true";
mesonBuildType = "release";
# enables building with nix-supplied wlroots instead of submodule
prePatch = ''
sed -Ei 's/"\.\.\/wlroots\/include\/([a-zA-Z0-9./_-]+)"/<\1>/g' src/includes.hpp
'';
postPatch = ''
make protocols
'';
mesonFlags = lib.optional (!enableXWayland) "-DNO_XWAYLAND=true";
postBuild = ''
pushd ../hyprctl
make all
popd
'';
installPhase = ''
pushd ..
install -Dm644 ./example/hyprland.desktop -t $out/share/wayland-sessions
install -Dm755 ./build/Hyprland -t $out/bin
install -Dm755 ./hyprctl/hyprctl -t $out/bin
install -Dm644 ./assets/* -t $out/share/hyprland
install -Dm644 ./example/hyprland.conf -t $out/share/hyprland
popd
'';
patches = [
# make meson use the provided wlroots instead of the git submodule
./meson-build.patch
];
passthru.providedSessions = ["hyprland"];