river: build for baseline arch, cleanup

This commit is contained in:
fortuneteller2k 2021-05-17 10:39:35 +08:00
parent 6a5c85e926
commit 23469e4c26
1 changed files with 35 additions and 12 deletions

View File

@ -1,7 +1,19 @@
{ lib, stdenv ,fetchFromGitHub { lib
, zig, wayland, pkg-config, scdoc , stdenv
, xwayland, wayland-protocols, wlroots , fetchFromGitHub
, libxkbcommon, pixman, udev, libevdev, libX11, libGL , zig
, wayland
, pkg-config
, scdoc
, xwayland
, wayland-protocols
, wlroots
, libxkbcommon
, pixman
, udev
, libevdev
, libX11
, libGL
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -16,8 +28,18 @@ stdenv.mkDerivation rec {
fetchSubmodules = true; fetchSubmodules = true;
}; };
buildInputs = [ wayland-protocols wlroots pixman nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ];
libxkbcommon pixman udev libevdev libX11 libGL
buildInputs = [
wayland-protocols
wlroots
pixman
libxkbcommon
pixman
udev
libevdev
libX11
libGL
]; ];
dontConfigure = true; dontConfigure = true;
@ -25,17 +47,18 @@ stdenv.mkDerivation rec {
preBuild = '' preBuild = ''
export HOME=$TMPDIR export HOME=$TMPDIR
''; '';
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
zig build -Drelease-safe -Dxwayland -Dman-pages --prefix $out install zig build -Drelease-safe -Dtarget=${stdenv.hostPlatform.parsed.cpu.name}-native -Dxwayland -Dman-pages --prefix $out install
runHook postInstall runHook postInstall
''; '';
nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ]; /*
Builder patch install dir into river to get default config
# Builder patch install dir into river to get default config When installFlags is removed, river becomes half broken.
# When installFlags is removed, river becomes half broken See https://github.com/ifreund/river/blob/7ffa2f4b9e7abf7d152134f555373c2b63ccfc1d/river/main.zig#L56
# see https://github.com/ifreund/river/blob/7ffa2f4b9e7abf7d152134f555373c2b63ccfc1d/river/main.zig#L56 */
installFlags = [ "DESTDIR=$(out)" ]; installFlags = [ "DESTDIR=$(out)" ];
meta = with lib; { meta = with lib; {