summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/archivers/unrar/default.nix5
-rw-r--r--pkgs/tools/filesystems/rar2fs/default.nix39
2 files changed, 43 insertions, 1 deletions
diff --git a/pkgs/tools/archivers/unrar/default.nix b/pkgs/tools/archivers/unrar/default.nix
index 0fe8f2f5866..62fd02ac56d 100644
--- a/pkgs/tools/archivers/unrar/default.nix
+++ b/pkgs/tools/archivers/unrar/default.nix
@@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
     make lib
   '';
 
+  outputs = [ "out" "dev" ];
+
   installPhase = ''
     install -Dt "$out/bin" unrar
 
@@ -30,7 +32,8 @@ stdenv.mkDerivation rec {
         $out/share/doc/unrar
 
     install -Dm755 libunrar.so $out/lib/libunrar.so
-    install -D dll.hpp $out/include/unrar/dll.hpp
+
+    install -Dt $dev/include/unrar/ *.hpp
   '';
 
   setupHook = ./setup-hook.sh;
diff --git a/pkgs/tools/filesystems/rar2fs/default.nix b/pkgs/tools/filesystems/rar2fs/default.nix
new file mode 100644
index 00000000000..996e3c52ec2
--- /dev/null
+++ b/pkgs/tools/filesystems/rar2fs/default.nix
@@ -0,0 +1,39 @@
+{ stdenv
+, fetchFromGitHub
+, autoreconfHook
+, fuse
+, unrar
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rar2fs";
+  version = "1.28.0";
+
+  src = fetchFromGitHub {
+    owner = "hasse69";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0fmdqrs5yvn89ngc26vj5ggnalpwrdm8pdcfszw1wflh78hvd8kb";
+  };
+
+  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 stdenv.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;
+  };
+}