From 2d0ec8b28873bc6b933b10ed2aa6411237a625f5 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sat, 24 Mar 2018 12:11:02 -0500 Subject: [PATCH 1/5] stage1 boot: use stdenv.cc.libc (cherry picked from commit d3ae884c9eeb4a6f66ac4e57764c04db16ea7c71) --- nixos/modules/system/boot/stage-1.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index f4cf9753c0a..e7167999a6f 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -147,7 +147,7 @@ let ${config.boot.initrd.extraUtilsCommands} # Copy ld manually since it isn't detected correctly - cp -pv ${pkgs.glibc.out}/lib/ld*.so.? $out/lib + cp -pv ${pkgs.stdenv.cc.libc.out}/lib/ld*.so.? $out/lib # Copy all of the needed libraries find $out/bin $out/lib -type f | while read BIN; do From 9de0b2883ac4778c7c8fae57f9efeb4d773bdd08 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sat, 24 Mar 2018 15:33:47 -0500 Subject: [PATCH 2/5] nixos: use pkgs.getent and stdenv.cc.libc (cherry picked from commit 52eba9753aeba4f02c8ce0de50f10bd98de1ef1e) --- nixos/modules/config/system-path.nix | 4 +++- nixos/modules/system/activation/activation-script.nix | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix index c07e19bd03c..1793dc628ed 100644 --- a/nixos/modules/config/system-path.nix +++ b/nixos/modules/config/system-path.nix @@ -19,7 +19,9 @@ let pkgs.diffutils pkgs.findutils pkgs.gawk - pkgs.glibc # for ldd, getent + pkgs.stdenv.cc.libc + pkgs.getent + pkgs.getconf pkgs.gnugrep pkgs.gnupatch pkgs.gnused diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix index b1eaf018956..0ed7c0f53eb 100644 --- a/nixos/modules/system/activation/activation-script.nix +++ b/nixos/modules/system/activation/activation-script.nix @@ -21,7 +21,7 @@ let [ coreutils gnugrep findutils - glibc # needed for getent + getent shadow nettools # needed for hostname utillinux # needed for mount and mountpoint From afdf16b7148805a9eae44867bc70a02015d6a765 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sat, 24 Mar 2018 20:51:32 -0500 Subject: [PATCH 3/5] apparmor-suid: don't force glibc (cherry picked from commit 131131e58fc66365854f37f4fe2bf6ca01c8aed6) --- nixos/modules/security/apparmor-suid.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/security/apparmor-suid.nix b/nixos/modules/security/apparmor-suid.nix index dfbf5d859ba..498c2f25d1c 100644 --- a/nixos/modules/security/apparmor-suid.nix +++ b/nixos/modules/security/apparmor-suid.nix @@ -28,7 +28,7 @@ with lib; capability setuid, network inet raw, - ${pkgs.glibc.out}/lib/*.so mr, + ${pkgs.stdenv.cc.libc.out}/lib/*.so mr, ${pkgs.libcap.lib}/lib/libcap.so* mr, ${pkgs.attr.out}/lib/libattr.so* mr, From 2603e3a5e97e5c85f828d52142f25c4a928fe1ad Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 28 Mar 2018 08:46:56 -0500 Subject: [PATCH 4/5] gtk: don't hardcode glibc use (cherry picked from commit 6e6f839093ad080c3a61810e9720165faf103e81) --- .../services/x11/display-managers/lightdm-greeters/gtk.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix index 013956c0546..d1ee076e918 100644 --- a/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix +++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix @@ -22,7 +22,7 @@ let # This wrapper ensures that we actually get themes makeWrapper ${pkgs.lightdm_gtk_greeter}/sbin/lightdm-gtk-greeter \ $out/greeter \ - --prefix PATH : "${pkgs.glibc.bin}/bin" \ + --prefix PATH : "${lib.getBin pkgs.stdenv.cc.libc}/bin" \ --set GDK_PIXBUF_MODULE_FILE "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \ --set GTK_PATH "${theme}:${pkgs.gtk3.out}" \ --set GTK_EXE_PREFIX "${theme}" \ From 8cc028fd34953e03ee8e91cca141fe1f6294de82 Mon Sep 17 00:00:00 2001 From: Travis Athougies Date: Mon, 22 Oct 2018 11:11:02 -0700 Subject: [PATCH 5/5] nixos/networking.nix: only setup rpc on glibc (cherry picked from commit 4177dc3f774523fea7d181601d7c3301fda13790) and (cherry picked from commit a2f0c95baf57fb735dd47b5db73274f7e75df7c9) --- nixos/modules/config/networking.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix index 1eb6fb43604..627cce67e97 100644 --- a/nixos/modules/config/networking.nix +++ b/nixos/modules/config/networking.nix @@ -228,9 +228,6 @@ in # /etc/protocols: IP protocol numbers. "protocols".source = pkgs.iana-etc + "/etc/protocols"; - # /etc/rpc: RPC program numbers. - "rpc".source = pkgs.glibc.out + "/etc/rpc"; - # /etc/hosts: Hostname-to-IP mappings. "hosts".text = let oneToString = set: ip: ip + " " + concatStringsSep " " set.${ip}; @@ -268,6 +265,9 @@ in "resolv.conf".source = "${pkgs.systemd}/lib/systemd/resolv.conf"; } // optionalAttrs (config.services.resolved.enable && dnsmasqResolve) { "dnsmasq-resolv.conf".source = "/run/systemd/resolve/resolv.conf"; + } // optionalAttrs (pkgs.stdenv.hostPlatform.libc == "glibc") { + # /etc/rpc: RPC program numbers. + "rpc".source = pkgs.glibc.out + "/etc/rpc"; }; networking.proxy.envVars =