btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / br / bruteforce-luks / package.nix
blob0181811231546129c9f2bbc0a70a5a1ac60bf796
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   autoreconfHook,
6   cryptsetup,
7 }:
9 stdenv.mkDerivation rec {
10   pname = "bruteforce-luks";
11   version = "1.4.1";
13   src = fetchFromGitHub {
14     owner = "glv2";
15     repo = "bruteforce-luks";
16     rev = version;
17     hash = "sha256-t07YyfCjaXQs/OMekcPNBT8DeSRtq2+8tUpsPP2pG7o=";
18   };
20   postPatch = ''
21     # the test hangs indefinetly when more than 3 threads are used, I haven't figured out why
22     substituteInPlace tests/Makefile.am \
23       --replace-fail " crack-volume3.sh" ""
24   '';
26   nativeBuildInputs = [ autoreconfHook ];
27   buildInputs = [ cryptsetup ];
29   enableParallelBuilding = true;
31   doCheck = true;
33   meta = {
34     homepage = "https://github.com/glv2/bruteforce-luks";
35     description = "Cracks passwords of LUKS encrypted volumes";
36     mainProgram = "bruteforce-luks";
37     longDescription = ''
38       The program tries to decrypt at least one of the key slots by trying
39       all the possible passwords. It is especially useful if you know
40       something about the password (i.e. you forgot a part of your password but
41       still remember most of it). Finding the password of a volume without
42       knowing anything about it would take way too much time (unless the
43       password is really short and/or weak). It can also use a dictionary.
44     '';
45     license = lib.licenses.gpl3Plus;
46     platforms = lib.platforms.linux;
47   };