about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/filesystems/erofs-utils
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/filesystems/erofs-utils')
-rw-r--r--nixpkgs/pkgs/tools/filesystems/erofs-utils/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/filesystems/erofs-utils/default.nix b/nixpkgs/pkgs/tools/filesystems/erofs-utils/default.nix
new file mode 100644
index 000000000000..e25df7288094
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/erofs-utils/default.nix
@@ -0,0 +1,39 @@
+{ 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; {
+    homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/about/";
+    description = "Userspace utilities for linux-erofs file system";
+    license = with licenses; [ gpl2Plus ];
+    maintainers = with maintainers; [ ehmry nikstur ];
+    platforms = platforms.unix;
+  };
+}