summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2017-11-11 19:26:50 +0000
committerOrivej Desh <orivej@gmx.fr>2017-11-11 20:24:26 +0000
commitf218ef647ce090e240ba771700fcf3c1a6a01800 (patch)
tree47f74e2acd087330449abf0fae3a9a17d3b62b00 /nixos
parent462b5e0d21f3735b0dc8fecb70ffa616ffd0fef6 (diff)
downloadnixpkgs-f218ef647ce090e240ba771700fcf3c1a6a01800.tar
nixpkgs-f218ef647ce090e240ba771700fcf3c1a6a01800.tar.gz
nixpkgs-f218ef647ce090e240ba771700fcf3c1a6a01800.tar.bz2
nixpkgs-f218ef647ce090e240ba771700fcf3c1a6a01800.tar.lz
nixpkgs-f218ef647ce090e240ba771700fcf3c1a6a01800.tar.xz
nixpkgs-f218ef647ce090e240ba771700fcf3c1a6a01800.tar.zst
nixpkgs-f218ef647ce090e240ba771700fcf3c1a6a01800.zip
make-disk-image: clean up
Diffstat (limited to 'nixos')
-rw-r--r--nixos/lib/make-disk-image.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix
index 865be297c06..f1cbd0b9c08 100644
--- a/nixos/lib/make-disk-image.nix
+++ b/nixos/lib/make-disk-image.nix
@@ -33,7 +33,8 @@
 
 , name ? "nixos-disk-image"
 
-, format ? "raw"
+, # Disk image format, one of qcow2, vpc, raw.
+  format ? "raw"
 }:
 
 with lib;
@@ -45,7 +46,7 @@ let
     raw   = "img";
   };
 
-  nixpkgs = lib.cleanSource pkgs.path;
+  nixpkgs = cleanSource pkgs.path;
 
   channelSources = pkgs.runCommand "nixos-${config.system.nixosVersion}" {} ''
     mkdir -p $out
@@ -73,7 +74,7 @@ let
   targets = map (x: x.target) contents;
 
   prepareImage = ''
-    export PATH=${pkgs.lib.makeSearchPathOutput "bin" "bin" prepareImageInputs}
+    export PATH=${makeSearchPathOutput "bin" "bin" prepareImageInputs}
 
     mkdir $out
     diskImage=nixos.raw
@@ -87,7 +88,7 @@ let
     ''}
 
     faketime -f "1970-01-01 00:00:01" mkfs.${fsType} -F -L nixos -E offset=$offset $diskImage
-  
+
     root="$PWD/root"
     mkdir -p $root
 
@@ -132,7 +133,7 @@ let
     # shut it up someday but trying to do a stderr filter through grep is running into some nasty
     # bug in some eval nonsense we have in runInLinuxVM and I'm sick of trying to fix it.
     faketime -f "1970-01-01 00:00:00" \
-      cptofs ${pkgs.lib.optionalString partitioned "-P 1"} -t ${fsType} -i $diskImage $root/* /
+      cptofs ${optionalString partitioned "-P 1"} -t ${fsType} -i $diskImage $root/* /
   '';
 in pkgs.vmTools.runInLinuxVM (
   pkgs.runCommand name