mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
nixos: make squashfs reproducible
This commit is contained in:
parent
8a41c43540
commit
4420d42422
2 changed files with 4 additions and 2 deletions
|
@ -55,7 +55,8 @@ stdenv.mkDerivation {
|
|||
+ ''
|
||||
|
||||
# Generate the squashfs image.
|
||||
mksquashfs nix-path-registration $(cat $closureInfo/store-paths) $imgPath ${pseudoFilesArgs} \
|
||||
# We have to set SOURCE_DATE_EPOCH to 0 here for reproducibility (https://github.com/NixOS/nixpkgs/issues/390696)
|
||||
SOURCE_DATE_EPOCH=0 mksquashfs nix-path-registration $(cat $closureInfo/store-paths) $imgPath ${pseudoFilesArgs} \
|
||||
-no-hardlinks ${lib.optionalString noStrip "-no-strip"} -keep-as-directory -all-root -b 1048576 ${compFlag} \
|
||||
-processors $NIX_BUILD_CORES -root-mode 0755
|
||||
''
|
||||
|
|
|
@ -107,7 +107,8 @@ stdenv.mkDerivation {
|
|||
|
||||
mkdir -p $out
|
||||
# the '.raw' suffix is mandatory by the portable service spec
|
||||
mksquashfs nix ${rootFsScaffold}/* $out/"${pname}_${version}.raw" \
|
||||
# We have to set SOURCE_DATE_EPOCH to 0 here for reproducibility (https://github.com/NixOS/nixpkgs/issues/390696)
|
||||
SOURCE_DATE_EPOCH=0 mksquashfs nix ${rootFsScaffold}/* $out/"${pname}_${version}.raw" \
|
||||
-quiet -noappend \
|
||||
-exit-on-error \
|
||||
-keep-as-directory \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue