Fix ISO building from a channel
Building config.system.build.isoImage would fail with the following
error using the channel:
ln: failed to create symbolic link
'/nix/store/zz0hzi5imrg4927v6f8mv281qs6v6pbq-nixos-16.03pre69762.e916273/nixos/nixpkgs/.': File exists
The fix skips symlink as it already exists if the channel
nixpkgs copy is used.
Fixes #10367
commit75284b09e16f3168abc5273a9ed28d1fb4b33adf
authorDomen Kožar <domen@dev.si>
dateSat 16 Jan 2016, 21:55 (11 years ago)
parent3605782
nixos/modules/installer/cd-dvd/channel.nix+3−1
@@ -17,7 +17,9 @@ let
1717 mkdir -p $out
1818 cp -prd ${pkgs.path} $out/nixos
1919 chmod -R u+w $out/nixos
20− ln -s . $out/nixos/nixpkgs
20+ if [ ! -e $out/nixos/nixpkgs ]; then
21+ ln -s . $out/nixos/nixpkgs
22+ fi
2123 rm -rf $out/nixos/.git
2224 echo -n ${config.system.nixosVersionSuffix} > $out/nixos/.version-suffix
2325 '';