* nixpkgsPath -> nixpkgs.

svn path=/nixos/trunk/; revision=14702
This commit is contained in:
Eelco Dolstra 2009-03-25 15:47:29 +00:00
parent 70f9a365d8
commit b470feb916
7 changed files with 20 additions and 25 deletions

View file

@ -4,7 +4,7 @@
# calls the init in the root file system to start the second boot # calls the init in the root file system to start the second boot
# stage. # stage.
{ pkgs, config, nixpkgsPath, kernelPackages, modulesTree }: { pkgs, config, kernelPackages, modulesTree }:
rec { rec {

View file

@ -1,14 +1,12 @@
{nixpkgsPath ? ../../../nixpkgs, nixpkgs ? null}: {nixpkgs ? ../../../nixpkgs}:
let let
pkgs = if nixpkgs == null then pkgs = import nixpkgs {};
import "${nixpkgsPath}/pkgs/top-level/all-packages.nix" {}
else nixpkgs;
options = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext options = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext
(builtins.toXML (pkgs.lib.optionAttrSetToDocList "" (builtins.toXML (pkgs.lib.optionAttrSetToDocList ""
(import ../../system/system.nix {inherit nixpkgsPath; configuration = {};}).optionDeclarations))); (import ../../system/system.nix {inherit nixpkgs; configuration = {};}).optionDeclarations)));
optionsDocBook = pkgs.runCommand "options-db.xml" {} '' optionsDocBook = pkgs.runCommand "options-db.xml" {} ''
${pkgs.libxslt}/bin/xsltproc -o $out ${./options-to-docbook.xsl} ${options} ${pkgs.libxslt}/bin/xsltproc -o $out ${./options-to-docbook.xsl} ${options}

View file

