2016-09-13 00:08:09 +01:00
|
|
|
{ stdenv, fetchFromGitHub, zlib, xz
|
|
|
|
, lz4 ? null
|
|
|
|
, lz4Support ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert lz4Support -> (lz4 != null);
|
2006-09-08 16:19:43 +01:00
|
|
|
|
2009-06-05 14:52:24 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2014-10-22 13:36:56 +01:00
|
|
|
name = "squashfs-4.4dev";
|
2009-04-23 14:31:10 +01:00
|
|
|
|
2016-09-12 22:11:37 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "plougher";
|
|
|
|
repo = "squashfs-tools";
|
2014-10-22 13:36:56 +01:00
|
|
|
sha256 = "059pa2shdysr3zfmwrhq28s12zbi5nyzbpzyaf5lmspgfh1493ks";
|
|
|
|
rev = "9c1db6d13a51a2e009f0027ef336ce03624eac0d";
|
2006-09-08 16:19:43 +01:00
|
|
|
};
|
2013-04-12 14:25:53 +01:00
|
|
|
|
2018-05-08 12:19:14 +01:00
|
|
|
# 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
|
2018-06-01 17:21:11 +01:00
|
|
|
] ++ stdenv.lib.optional stdenv.isDarwin ./darwin.patch;
|
2018-05-08 12:19:14 +01:00
|
|
|
|
2016-09-13 00:08:09 +01:00
|
|
|
buildInputs = [ zlib xz ]
|
|
|
|
++ stdenv.lib.optional lz4Support lz4;
|
2009-04-23 14:31:10 +01:00
|
|
|
|
2012-01-20 17:43:50 +00:00
|
|
|
preBuild = "cd squashfs-tools";
|
2013-04-12 14:25:53 +01:00
|
|
|
|
2009-06-05 14:52:24 +01:00
|
|
|
installFlags = "INSTALL_DIR=\${out}/bin";
|
2013-04-12 14:25:53 +01:00
|
|
|
|
2016-09-13 00:08:09 +01:00
|
|
|
makeFlags = [ "XZ_SUPPORT=1" ]
|
|
|
|
++ stdenv.lib.optional lz4Support "LZ4_SUPPORT=1";
|
2013-04-12 14:25:53 +01:00
|
|
|
|
2009-06-05 14:52:24 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://squashfs.sourceforge.net/;
|
|
|
|
description = "Tool for creating and unpacking squashfs filesystems";
|
2018-06-01 17:21:11 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2018-05-08 12:32:06 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ ruuda ];
|
2009-06-05 14:52:24 +01:00
|
|
|
};
|
2006-09-08 16:19:43 +01:00
|
|
|
}
|