From 21a2f2ba3bc8962845f0b45cacac4e47557ebf13 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 18 Apr 2016 20:06:50 +0200 Subject: [PATCH] nix: Add a "dev" output This gets rid of boehm-dev in the closure (as well as Nix's own headers). --- nixos/default.nix | 2 +- nixos/modules/services/misc/nix-daemon.nix | 4 ++-- pkgs/build-support/replace-dependency.nix | 2 +- pkgs/development/ruby-modules/bundix/default.nix | 6 +++--- pkgs/tools/package-management/nix/default.nix | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nixos/default.nix b/nixos/default.nix index 5d69b79e13a..5f3e2ae081c 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -39,5 +39,5 @@ in vmWithBootLoader = vmWithBootLoaderConfig.system.build.vm; # The following are used by nixos-rebuild. - nixFallback = pkgs.nixUnstable; + nixFallback = pkgs.nixUnstable.out; } diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index 911f79e5756..10ac6f93cfd 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -65,8 +65,8 @@ in package = mkOption { type = types.package; - default = pkgs.nix; - defaultText = "pkgs.nix"; + default = pkgs.nix.out; + defaultText = "pkgs.nix.out"; description = '' This option specifies the Nix package instance to use throughout the system. ''; diff --git a/pkgs/build-support/replace-dependency.nix b/pkgs/build-support/replace-dependency.nix index 4ac47f9a9f2..b0174ca24ab 100644 --- a/pkgs/build-support/replace-dependency.nix +++ b/pkgs/build-support/replace-dependency.nix @@ -61,7 +61,7 @@ let drvName = drv: discard (substring 33 (stringLength (builtins.baseNameOf drv)) (builtins.baseNameOf drv)); - rewriteHashes = drv: hashes: runCommand (drvName drv) { nixStore = "${nix}/bin/nix-store"; } '' + rewriteHashes = drv: hashes: runCommand (drvName drv) { nixStore = "${nix.out}/bin/nix-store"; } '' $nixStore --dump ${drv} | sed 's|${baseNameOf drv}|'$(basename $out)'|g' | sed -e ${ concatStringsSep " -e " (mapAttrsToList (name: value: "'s|${baseNameOf name}|${baseNameOf value}|g'" diff --git a/pkgs/development/ruby-modules/bundix/default.nix b/pkgs/development/ruby-modules/bundix/default.nix index ac3abcdcdf7..378f148ca6a 100644 --- a/pkgs/development/ruby-modules/bundix/default.nix +++ b/pkgs/development/ruby-modules/bundix/default.nix @@ -15,13 +15,13 @@ buildRubyGem rec { substituteInPlace $GEM_HOME/gems/${gemName}-${version}/lib/bundix.rb \ --replace \ "'nix-instantiate'" \ - "'${nix}/bin/nix-instantiate'" \ + "'${nix.out}/bin/nix-instantiate'" \ --replace \ "'nix-hash'" \ - "'${nix}/bin/nix-hash'" \ + "'${nix.out}/bin/nix-hash'" \ --replace \ "'nix-prefetch-url'" \ - "'${nix}/bin/nix-prefetch-url'" \ + "'${nix.out}/bin/nix-prefetch-url'" \ --replace \ "'nix-prefetch-git'" \ "'${nix-prefetch-git}/bin/nix-prefetch-git'" diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 16078906bc2..bf3f8aed712 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -9,7 +9,7 @@ let common = { name, src }: stdenv.mkDerivation rec { inherit name src; - outputs = [ "out" "man" "doc" ]; + outputs = [ "dev" "out" "man" "doc" ]; nativeBuildInputs = [ perl pkgconfig ];