diff options
author | Cole Mickens <cole.mickens@gmail.com> | 2023-09-22 16:48:54 +0200 |
---|---|---|
committer | Cole Mickens <cole.mickens@gmail.com> | 2024-01-07 22:46:20 -0600 |
commit | 5a718794d0f559963fd5a21e18896a66c5232645 (patch) | |
tree | 46cc0a36fd734bce34e73f11f59eddf4eecd4bb0 /nixos/lib/make-squashfs.nix | |
parent | ad51bcc62abee5437b981380a065809ca9ec13ab (diff) |
nixos/lib/make-squashfs.nix: allow disabling compression
Diffstat (limited to 'nixos/lib/make-squashfs.nix')
-rw-r--r-- | nixos/lib/make-squashfs.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/lib/make-squashfs.nix b/nixos/lib/make-squashfs.nix index 4b6b567399484..f28e2c6715805 100644 --- a/nixos/lib/make-squashfs.nix +++ b/nixos/lib/make-squashfs.nix @@ -14,6 +14,7 @@ let pseudoFilesArgs = lib.concatMapStrings (f: ''-p "${f}" '') pseudoFiles; + compFlag = if comp == null then "-no-compression" else "-comp ${comp}"; in stdenv.mkDerivation { name = "${fileName}.img"; @@ -39,7 +40,7 @@ stdenv.mkDerivation { # Generate the squashfs image. mksquashfs nix-path-registration $(cat $closureInfo/store-paths) $out ${pseudoFilesArgs} \ - -no-hardlinks ${lib.optionalString noStrip "-no-strip"} -keep-as-directory -all-root -b 1048576 -comp ${comp} \ + -no-hardlinks ${lib.optionalString noStrip "-no-strip"} -keep-as-directory -all-root -b 1048576 ${compFlag} \ -processors $NIX_BUILD_CORES ''; } |