Synced with trunk @ 15508

svn path=/nixos/branches/modular-nixos/; revision=15641
This commit is contained in:
Marc Weber 2009-05-18 12:02:27 +00:00
parent 81d6032c43
commit f51620cdff

View File

@ -5,6 +5,7 @@
else "nixos-${builtins.readFile ../../VERSION}" else "nixos-${builtins.readFile ../../VERSION}"
, compressImage ? false , compressImage ? false
, nixpkgs ? ../../../nixpkgs , nixpkgs ? ../../../nixpkgs
, services ? ../../../services
# This option allows easy building of Rescue CD with # This option allows easy building of Rescue CD with
# modified package set / driver set / anything. # modified package set / driver set / anything.
# For easier maitenance, let overrider know the current # For easier maitenance, let overrider know the current
@ -12,6 +13,7 @@
, configurationOverrides ? (config: {}) , configurationOverrides ? (config: {})
# Whether to put all the build-time dependencies on DVD # Whether to put all the build-time dependencies on DVD
, includeBuildDeps ? false , includeBuildDeps ? false
, includeTarballs ? true
}: }:
rec { rec {
@ -127,6 +129,8 @@ rec {
tar xjf /install/nixos.tar.bz2 -C /etc/nixos/nixos tar xjf /install/nixos.tar.bz2 -C /etc/nixos/nixos
mkdir -p /etc/nixos/nixpkgs mkdir -p /etc/nixos/nixpkgs
tar xjf /install/nixpkgs.tar.bz2 -C /etc/nixos/nixpkgs tar xjf /install/nixpkgs.tar.bz2 -C /etc/nixos/nixpkgs
mkdir -p /etc/nixos/services
tar xjf /install/services.tar.bz2 -C /etc/nixos/services
chown -R root.root /etc/nixos chown -R root.root /etc/nixos
end script end script
"; ";
@ -202,6 +206,10 @@ rec {
nixosTarball = makeTarball "nixos.tar.bz2" ../..; nixosTarball = makeTarball "nixos.tar.bz2" ../..;
# Put Services in a tarball.
servicesTarball = makeTarball "services.tar.bz2" services;
# Put Nixpkgs in a tarball. # Put Nixpkgs in a tarball.
nixpkgsTarball = makeTarball "nixpkgs.tar.bz2" nixpkgs; nixpkgsTarball = makeTarball "nixpkgs.tar.bz2" nixpkgs;
@ -259,12 +267,18 @@ rec {
{ source = system.config.boot.grubSplashImage; { source = system.config.boot.grubSplashImage;
target = "boot/background.xpm.gz"; target = "boot/background.xpm.gz";
} }
]
++
pkgs.lib.optionals includeTarballs [
{ source = nixosTarball + "/" + nixosTarball.tarName; { source = nixosTarball + "/" + nixosTarball.tarName;
target = "/install/" + nixosTarball.tarName; target = "/install/" + nixosTarball.tarName;
} }
{ source = nixpkgsTarball + "/nixpkgs.tar.bz2"; { source = nixpkgsTarball + "/nixpkgs.tar.bz2";
target = "/install/nixpkgs.tar.bz2"; target = "/install/nixpkgs.tar.bz2";
} }
{ source = servicesTarball + "/services.tar.bz2";
target = "/install/services.tar.bz2";
}
]; ];
# Closures to be copied to the Nix store on the CD. # Closures to be copied to the Nix store on the CD.