about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2014-04-18 13:30:24 +0200
committerSander van der Burg <svanderburg@gmail.com>2014-04-18 13:30:24 +0200
commit104c841c85702ab684393f958bf90bdb23af52c5 (patch)
tree706d1ecaa90786f12120d3816848053b7eee50f9
parent5a03d5b3a903d01e423c0beaab32a5a0b7b17e1a (diff)
downloadnixlib-104c841c85702ab684393f958bf90bdb23af52c5.tar
nixlib-104c841c85702ab684393f958bf90bdb23af52c5.tar.gz
nixlib-104c841c85702ab684393f958bf90bdb23af52c5.tar.bz2
nixlib-104c841c85702ab684393f958bf90bdb23af52c5.tar.lz
nixlib-104c841c85702ab684393f958bf90bdb23af52c5.tar.xz
nixlib-104c841c85702ab684393f958bf90bdb23af52c5.tar.zst
nixlib-104c841c85702ab684393f958bf90bdb23af52c5.zip
Move su to the base packages of chrootenv builder
-rw-r--r--pkgs/build-support/build-fhs-chrootenv/default.nix28
-rw-r--r--pkgs/games/steam/chrootenv.nix4
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 18 insertions, 16 deletions
diff --git a/pkgs/build-support/build-fhs-chrootenv/default.nix b/pkgs/build-support/build-fhs-chrootenv/default.nix
index 8756c4835b29..2f3aa14c6a0f 100644
--- a/pkgs/build-support/build-fhs-chrootenv/default.nix
+++ b/pkgs/build-support/build-fhs-chrootenv/default.nix
@@ -1,10 +1,12 @@
 {stdenv, glibc, glibcLocales, gcc, coreutils, diffutils, findutils, gnused, gnugrep, gnutar, gzip, bzip2, 
-bashInteractive, xz, shadow, gawk, less, buildEnv}:
+bashInteractive, xz, shadow, gawk, less, su, buildEnv}:
 {name, pkgs ? [], profile ? ""}:
 
 let
-  basePkgs = [ glibc glibcLocales gcc coreutils diffutils findutils gnused gnugrep gnutar gzip bzip2 
-bashInteractive xz shadow gawk less ];
+  basePkgs = [
+    glibc glibcLocales gcc coreutils diffutils findutils gnused gnugrep gnutar
+    gzip bzip2 bashInteractive xz shadow gawk less su
+  ];
 
   # Compose a global profile for the chroot environment
   profilePkg = stdenv.mkDerivation {
@@ -31,16 +33,16 @@ bashInteractive xz shadow gawk less ];
   mountSh = ./mount.sh.in;
   loadSh = ./load.sh.in;
   umountSh = ./umount.sh.in;
-  destroySh = ./destroy.sh.in;                                                                                       
-in                                                                                                                   
-stdenv.mkDerivation {                                                                                                
-  name = "${name}-chrootenv";                                                                                        
-  buildCommand = ''                                                                                                  
-    mkdir -p $out/sw                                                                                                 
-    cd $out/sw                                                                                                       
-                                                                                                                     
-    for i in ${staticUsrProfile}/{etc,bin,lib{,32,64},sbin,var}                                                      
-    do                                                                                                               
+  destroySh = ./destroy.sh.in;
+in
+stdenv.mkDerivation {
+  name = "${name}-chrootenv";
+  buildCommand = ''
+    mkdir -p $out/sw
+    cd $out/sw
+    
+    for i in ${staticUsrProfile}/{etc,bin,lib{,32,64},sbin,var}
+    do
         if [ -x "$i" ]
         then
             ln -s "$i"
diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix
index b77046746cd1..2173d12666e5 100644
--- a/pkgs/games/steam/chrootenv.nix
+++ b/pkgs/games/steam/chrootenv.nix
@@ -1,10 +1,10 @@
 { buildFHSChrootEnv, steam
-, xterm, libX11, zenity, python, mesa, xdg_utils, dbus_tools, alsaLib, su
+, xterm, libX11, zenity, python, mesa, xdg_utils, dbus_tools, alsaLib
 }:
 
 buildFHSChrootEnv {
   name = "steam";
-  pkgs = [ steam xterm libX11 zenity python mesa xdg_utils dbus_tools alsaLib su ];
+  pkgs = [ steam xterm libX11 zenity python mesa xdg_utils dbus_tools alsaLib ];
   profile = ''
     export LD_LIBRARY_PATH=/run/opengl-driver/lib:/run/opengl-driver-32/lib:/lib
     export FONTCONFIG_FILE=/etc/fonts/fonts.conf
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 7854029d21eb..7f424d0c66d2 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -270,7 +270,7 @@ let
   buildFHSChrootEnv = import ../build-support/build-fhs-chrootenv {
     inherit stdenv glibc glibcLocales gcc coreutils diffutils findutils;
     inherit gnused gnugrep gnutar gzip bzip2 bashInteractive xz shadow gawk;
-    inherit less buildEnv;
+    inherit less su buildEnv;
   };
 
   dotnetenv = import ../build-support/dotnetenv {