nixpkgs-suyu/pkgs/tools/filesystems/sasquatch/default.nix

62 lines
1.4 KiB
Nix
Raw Normal View History

2021-04-18 04:35:06 +02:00
{ lib
, stdenv
, fetchFromGitHub
2019-08-14 03:16:32 +02:00
, fetchurl
, xz
2021-04-18 04:35:06 +02:00
, lzo
2019-08-14 03:16:32 +02:00
, zlib
2021-04-18 04:35:06 +02:00
, zstd
, lz4
, lz4Support ? false
2019-08-14 03:16:32 +02:00
}:
let
2021-04-18 04:35:06 +02:00
patch = fetchFromGitHub
{
# NOTE: This uses my personal fork for now, until
# https://github.com/devttys0/sasquatch/pull/40 is merged.
# I, cole-h, will keep this fork available until that happens.
owner = "cole-h";
repo = "sasquatch";
rev = "6edc54705454c6410469a9cb5bc58e412779731a";
sha256 = "x+PuPYGD4Pd0fcJtlLWByGy/nggsmZkxwSXxJfPvUgo=";
} + "/patches/patch0.txt";
2019-08-14 03:16:32 +02:00
in
stdenv.mkDerivation rec {
pname = "sasquatch";
2021-04-18 04:35:06 +02:00
version = "4.4";
2019-08-14 03:16:32 +02:00
src = fetchurl {
2021-04-18 04:35:06 +02:00
url = "mirror://sourceforge/squashfs/squashfs${version}.tar.gz";
sha256 = "qYGz8/IFS1ouZYhRo8BqJGCtBKmopkXgr+Bjpj/bsH4=";
2019-08-14 03:16:32 +02:00
};
2021-04-18 04:35:06 +02:00
buildInputs = [
xz
lzo
zlib
zstd
]
++ lib.optionals lz4Support [ lz4 ];
2019-08-14 03:16:32 +02:00
patches = [ patch ];
patchFlags = [ "-p0" ];
postPatch = ''
cd squashfs-tools
'';
2019-11-05 02:10:31 +01:00
installFlags = [ "INSTALL_DIR=\${out}/bin" ];
2019-08-14 03:16:32 +02:00
makeFlags = [ "XZ_SUPPORT=1" ]
2021-01-15 10:19:50 +01:00
++ lib.optional lz4Support "LZ4_SUPPORT=1";
2019-08-14 03:16:32 +02:00
meta = with lib; {
2019-08-14 03:16:32 +02:00
homepage = "https://github.com/devttys0/sasquatch";
description = "Set of patches to the standard unsquashfs utility (part of squashfs-tools) that attempts to add support for as many hacked-up vendor-specific SquashFS implementations as possible";
license = licenses.gpl2Plus;
maintainers = [ maintainers.pamplemousse ];
platforms = platforms.linux;
};
}