git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #123313 from fortuneteller2k/fix-river

river: build for baseline arch, cleanup

commit5f5652f816d39127602a8c6438932573232e1b0d authorSandro <sandro.jaeckel@gmail.com> dateTue 18 May 2021, 01:51 (6 years ago) parent5e21eff23469e4
1 file changed+35−12
pkgs/applications/window-managers/river/default.nix+35−12
pkgs/applications/window-managers/river/default.nix+35−12
@@ -1,7 +1,19 @@
1−{ lib, stdenv ,fetchFromGitHub
2−, zig, wayland, pkg-config, scdoc
3−, xwayland, wayland-protocols, wlroots
4−, libxkbcommon, pixman, udev, libevdev, libX11, libGL
1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, zig
5+, wayland
6+, pkg-config
7+, scdoc
8+, xwayland
9+, wayland-protocols
10+, wlroots
11+, libxkbcommon
12+, pixman
13+, udev
14+, libevdev
15+, libX11
16+, libGL
517}:
618
719stdenv.mkDerivation rec {
@@ -16,8 +28,18 @@ stdenv.mkDerivation rec {
1628 fetchSubmodules = true;
1729 };
1830
19− buildInputs = [ wayland-protocols wlroots pixman
20− libxkbcommon pixman udev libevdev libX11 libGL
31+ nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ];
32+
33+ buildInputs = [
34+ wayland-protocols
35+ wlroots
36+ pixman
37+ libxkbcommon
38+ pixman
39+ udev
40+ libevdev
41+ libX11
42+ libGL
2143 ];
2244
2345 dontConfigure = true;
@@ -25,17 +47,18 @@ stdenv.mkDerivation rec {
2547 preBuild = ''
2648 export HOME=$TMPDIR
2749 '';
50+
2851 installPhase = ''
2952 runHook preInstall
30− zig build -Drelease-safe -Dxwayland -Dman-pages --prefix $out install
53+ zig build -Drelease-safe -Dtarget=${stdenv.hostPlatform.parsed.cpu.name}-native -Dxwayland -Dman-pages --prefix $out install
3154 runHook postInstall
3255 '';
3356
34− nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ];
35−
36− # Builder patch install dir into river to get default config
37− # When installFlags is removed, river becomes half broken
38− # see https://github.com/ifreund/river/blob/7ffa2f4b9e7abf7d152134f555373c2b63ccfc1d/river/main.zig#L56
57+ /*
58+ Builder patch install dir into river to get default config
59+ When installFlags is removed, river becomes half broken.
60+ See https://github.com/ifreund/river/blob/7ffa2f4b9e7abf7d152134f555373c2b63ccfc1d/river/main.zig#L56
61+ */
3962 installFlags = [ "DESTDIR=$(out)" ];
4063
4164 meta = with lib; {