nixpkgs-suyu/make-disk.sh
Armijn Hemel b31d4e8079 copy nixpkgs, so it reflects what was built. This code uses a simple "cp -a"
so there is a race condition (nixpkgs being altered after the build). However,
with a bit of care and "policy" this should work ;-)

Also push all packages we want to push at once.

svn path=/nixu/trunk/; revision=3292
2005-07-05 14:39:12 +00:00

19 lines
838 B
Bash
Executable file

#! /bin/sh -e
archivesDir=/tmp/arch
manifest=${archivesDir}/MANIFEST
nixpkgs=/nixpkgs/trunk/pkgs
NIX_CMD_PATH=/nix/bin
storeExpr=$(echo '(import ./pkgs.nix).everything' | $NIX_CMD_PATH/nix-instantiate -v -v -)
$NIX_CMD_PATH/nix-push --copy $archivesDir $manifest $(nix-store -r $storeExpr) $(nix-store -r $(echo '(import ./pkgs.nix).kernel' | $NIX_CMD_PATH/nix-instantiate -))
#$NIX_CMD_PATH/nix-push --copy $archivesDir $manifest $(nix-store -r $(echo '(import ./pkgs.nix).kernel' | $NIX_CMD_PATH/nix-instantiate -))
# Location of sysvinit?
#sysvinitPath=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).sysvinit' | $NIX_CMD_PATH/nix-instantiate -))
# Location of Nix boot scripts?
#bootPath=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).boot' | $NIX_CMD_PATH/nix-instantiate -))
cp -a ${nixpkgs} ${archivesDir}