/
default.nix
99 lines (98 loc) · 3.47 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Primeos's (random) nixpkgs overlay
# This overlay isn't meant to be used directly (contains unstable and
# customized versions).
self: super:
{
# Until f43da349ba0722784ad7088ddddd4812a7fa9990 is in nixos-unstable
wayland_1_15 = super.wayland.overrideAttrs (oldAttrs: rec {
name = "wayland-${version}";
version = "1.15.0";
src = super.fetchurl {
url = "https://wayland.freedesktop.org/releases/${name}.tar.xz";
sha256 = "1c5fnys8hi71cnzjv5k7j0r8gx80p0yyqlrpmn06mmarhnxvwgzb";
};
});
# Until 280fba591d8839919110081839b542133a5dbf9a is in nixos-unstable
wayland-protocols_1_14 = super.wayland.overrideAttrs (oldAttrs: rec {
name = "wayland-protocols-${version}";
version = "1.14";
src = super.fetchurl {
url = "https://wayland.freedesktop.org/releases/${name}.tar.xz";
sha256 = "1xknjcfhqvdi1s4iq4kk1q61fg2rar3g8q4vlqarpd324imqjj4n";
};
buildInputs = [ self.wayland_1_15 ];
});
xwayland_sway = super.lib.overrideDerivation super.xorg.xorgserver (oldAttrs: {
name = "xwayland-${super.xorg.xorgserver.version}";
propagatedBuildInputs = oldAttrs.propagatedBuildInputs
++ [ self.wayland_1_15 self.wayland-protocols_1_14 ]
++ (with super; [ epoxy libxslt makeWrapper libunwind ]);
configureFlags = [
"--disable-docs"
"--disable-devel-docs"
"--enable-xwayland"
"--disable-xorg"
"--disable-xvfb"
"--disable-xnest"
"--disable-xquartz"
"--disable-xwin"
"--enable-glamor"
"--with-default-font-path="
"--with-xkb-bin-directory=${super.xorg.xkbcomp}/bin"
"--with-xkb-path=${super.xkeyboard_config}/etc/X11/xkb"
"--with-xkb-output=$(out)/share/X11/xkb/compiled"
];
postInstall = ''
rm -fr $out/share/X11/xkb/compiled
'';
}) // {
meta = with super.lib; {
description = "An X server for interfacing X11 apps with the Wayland protocol";
homepage = http://wayland.freedesktop.org/xserver.html;
license = licenses.mit;
platforms = platforms.linux;
};
};
wlroots = super.wlroots.overrideAttrs (oldAttrs: {
name = "wlroots-unstable-2018-06-09";
src = super.fetchFromGitHub {
owner = "swaywm";
repo = "wlroots";
rev = "9a1f0e2d5fe56870f3bd7d12113742766e89f4e6";
sha256 = "03ac6xhmrrjbyf9qzjg7ky4a63isykwhnshynjp25bzy1kd0hzcp";
};
buildInputs = (with super; [
self.wayland_1_15 libGL self.wayland-protocols_1_14 libinput libxkbcommon
pixman libcap mesa_noglu ])
++ (with super.xorg; [ xcbutilwm libX11 xcbutilimage xcbutilerrors ]);
meta = oldAttrs.meta // {
broken = false;
};
});
sway = super.sway.overrideAttrs (oldAttrs: rec {
name = "sway-${version}";
version = "1.0-alpha.3";
src = super.fetchFromGitHub {
owner = "swaywm";
repo = "sway";
rev = version;
sha256 = "035b8ih630c746x0nxdh72zcin0xfdx01z3znz63959nvcm0nzk2";
};
postPatch = ''
substituteInPlace meson.build --replace \
"werror=true" "werror=false"
'';
mesonFlags = [ "-Dsway_version=${version}" ];
nativeBuildInputs = with super; [
meson pkgconfig ninja
]; #++ stdenv.lib.optional buildDocs [ asciidoc libxslt docbook_xsl ];
# TODO: Replace asciidoc with scdoc
buildInputs = with super; [
json_c pcre self.wlroots self.wayland_1_15 self.xwayland_sway
libxkbcommon cairo pango gdk_pixbuf libcap libinput pam
# TODO:
mesa_noglu
# dbus_libs #libXdmcp #libpthreadstubs
];
});
}