nix: Add a "dev" output

This gets rid of boehm-dev in the closure (as well as Nix's own
headers).
This commit is contained in:
Eelco Dolstra 2016-04-18 20:06:50 +02:00
parent 961ad19660
commit 21a2f2ba3b
5 changed files with 8 additions and 8 deletions

View File

@ -39,5 +39,5 @@ in
vmWithBootLoader = vmWithBootLoaderConfig.system.build.vm; vmWithBootLoader = vmWithBootLoaderConfig.system.build.vm;
# The following are used by nixos-rebuild. # The following are used by nixos-rebuild.
nixFallback = pkgs.nixUnstable; nixFallback = pkgs.nixUnstable.out;
} }

View File

@ -65,8 +65,8 @@ in
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = pkgs.nix; default = pkgs.nix.out;
defaultText = "pkgs.nix"; defaultText = "pkgs.nix.out";
description = '' description = ''
This option specifies the Nix package instance to use throughout the system. This option specifies the Nix package instance to use throughout the system.
''; '';

View File

@ -61,7 +61,7 @@ let
drvName = drv: drvName = drv:
discard (substring 33 (stringLength (builtins.baseNameOf drv)) (builtins.baseNameOf 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 ${ $nixStore --dump ${drv} | sed 's|${baseNameOf drv}|'$(basename $out)'|g' | sed -e ${
concatStringsSep " -e " (mapAttrsToList (name: value: concatStringsSep " -e " (mapAttrsToList (name: value:
"'s|${baseNameOf name}|${baseNameOf value}|g'" "'s|${baseNameOf name}|${baseNameOf value}|g'"

View File

@ -15,13 +15,13 @@ buildRubyGem rec {
substituteInPlace $GEM_HOME/gems/${gemName}-${version}/lib/bundix.rb \ substituteInPlace $GEM_HOME/gems/${gemName}-${version}/lib/bundix.rb \
--replace \ --replace \
"'nix-instantiate'" \ "'nix-instantiate'" \
"'${nix}/bin/nix-instantiate'" \ "'${nix.out}/bin/nix-instantiate'" \
--replace \ --replace \
"'nix-hash'" \ "'nix-hash'" \
"'${nix}/bin/nix-hash'" \ "'${nix.out}/bin/nix-hash'" \
--replace \ --replace \
"'nix-prefetch-url'" \ "'nix-prefetch-url'" \
"'${nix}/bin/nix-prefetch-url'" \ "'${nix.out}/bin/nix-prefetch-url'" \
--replace \ --replace \
"'nix-prefetch-git'" \ "'nix-prefetch-git'" \
"'${nix-prefetch-git}/bin/nix-prefetch-git'" "'${nix-prefetch-git}/bin/nix-prefetch-git'"

View File

@ -9,7 +9,7 @@ let
common = { name, src }: stdenv.mkDerivation rec { common = { name, src }: stdenv.mkDerivation rec {
inherit name src; inherit name src;
outputs = [ "out" "man" "doc" ]; outputs = [ "dev" "out" "man" "doc" ];
nativeBuildInputs = [ perl pkgconfig ]; nativeBuildInputs = [ perl pkgconfig ];