From 104c841c85702ab684393f958bf90bdb23af52c5 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Fri, 18 Apr 2014 13:30:24 +0200 Subject: Move su to the base packages of chrootenv builder --- pkgs/build-support/build-fhs-chrootenv/default.nix | 28 ++++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'pkgs/build-support') 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" -- cgit 1.4.1