1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/modules/installer/tools/nixos-bootstrap-archive/default.nix
Lluís Batlle i Rossell 41cc6ecdbb Trying to make the nixos-bootstrap-archive (nixos-minimal-archive in other places named) to have an
hydra build product for easy tarball download.


svn path=/nixos/trunk/; revision=22440
2010-07-01 17:54:03 +00:00

23 lines
839 B
Nix

args: with args;
# TODO add revision number or such
runCommand "nixos-bootstrap-archive" { } ''
PATH=${perl}/bin:${coreutils}/bin:${gnutar}/bin:${bzip2}/bin
storePaths=$(perl ${pathsFromGraph} ${nixClosure})
s(){ echo -C $(dirname $1) $(basename $1); }
mkdir $out
tar cf tmp.tar ${nixClosure} $storePaths
cp ${./README-BOOTSTRAP-NIXOS} README-BOOTSTRAP-NIXOS
tar --append -f tmp.tar README-BOOTSTRAP-NIXOS
tar --append -f tmp.tar --transform 's@^@/nix/store/@' \
$(s ${nixosPrepareInstall}/bin/nixos-prepare-install ) \
$(s ${runInChroot}/bin/run-in-chroot ) \
$(s ${nixosBootstrap}/bin/nixos-bootstrap )
cat tmp.tar | bzip2 > $out/nixos-install-archive.tar.bz2
ensureDir $out/nix-support
echo "file tarball" $out/nixos-install-archive.tar.bz2 > $out/nix-support/hydra-build-products
''