15 stdenv.mkDerivation rec {
19 src = fetchFromGitHub {
21 repo = "squashfs-tools";
23 sha256 = "sha256-Y3ZPjeE9HN1F+NtGe6EchYziWrTPVQ4SuKaCvNbXMKI=";
27 # remove once https://github.com/plougher/squashfs-tools/pull/177 is merged and in a release
29 url = "https://github.com/plougher/squashfs-tools/commit/6100e82c7e7f18f503c003c67c87791025d5f01b.patch";
30 sha256 = "sha256-bMBQsbSKQ4E7r9avns2QaomGAYl3s82m58gYyTQdB08=";
32 # This patch adds an option to pad filesystems (increasing size) in
33 # exchange for better chunking / binary diff calculation.
35 ] ++ lib.optional stdenv.isDarwin ./darwin.patch;
38 nativeBuildInputs = [ which ]
39 # when cross-compiling help2man cannot run the cross-compiled binary
40 ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ help2man ];
41 buildInputs = [ zlib xz zstd lz4 lzo ];
48 "INSTALL_DIR=${placeholder "out"}/bin"
49 "INSTALL_MANPAGES_DIR=${placeholder "out"}/share/man/man1"
60 nixos-iso-boots-and-verifies = nixosTests.boot.biosCdrom;
64 homepage = "https://github.com/plougher/squashfs-tools";
65 description = "Tool for creating and unpacking squashfs filesystems";
66 platforms = platforms.unix;
67 license = licenses.gpl2Plus;
68 maintainers = with maintainers; [ ruuda ];
69 mainProgram = "mksquashfs";