depot/third_party/nixpkgs/pkgs/tools/filesystems/erofs-utils/default.nix
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

38 lines
1.2 KiB
Nix

{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, pkg-config, fuse, util-linux, lz4, zlib
, fuseSupport ? stdenv.isLinux
}:
stdenv.mkDerivation rec {
pname = "erofs-utils";
version = "1.7";
outputs = [ "out" "man" ];
src = fetchurl {
url =
"https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/snapshot/erofs-utils-${version}.tar.gz";
hash = "sha256-tutSm7Qj6y3XecnanCYyhVSItLkeI1U6Mc4j8Rycziw=";
};
patches = [
# Fixes #261394. Can be dropped with the next erofs version.
(fetchpatch {
url = "https://github.com/erofs/erofs-utils/commit/8cbc205185a18b9510f4c1fbd54957354f696321.patch";
hash = "sha256-CQ5hxav5+HGnBVJW66St9FaVgkuqhkv89rjC/4cmXLs=";
})
];
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ util-linux lz4 zlib ]
++ lib.optionals fuseSupport [ fuse ];
configureFlags = [
"MAX_BLOCK_SIZE=4096"
] ++ lib.optional fuseSupport "--enable-fuse";
meta = with lib; {
description = "Userspace utilities for linux-erofs file system";
license = with licenses; [ gpl2Plus ];
maintainers = with maintainers; [ ehmry nikstur ];
platforms = platforms.unix;
};
}