about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/filesystems/rar2fs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/filesystems/rar2fs/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/filesystems/rar2fs/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/filesystems/rar2fs/default.nix b/nixpkgs/pkgs/tools/filesystems/rar2fs/default.nix
new file mode 100644
index 000000000000..a3056a80aa1f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/rar2fs/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, fuse
+, unrar
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rar2fs";
+  version = "1.29.2";
+
+  src = fetchFromGitHub {
+    owner = "hasse69";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0j7ai0gcbln2lyfc87xxmj0zpf3lnqa6fdm5rar3kdqhczb7s93y";
+  };
+
+  postPatch = ''
+    substituteInPlace get-version.sh \
+      --replace "which echo" "echo"
+  '';
+
+  nativeBuildInputs = [ autoreconfHook ];
+  buildInputs = [ fuse unrar ];
+
+  configureFlags = [
+    "--with-unrar=${unrar.dev}/include/unrar"
+    "--disable-static-unrar"
+  ];
+
+  meta = with lib; {
+    description = "FUSE file system for reading RAR archives";
+    homepage = "https://hasse69.github.io/rar2fs/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ kraem ];
+    platforms = with platforms; linux ++ freebsd;
+  };
+}