nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 libxml2,
6 file,
7 p7zip,
8 unrar,
9 unzip,
10}:
11
12stdenv.mkDerivation {
13 pname = "rarcrack";
14 version = "0.2";
15
16 src = fetchFromGitHub {
17 owner = "jaredsburrows";
18 repo = "Rarcrack";
19 rev = "35ead64cd2b967eec3e3e3a4c328b89b11ff32a0";
20 sha256 = "134fq84896w5vp8vg4qg0ybpb466njibigyd7bqqm1xydr07qrgn";
21 };
22
23 nativeBuildInputs = [ unzip ];
24 buildInputs = [
25 libxml2
26 file
27 p7zip
28 unrar
29 ];
30 buildFlags = lib.optional stdenv.cc.isClang "CC=clang";
31 installFlags = [ "PREFIX=\${out}" ];
32
33 patchPhase = ''
34 substituteInPlace rarcrack.c --replace "file -i" "${file}/bin/file -i"
35 '';
36
37 preInstall = ''
38 mkdir -p $out/bin
39 '';
40
41 meta = with lib; {
42 description = "This program can crack zip,7z and rar file passwords";
43 longDescription = ''
44 If you forget your password for compressed archive (rar, 7z, zip), this program is the solution.
45 This program uses bruteforce algorithm to find correct password. You can specify wich characters will be used in password generations.
46 Warning: Please don't use this program for any illegal things!
47 '';
48 homepage = "https://github.com/jaredsburrows/Rarcrack";
49 license = licenses.gpl2Only;
50 maintainers = with maintainers; [ davidak ];
51 platforms = with platforms; unix;
52 };
53}