From b470feb9161d493284fa8cc17ff7345224fe99a3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 25 Mar 2009 15:47:29 +0000 Subject: [PATCH] * nixpkgsPath -> nixpkgs. svn path=/nixos/trunk/; revision=14702 --- boot/boot-stage-1.nix | 2 +- doc/manual/default.nix | 8 +++----- helpers/make-iso9660-image.nix | 4 ++-- installer/cd-dvd/rescue-cd.nix | 10 +++++----- installer/default.nix | 4 ++-- release.nix | 4 ++-- system/system.nix | 13 +++++-------- 7 files changed, 20 insertions(+), 25 deletions(-) diff --git a/boot/boot-stage-1.nix b/boot/boot-stage-1.nix index ed53a3abdb9..3d3f5885afa 100644 --- a/boot/boot-stage-1.nix +++ b/boot/boot-stage-1.nix @@ -4,7 +4,7 @@ # calls the init in the root file system to start the second boot # stage. -{ pkgs, config, nixpkgsPath, kernelPackages, modulesTree }: +{ pkgs, config, kernelPackages, modulesTree }: rec { diff --git a/doc/manual/default.nix b/doc/manual/default.nix index 4f1e555583d..fe22e4f6c8b 100644 --- a/doc/manual/default.nix +++ b/doc/manual/default.nix @@ -1,14 +1,12 @@ -{nixpkgsPath ? ../../../nixpkgs, nixpkgs ? null}: +{nixpkgs ? ../../../nixpkgs}: let - pkgs = if nixpkgs == null then - import "${nixpkgsPath}/pkgs/top-level/all-packages.nix" {} - else nixpkgs; + pkgs = import nixpkgs {}; options = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext (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" {} '' ${pkgs.libxslt}/bin/xsltproc -o $out ${./options-to-docbook.xsl} ${options} diff --git a/helpers/make-iso9660-image.nix b/helpers/make-iso9660-image.nix index aef5408107f..ea0cd1b4d22 100644 --- a/helpers/make-iso9660-image.nix +++ b/helpers/make-iso9660-image.nix @@ -1,4 +1,4 @@ -{ stdenv, perl, cdrkit, nixpkgsPath +{ stdenv, perl, cdrkit, nixpkgs , # The file name of the resulting ISO image. isoName ? "cd.iso" @@ -50,5 +50,5 @@ stdenv.mkDerivation { # For obtaining the closure of `storeContents'. exportReferencesGraph = 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"; } diff --git a/installer/cd-dvd/rescue-cd.nix b/installer/cd-dvd/rescue-cd.nix index 6c2c0486025..ffa8fa875d1 100644 --- a/installer/cd-dvd/rescue-cd.nix +++ b/installer/cd-dvd/rescue-cd.nix @@ -4,7 +4,7 @@ then builtins.readFile ../../relname else "nixos-${builtins.readFile ../../VERSION}" , compressImage ? false -, nixpkgsPath ? ../../../nixpkgs +, nixpkgs ? ../../../nixpkgs }: rec { @@ -200,7 +200,7 @@ rec { 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). manual = 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!"; @@ -230,7 +230,7 @@ rec { # Put Nixpkgs in a tarball. - nixpkgsTarball = makeTarball "nixpkgs.tar.bz2" nixpkgsPath; + nixpkgsTarball = makeTarball "nixpkgs.tar.bz2" nixpkgs; # The configuration file for Grub. @@ -255,7 +255,7 @@ rec { # Create an ISO image containing the Grub boot loader, the kernel, # the initrd produced above, and the closure of the stage 2 init. rescueCD = import ../../helpers/make-iso9660-image.nix { - inherit nixpkgsPath; + inherit nixpkgs; inherit (pkgs) stdenv perl cdrkit; isoName = "${relName}-${platform}.iso"; diff --git a/installer/default.nix b/installer/default.nix index bf6f6ee81b9..dfa2ab38eeb 100644 --- a/installer/default.nix +++ b/installer/default.nix @@ -1,4 +1,4 @@ -{pkgs, config, nix, nixpkgsPath}: +{pkgs, config, nix}: let @@ -25,7 +25,7 @@ in inherit nix; 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" {exportReferencesGraph = ["refs" nix];} diff --git a/release.nix b/release.nix index bf8d5cc1f5e..a7f92b55dc3 100644 --- a/release.nix +++ b/release.nix @@ -39,7 +39,7 @@ let }: import "${nixosSrc}/doc/manual" { - nixpkgsPath = nixpkgs.outPath; + inherit nixpkgs; }; @@ -58,8 +58,8 @@ let iso = (import "${nixosSrc}/installer/cd-dvd/rescue-cd.nix" { platform = system; compressImage = true; - nixpkgsPath = nixpkgs.outPath; relName = "nixos-${version}"; + inherit nixpkgs; }).rescueCD; in diff --git a/system/system.nix b/system/system.nix index 913913db9af..fb09d40ae1e 100644 --- a/system/system.nix +++ b/system/system.nix @@ -1,7 +1,6 @@ { platform ? __currentSystem , configuration -, nixpkgsPath ? ../../nixpkgs -, nixpkgs ? null +, nixpkgs ? ../../nixpkgs }: rec { @@ -27,9 +26,7 @@ rec { pkgs configComponents config; - pkgs = if nixpkgs == null then - import "${nixpkgsPath}/pkgs/top-level/all-packages.nix" {system = platform;} - else nixpkgs; + pkgs = import nixpkgs {system = platform;}; manifests = config.installer.manifests; # exported here because nixos-rebuild uses it @@ -57,7 +54,7 @@ rec { # The initial ramdisk. initialRamdiskStuff = import ../boot/boot-stage-1.nix { - inherit pkgs config nixpkgsPath kernelPackages modulesTree; + inherit pkgs config kernelPackages modulesTree; }; initialRamdisk = initialRamdiskStuff.initialRamdisk; @@ -65,7 +62,7 @@ rec { # NixOS installation/updating tools. 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 # store instead of in /sbin for mount helpers (like mount.ntfs-3g or # mount.cifs). - mount = import "${nixpkgsPath}/pkgs/os-specific/linux/util-linux" { + mount = import "${nixpkgs}/pkgs/os-specific/linux/util-linux" { inherit (pkgs) fetchurl stdenv; buildMountOnly = true; mountHelpers = pkgs.buildEnv {