summaryrefslogtreecommitdiffstats
path: root/pkgs-temp/wlroots/default.nix
diff options
context:
space:
mode:
authorCole Mickens <cole.mickens@gmail.com>2018-12-29 15:42:38 -0800
committerCole Mickens <cole.mickens@gmail.com>2019-01-03 20:33:55 -0800
commitb953a1b4b5d5bb891c714cd51985e40863d7de87 (patch)
tree677bc8f2a6363dd37cd3ac8acff9005d5338deba /pkgs-temp/wlroots/default.nix
parent8d93ac7e0f479aed74eb5a35d445423b850412c0 (diff)
update most packages
wlroots matches upstream nixpkgs (no longer needs custom meson48) wayfire now temporarily uses an old, pinned wlroots packages updated: - fmt - wlroots - sway-beta - grim - oguri - waybar - wayfire / wf-config - bspwc - waybox - wl-clipboard - wmfocus - i3status-rust Signed-off-by: Cole Mickens <cole.mickens@gmail.com>
Diffstat (limited to 'pkgs-temp/wlroots/default.nix')
-rw-r--r--pkgs-temp/wlroots/default.nix71
1 files changed, 71 insertions, 0 deletions
diff --git a/pkgs-temp/wlroots/default.nix b/pkgs-temp/wlroots/default.nix
new file mode 100644
index 0000000..48de890
--- /dev/null
+++ b/pkgs-temp/wlroots/default.nix
@@ -0,0 +1,71 @@
+{ stdenv, fetchFromGitHub, fetchpatch, meson, ninja, pkgconfig
+, wayland, libGL, wayland-protocols, libinput, libxkbcommon, pixman
+, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa_noglu
+, libpng, ffmpeg_4
+, python3Packages # TODO: Temporary
+}:
+
+let
+ pname = "wlroots";
+ version = "36ba56140ae325ae398229a689f20ded126608bc";
+ sha256 = "0wrc67g1vp3hk340hz1xn1xcy4rhmpd3dqb9ykxg69mpicrz3mvg";
+in stdenv.mkDerivation rec {
+ name = "${pname}-${version}";
+ src = fetchFromGitHub {
+ owner = "swaywm";
+ repo = "wlroots";
+ rev = version;
+ sha256 = sha256;
+ };
+
+ # $out for the library, $bin for rootston, and $examples for the example
+ # programs (in examples) AND rootston
+ outputs = [ "out" "bin" "examples" ];
+
+ nativeBuildInputs = [ meson ninja pkgconfig ];
+
+ buildInputs = [
+ wayland libGL wayland-protocols libinput libxkbcommon pixman
+ xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa_noglu
+ libpng ffmpeg_4
+ ];
+
+ mesonFlags = [
+ "-Dlibcap=enabled" "-Dlogind=enabled" "-Dxwayland=enabled" "-Dx11-backend=enabled"
+ "-Dxcb-icccm=enabled" "-Dxcb-xkb=enabled" "-Dxcb-errors=enabled"
+ ];
+
+ postInstall = ''
+ # Install rootston (the reference compositor) to $bin and $examples
+ for output in "$bin" "$examples"; do
+ mkdir -p $output/bin
+ cp rootston/rootston $output/bin/
+ mkdir $output/lib
+ cp libwlroots* $output/lib/
+ patchelf \
+ --set-rpath "$output/lib:${stdenv.lib.makeLibraryPath buildInputs}" \
+ $output/bin/rootston
+ mkdir $output/etc
+ cp ../rootston/rootston.ini.example $output/etc/rootston.ini
+ done
+ # Install ALL example programs to $examples:
+ # screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle
+ # screenshot output-layout multi-pointer rotation tablet touch pointer
+ # simple
+ cd ./examples
+ for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do
+ patchelf \
+ --set-rpath "$examples/lib:${stdenv.lib.makeLibraryPath buildInputs}" \
+ "$binary"
+ cp "$binary" "$examples/bin/wlroots-$binary"
+ done
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A modular Wayland compositor library";
+ inherit (src.meta) homepage;
+ license = licenses.mit;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ primeos ];
+ };
+}