summary refs log tree commit diff
path: root/pkgs/applications/window-managers
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2017-09-26 17:24:13 +0200
committerMichael Weiss <dev.primeos@gmail.com>2017-09-26 18:48:21 +0200
commit676f5cb02cdbb2761abdf7108ff35586eccf3e9a (patch)
tree044be2aa98c307731176bc7c95aed6a152b5333a /pkgs/applications/window-managers
parent4d7d5c8c34e9324c557ddeb4bf9f31a5a72b5afe (diff)
downloadnixlib-676f5cb02cdbb2761abdf7108ff35586eccf3e9a.tar
nixlib-676f5cb02cdbb2761abdf7108ff35586eccf3e9a.tar.gz
nixlib-676f5cb02cdbb2761abdf7108ff35586eccf3e9a.tar.bz2
nixlib-676f5cb02cdbb2761abdf7108ff35586eccf3e9a.tar.lz
nixlib-676f5cb02cdbb2761abdf7108ff35586eccf3e9a.tar.xz
nixlib-676f5cb02cdbb2761abdf7108ff35586eccf3e9a.tar.zst
nixlib-676f5cb02cdbb2761abdf7108ff35586eccf3e9a.zip
sway: Fix the build
While the last wlc upgrade (05d79c03ec36f8d49d1e2bf2b750c3943c348377)
makes it possible to build sway 0.14.0 it also breaks the current build
of sway 0.13.0.

Unfortunately sway 0.14.0 segfaults on launch and I couldn't fix it yet
(there are multiple upstream issues as well). I'll overwrite the wlc
version for sway in order to have a usable version in nixpkgs for the
meantime.
Diffstat (limited to 'pkgs/applications/window-managers')
-rw-r--r--pkgs/applications/window-managers/sway/default.nix83
1 files changed, 51 insertions, 32 deletions
diff --git a/pkgs/applications/window-managers/sway/default.nix b/pkgs/applications/window-managers/sway/default.nix
index ac725733d647..274325b67858 100644
--- a/pkgs/applications/window-managers/sway/default.nix
+++ b/pkgs/applications/window-managers/sway/default.nix
@@ -1,45 +1,64 @@
-{ stdenv, fetchFromGitHub, pango, libinput
-, makeWrapper, cmake, pkgconfig, asciidoc, libxslt, docbook_xsl, cairo
-, wayland, wlc, libxkbcommon, pixman, fontconfig, pcre, json_c, dbus_libs, libcap
-, xwayland, pam, gdk_pixbuf
+{ stdenv, fetchFromGitHub
+, makeWrapper, cmake, pkgconfig, asciidoc, libxslt, docbook_xsl
+, wayland, wlc, libxkbcommon, pixman, fontconfig, pcre, json_c, dbus_libs
+, pango, cairo, libinput, libcap, xwayland, pam, gdk_pixbuf, libpthreadstubs
+, libXdmcp
 }:
 
 let
   version = "0.13.0";
-in
-  stdenv.mkDerivation rec {
-    name = "sway-${version}";
+  # Temporary workaround (0.14.0 segfaults)
+  wlc_009 = stdenv.lib.overrideDerivation wlc (oldAttrs: rec {
+    name = "wlc-${version}";
+    version = "0.0.9";
 
     src = fetchFromGitHub {
-      owner = "Sircmpwn";
-      repo = "sway";
-      rev = "${version}";
-      sha256 = "1vgk4rl51nx66yzpwg4yhnbj7wc30k5q0hh5lf8y0i1nvpal0p3q";
+      owner = "Cloudef";
+      repo = "wlc";
+      rev = "v${version}";
+      fetchSubmodules = true;
+      sha256 = "1r6jf64gs7n9a8129wsc0mdwhcv44p8k87kg0714rhx3g2w22asg";
     };
+  });
+in stdenv.mkDerivation rec {
+  name = "sway-${version}";
 
-    nativeBuildInputs = [ makeWrapper cmake pkgconfig asciidoc libxslt docbook_xsl ];
+  src = fetchFromGitHub {
+    owner = "Sircmpwn";
+    repo = "sway";
+    rev = "${version}";
+    sha256 = "1vgk4rl51nx66yzpwg4yhnbj7wc30k5q0hh5lf8y0i1nvpal0p3q";
+  };
 
-    buildInputs = [ wayland wlc libxkbcommon pixman fontconfig pcre json_c dbus_libs pango cairo libinput libcap xwayland pam gdk_pixbuf ];
+  nativeBuildInputs = [
+    makeWrapper cmake pkgconfig
+    asciidoc libxslt docbook_xsl
+  ];
+  buildInputs = [
+    wayland wlc_009 libxkbcommon pixman fontconfig pcre json_c dbus_libs
+    pango cairo libinput libcap xwayland pam gdk_pixbuf libpthreadstubs
+    libXdmcp
+  ];
 
-    patchPhase = ''
-      sed -i s@/etc/sway@$out/etc/sway@g CMakeLists.txt;
-    '';
+  patchPhase = ''
+    sed -i s@/etc/sway@$out/etc/sway@g CMakeLists.txt;
+  '';
 
-    makeFlags = "PREFIX=$(out)";
-    cmakeFlags = "-DVERSION=${version}";
-    installPhase = "PREFIX=$out make install";
+  makeFlags = "PREFIX=$(out)";
+  cmakeFlags = "-DVERSION=${version}";
+  installPhase = "PREFIX=$out make install";
 
-    LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ wlc dbus_libs ];
-    preFixup = ''
-      wrapProgram $out/bin/sway \
-        --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}";
-    '';
+  LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ wlc_009 dbus_libs ];
+  preFixup = ''
+    wrapProgram $out/bin/sway \
+      --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}";
+  '';
 
-    meta = with stdenv.lib; {
-      description = "i3-compatible window manager for Wayland";
-      homepage    = "http://swaywm.org";
-      license     = licenses.mit;
-      platforms   = platforms.linux;
-      maintainers = with maintainers; [ ];
-    };
-  }
+  meta = with stdenv.lib; {
+    description = "i3-compatible window manager for Wayland";
+    homepage    = http://swaywm.org;
+    license     = licenses.mit;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ primeos ]; # Trying to keep it up-to-date.
+  };
+}