nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 fuse2,
7 unrar,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "rar2fs";
12 version = "1.29.7";
13
14 src = fetchFromGitHub {
15 owner = "hasse69";
16 repo = "rar2fs";
17 rev = "v${version}";
18 sha256 = "sha256-iYlmNtaJZrnsNNNlaoV1Vu6PHrHIr/glhgs3784JCm4=";
19 };
20
21 postPatch = ''
22 substituteInPlace get-version.sh \
23 --replace "which echo" "echo"
24 '';
25
26 nativeBuildInputs = [ autoreconfHook ];
27 buildInputs = [
28 fuse2
29 unrar
30 ];
31
32 configureFlags = [
33 "--with-unrar=${unrar.src}/unrar"
34 "--disable-static-unrar"
35 ];
36
37 meta = with lib; {
38 description = "FUSE file system for reading RAR archives";
39 homepage = "https://hasse69.github.io/rar2fs/";
40 license = licenses.gpl3Plus;
41 maintainers = with maintainers; [
42 kraem
43 wegank
44 ];
45 platforms = with platforms; linux ++ freebsd;
46 };
47}