about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/filesystems/rar2fs/default.nix
blob: 0c752e7114534ddce786d1fc28cc5ddcae47d493 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, fuse
, unrar_6
}:

stdenv.mkDerivation rec {
  pname = "rar2fs";
  version = "1.29.6";

  src = fetchFromGitHub {
    owner = "hasse69";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-b8zMCzSFJewXMQOuaKwMJx//Wq9vT/bUj6XS/jDBBBo=";
  };

  postPatch = ''
    substituteInPlace get-version.sh \
      --replace "which echo" "echo"
  '';

  nativeBuildInputs = [ autoreconfHook ];
  buildInputs = [ fuse unrar_6 ];

  configureFlags = [
    "--with-unrar=${unrar_6.src}/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 wegank ];
    platforms = with platforms; linux ++ freebsd;
  };
}