Merge pull request #9927 from oxij/nixos-discoverability

nixos: rename some outputs for better discoverability in /nix/store
This commit is contained in:
Arseniy Seroka 2015-09-19 00:17:49 +03:00
commit b2578aa871
5 changed files with 7 additions and 5 deletions

View File

@ -99,7 +99,9 @@ let
# makes it bootable. # makes it bootable.
baseSystem = showWarnings ( baseSystem = showWarnings (
if [] == failed then pkgs.stdenv.mkDerivation { if [] == failed then pkgs.stdenv.mkDerivation {
name = "nixos-${config.system.nixosVersion}"; name = let hn = config.networking.hostName;
nn = if (hn != "") then hn else "unnamed";
in "nixos-system-${nn}-${config.system.nixosVersion}";
preferLocalBuild = true; preferLocalBuild = true;
allowSubstitutes = false; allowSubstitutes = false;
buildCommand = systemBuilder; buildCommand = systemBuilder;

View File

@ -26,7 +26,7 @@ in
${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -O vpc $diskImage $out/disk.vhd ${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -O vpc $diskImage $out/disk.vhd
rm $diskImage rm $diskImage
''; '';
diskImageBase = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw"; diskImageBase = "nixos-image-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
buildInputs = [ pkgs.utillinux pkgs.perl ]; buildInputs = [ pkgs.utillinux pkgs.perl ];
exportReferencesGraph = exportReferencesGraph =
[ "closure" config.system.build.toplevel ]; [ "closure" config.system.build.toplevel ];

View File

@ -26,7 +26,7 @@ in
rm $diskImageBase rm $diskImageBase
popd popd
''; '';
diskImageBase = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw"; diskImageBase = "nixos-image-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
buildInputs = [ pkgs.utillinux pkgs.perl ]; buildInputs = [ pkgs.utillinux pkgs.perl ];
exportReferencesGraph = exportReferencesGraph =
[ "closure" config.system.build.toplevel ]; [ "closure" config.system.build.toplevel ];

View File

@ -30,7 +30,7 @@ in
rm $out/disk.raw rm $out/disk.raw
popd popd
''; '';
diskImageBase = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw"; diskImageBase = "nixos-image-${config.system.nixosVersion}-${pkgs.stdenv.system}.raw";
buildInputs = [ pkgs.utillinux pkgs.perl ]; buildInputs = [ pkgs.utillinux pkgs.perl ];
exportReferencesGraph = exportReferencesGraph =
[ "closure" config.system.build.toplevel ]; [ "closure" config.system.build.toplevel ];

View File

@ -101,7 +101,7 @@ in {
system.build.virtualBoxOVA = pkgs.runCommand "virtualbox-ova" system.build.virtualBoxOVA = pkgs.runCommand "virtualbox-ova"
{ buildInputs = [ pkgs.linuxPackages.virtualbox ]; { buildInputs = [ pkgs.linuxPackages.virtualbox ];
vmName = "NixOS ${config.system.nixosVersion} (${pkgs.stdenv.system})"; vmName = "NixOS ${config.system.nixosVersion} (${pkgs.stdenv.system})";
fileName = "nixos-${config.system.nixosVersion}-${pkgs.stdenv.system}.ova"; fileName = "nixos-image-${config.system.nixosVersion}-${pkgs.stdenv.system}.ova";
} }
'' ''
echo "creating VirtualBox VM..." echo "creating VirtualBox VM..."