diff --git a/boot/boot-stage-1.nix b/boot/boot-stage-1.nix index ed53a3abdb9e..3d3f5885afa1 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 4f1e555583d2..fe22e4f6c8bf 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 aef5408107f8..ea0cd1b4d223 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 6c2c0486025b..ffa8fa875d14 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 bf6f6ee81b92..dfa2ab38eeba 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 bf8d5cc1f5eb..a7f92b55dc3e 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 913913db9afd..fb09d40ae1eb 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 {