squashfsTools: apply reproducibility patches

Without these patches, the output of mksquashfs is not reproducible.
The patches are taken from https://github.com/squashfskit/squashfskit,
a fork of squashfs-tools, licensed under the GPL2 or later like
squashfs-tools itself.
This commit is contained in:
Ruud van Asseldonk
2018-05-08 15:12:31 +02:00
parent 9e968fb553
commit 9c50f53065
4 changed files with 402 additions and 0 deletions
@@ -15,6 +15,15 @@ stdenv.mkDerivation rec {
rev = "9c1db6d13a51a2e009f0027ef336ce03624eac0d";
};
# These patches ensures that mksquashfs output is reproducible.
# See also https://reproducible-builds.org/docs/system-images/
# and https://github.com/NixOS/nixpkgs/issues/40144.
patches = [
./0001-If-SOURCE_DATE_EPOCH-is-set-override-timestamps-with.patch
./0002-If-SOURCE_DATE_EPOCH-is-set-also-clamp-content-times.patch
./0003-remove-frag-deflator-thread.patch
];
buildInputs = [ zlib xz ]
++ stdenv.lib.optional lz4Support lz4;