3
0
Fork 0
forked from mirrors/nixpkgs

Use "mkdir -p" when creating ~/.nix-defexpr

Otherwise, simultaneous invocations of /etc/profile can fail, e.g.

  mkdir: cannot create directory ‘/.nix-defexpr’: File exists
This commit is contained in:
Eelco Dolstra 2015-04-20 13:03:04 +02:00
parent d69b205527
commit 11a9774c75

View file

@ -53,7 +53,7 @@ in
# Set up a default Nix expression from which to install stuff. # Set up a default Nix expression from which to install stuff.
if [ ! -e $HOME/.nix-defexpr -o -L $HOME/.nix-defexpr ]; then if [ ! -e $HOME/.nix-defexpr -o -L $HOME/.nix-defexpr ]; then
rm -f $HOME/.nix-defexpr rm -f $HOME/.nix-defexpr
mkdir $HOME/.nix-defexpr mkdir -p $HOME/.nix-defexpr
if [ "$USER" != root ]; then if [ "$USER" != root ]; then
ln -s /nix/var/nix/profiles/per-user/root/channels $HOME/.nix-defexpr/channels_root ln -s /nix/var/nix/profiles/per-user/root/channels $HOME/.nix-defexpr/channels_root
fi fi