@ -1,4 +1,4 @@
{ stdenv, perl, cdrkit, nixpkgsPath { stdenv, perl, cdrkit, nixpkgs
, # The file name of the resulting ISO image. , # The file name of the resulting ISO image.
isoName ? "cd.iso" isoName ? "cd.iso"
@ -50,5 +50,5 @@ stdenv.mkDerivation {
# For obtaining the closure of `storeContents'. # For obtaining the closure of `storeContents'.
exportReferencesGraph = exportReferencesGraph =
map (x: [("closure-" + baseNameOf x.object) x.object]) storeContents; map (x: [("closure-" + baseNameOf x.object) x.object]) storeContents;
pathsFromGraph = "${nixpkgsPath}/pkgs/build-support/kernel/paths-from-graph.pl"; pathsFromGraph = "${nixpkgs}/pkgs/build-support/kernel/paths-from-graph.pl";
} }

View file

@ -4,7 +4,7 @@
then builtins.readFile ../../relname then builtins.readFile ../../relname
else "nixos-${builtins.readFile ../../VERSION}" else "nixos-${builtins.readFile ../../VERSION}"
, compressImage ? false , compressImage ? false
, nixpkgsPath ? ../../../nixpkgs , nixpkgs ? ../../../nixpkgs
}: }:
rec { rec {
@ -200,7 +200,7 @@ rec {
system = import ../../system/system.nix { system = import ../../system/system.nix {
inherit configuration platform nixpkgsPath; inherit configuration platform nixpkgs;
}; };
@ -211,7 +211,7 @@ rec {
# 0.11 (you won't get the manual). # 0.11 (you won't get the manual).
manual = manual =
if builtins ? unsafeDiscardStringContext if builtins ? unsafeDiscardStringContext
then "${import ../../doc/manual {inherit nixpkgsPath;}}/manual.html" then "${import ../../doc/manual {inherit nixpkgs;}}/manual.html"
else pkgs.writeText "dummy-manual" "Manual not included in this build!"; else pkgs.writeText "dummy-manual" "Manual not included in this build!";
@ -230,7 +230,7 @@ rec {
# Put Nixpkgs in a tarball. # Put Nixpkgs in a tarball.
nixpkgsTarball = makeTarball "nixpkgs.tar.bz2" nixpkgsPath; nixpkgsTarball = makeTarball "nixpkgs.tar.bz2" nixpkgs;
# The configuration file for Grub. # The configuration file for Grub.
@ -255,7 +255,7 @@ rec {
# Create an ISO image containing the Grub boot loader, the kernel, # Create an ISO image containing the Grub boot loader, the kernel,
# the initrd produced above, and the closure of the stage 2 init. # the initrd produced above, and the closure of the stage 2 init.
rescueCD = import ../../helpers/make-iso9660-image.nix { rescueCD = import ../../helpers/make-iso9660-image.nix {
inherit nixpkgsPath; inherit nixpkgs;
inherit (pkgs) stdenv perl cdrkit; inherit (pkgs) stdenv perl cdrkit;
isoName = "${relName}-${platform}.iso"; isoName = "${relName}-${platform}.iso";

View file

@ -1,4 +1,4 @@
{pkgs, config, nix, nixpkgsPath}: {pkgs, config, nix}:
let let
@ -25,7 +25,7 @@ in
inherit nix; inherit nix;
nixpkgsURL = config.installer.nixpkgsURL; nixpkgsURL = config.installer.nixpkgsURL;
pathsFromGraph = "${nixpkgsPath}/pkgs/build-support/kernel/paths-from-graph.pl"; pathsFromGraph = "${pkgs.path}/build-support/kernel/paths-from-graph.pl";
nixClosure = pkgs.runCommand "closure" nixClosure = pkgs.runCommand "closure"
{exportReferencesGraph = ["refs" nix];} {exportReferencesGraph = ["refs" nix];}

View file

@ -39,7 +39,7 @@ let
}: }:
import "${nixosSrc}/doc/manual" { import "${nixosSrc}/doc/manual" {
nixpkgsPath = nixpkgs.outPath; inherit nixpkgs;
}; };
@ -58,8 +58,8 @@ let
iso = (import "${nixosSrc}/installer/cd-dvd/rescue-cd.nix" { iso = (import "${nixosSrc}/installer/cd-dvd/rescue-cd.nix" {
platform = system; platform = system;
compressImage = true; compressImage = true;
nixpkgsPath = nixpkgs.outPath;
relName = "nixos-${version}"; relName = "nixos-${version}";
inherit nixpkgs;
}).rescueCD; }).rescueCD;
in in

View file

@ -1,7 +1,6 @@
{ platform ? __currentSystem { platform ? __currentSystem
, configuration , configuration
, nixpkgsPath ? ../../nixpkgs , nixpkgs ? ../../nixpkgs
, nixpkgs ? null
}: }:
rec { rec {
@ -27,9 +26,7 @@ rec {
pkgs configComponents pkgs configComponents
config; config;
pkgs = if nixpkgs == null then pkgs = import nixpkgs {system = platform;};
import "${nixpkgsPath}/pkgs/top-level/all-packages.nix" {system = platform;}
else nixpkgs;
manifests = config.installer.manifests; # exported here because nixos-rebuild uses it manifests = config.installer.manifests; # exported here because nixos-rebuild uses it
@ -57,7 +54,7 @@ rec {
# The initial ramdisk. # The initial ramdisk.
initialRamdiskStuff = import ../boot/boot-stage-1.nix { initialRamdiskStuff = import ../boot/boot-stage-1.nix {
inherit pkgs config nixpkgsPath kernelPackages modulesTree; inherit pkgs config kernelPackages modulesTree;
}; };
initialRamdisk = initialRamdiskStuff.initialRamdisk; initialRamdisk = initialRamdiskStuff.initialRamdisk;
@ -65,7 +62,7 @@ rec {
# NixOS installation/updating tools. # NixOS installation/updating tools.
nixosTools = import ../installer { nixosTools = import ../installer {
inherit pkgs config nix nixpkgsPath; inherit pkgs config nix;
}; };
@ -155,7 +152,7 @@ rec {
# A patched `mount' command that looks in a directory in the Nix # A patched `mount' command that looks in a directory in the Nix
# store instead of in /sbin for mount helpers (like mount.ntfs-3g or # store instead of in /sbin for mount helpers (like mount.ntfs-3g or
# mount.cifs). # mount.cifs).
mount = import "${nixpkgsPath}/pkgs/os-specific/linux/util-linux" { mount = import "${nixpkgs}/pkgs/os-specific/linux/util-linux" {
inherit (pkgs) fetchurl stdenv; inherit (pkgs) fetchurl stdenv;
buildMountOnly = true; buildMountOnly = true;
mountHelpers = pkgs.buildEnv { mountHelpers = pkgs.buildEnv {