aboutsummaryrefslogtreecommitdiff
path: root/pkgs/top-level/static.nix
diff options
context:
space:
mode:
authorSymphorien Gibol <symphorien+git@xlumurb.eu>2020-07-01 23:31:14 +0200
committerSymphorien Gibol <symphorien+git@xlumurb.eu>2020-07-02 00:20:06 +0200
commit80ba806339c78bda689c75b1156e56470eb146d2 (patch)
treea6be0fe0b31ac6de48981ab76f27d2bd7d954f78 /pkgs/top-level/static.nix
parent1aa45698d7430e914be66dbc3ae24135dbc72df3 (diff)
xorg: fix static build
Diffstat (limited to 'pkgs/top-level/static.nix')
-rw-r--r--pkgs/top-level/static.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix
index 372d30a0b4e7..3b179940b6df 100644
--- a/pkgs/top-level/static.nix
+++ b/pkgs/top-level/static.nix
@@ -280,4 +280,28 @@ in {
libev = super.libev.override { static = true; };
libexecinfo = super.libexecinfo.override { enableShared = false; };
+
+ xorg = super.xorg.overrideScope' (xorgself: xorgsuper: {
+ libX11 = xorgsuper.libX11.overrideAttrs (attrs: {
+ depsBuildBuild = attrs.depsBuildBuild ++ [ (self.buildPackages.stdenv.cc.libc.static or null) ];
+ });
+ xauth = xorgsuper.xauth.overrideAttrs (attrs: {
+ # missing transitive dependencies
+ preConfigure = attrs.preConfigure or "" + ''
+ export NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -lxcb -lXau -lXdmcp"
+ '';
+ });
+ xdpyinfo = xorgsuper.xdpyinfo.overrideAttrs (attrs: {
+ # missing transitive dependencies
+ preConfigure = attrs.preConfigure or "" + ''
+ export NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -lXau -lXdmcp"
+ '';
+ });
+ libxcb = xorgsuper.libxcb.overrideAttrs (attrs: {
+ configureFlags = attrs.configureFlags ++ [ "--disable-shared" ];
+ });
+ libXi= xorgsuper.libXi.overrideAttrs (attrs: {
+ configureFlags = attrs.configureFlags ++ [ "--disable-shared" ];
+ });
+ });
}