about summary refs log tree commit diff
path: root/pkgs/applications/window-managers/river
diff options
context:
space:
mode:
authorfortuneteller2k <lythe1107@gmail.com>2021-05-17 10:39:35 +0800
committerfortuneteller2k <lythe1107@gmail.com>2021-05-17 11:02:06 +0800
commit23469e4c26d777bfe93c633c11306455b54ad393 (patch)
treea9e9fc6fa56604617c8910299f3487fbf19e85cd /pkgs/applications/window-managers/river
parent6a5c85e92620368a1503abec60dcabb684a3dbe9 (diff)
river: build for baseline arch, cleanup
Diffstat (limited to 'pkgs/applications/window-managers/river')
-rw-r--r--pkgs/applications/window-managers/river/default.nix47
1 files changed, 35 insertions, 12 deletions
diff --git a/pkgs/applications/window-managers/river/default.nix b/pkgs/applications/window-managers/river/default.nix
index b8b530272198c..5c02484236c47 100644
--- a/pkgs/applications/window-managers/river/default.nix
+++ b/pkgs/applications/window-managers/river/default.nix
@@ -1,7 +1,19 @@
-{ lib, stdenv ,fetchFromGitHub
-, zig, wayland, pkg-config, scdoc
-, xwayland, wayland-protocols, wlroots
-, libxkbcommon, pixman, udev, libevdev, libX11, libGL
+{ lib
+, stdenv
+, fetchFromGitHub
+, zig
+, wayland
+, pkg-config
+, scdoc
+, xwayland
+, wayland-protocols
+, wlroots
+, libxkbcommon
+, pixman
+, udev
+, libevdev
+, libX11
+, libGL
 }:
 
 stdenv.mkDerivation rec {
@@ -16,8 +28,18 @@ stdenv.mkDerivation rec {
     fetchSubmodules = true;
   };
 
-  buildInputs = [ wayland-protocols wlroots pixman
-    libxkbcommon pixman udev libevdev libX11 libGL
+  nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ];
+
+  buildInputs = [
+    wayland-protocols
+    wlroots
+    pixman
+    libxkbcommon
+    pixman
+    udev
+    libevdev
+    libX11
+    libGL
   ];
 
   dontConfigure = true;
@@ -25,17 +47,18 @@ stdenv.mkDerivation rec {
   preBuild = ''
     export HOME=$TMPDIR
   '';
+
   installPhase = ''
     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
   '';
 
-  nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ];
-
-  # Builder patch install dir into river to get default config
-  # When installFlags is removed, river becomes half broken
-  # see https://github.com/ifreund/river/blob/7ffa2f4b9e7abf7d152134f555373c2b63ccfc1d/river/main.zig#L56
+  /*
+    Builder patch install dir into river to get default config
+    When installFlags is removed, river becomes half broken.
+    See https://github.com/ifreund/river/blob/7ffa2f4b9e7abf7d152134f555373c2b63ccfc1d/river/main.zig#L56
+  */
   installFlags = [ "DESTDIR=$(out)" ];
 
   meta = with lib; {