summary refs log tree commit diff
path: root/pkgs/top-level/static.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/top-level/static.nix')
-rw-r--r--pkgs/top-level/static.nix29
1 files changed, 28 insertions, 1 deletions
diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix
index b4c1ee9ab3d..ca64c4d975c 100644
--- a/pkgs/top-level/static.nix
+++ b/pkgs/top-level/static.nix
@@ -216,6 +216,10 @@ in {
   libressl = super.libressl.override {
     buildShared = false;
   };
+  libjpeg_turbo = super.libjpeg_turbo.override {
+    enableStatic = true;
+    enableShared = false;
+  };
 
   darwin = super.darwin // {
     libiconv = super.darwin.libiconv.override {
@@ -265,7 +269,6 @@ in {
   ) super.ocaml-ng;
 
   python27 = super.python27.override { static = true; };
-  python35 = super.python35.override { static = true; };
   python36 = super.python36.override { static = true; };
   python37 = super.python37.override { static = true; };
   python38 = super.python38.override { static = true; };
@@ -276,4 +279,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" ];
+    });
+  });
 }