@@ -0,0 +1,40 @@
1+{ lib, gccStdenv, fetchFromGitLab, cudatoolkit
2+, cudaSupport ? false
3+, pkg-config }:
4+
5+gccStdenv.mkDerivation rec {
6+ pname = "truecrack";
7+ version = "3.6";
8+
9+ src = fetchFromGitLab {
10+ owner = "kalilinux";
11+ repo = "packages/truecrack";
12+ rev = "debian/${version}+git20150326-0kali1";
13+ sha256 = "+Rw9SfaQtO1AJO6UVVDMCo8DT0dYEbv7zX8SI+pHCRQ=";
14+ };
15+
16+ configureFlags = (if cudaSupport then [
17+ "--with-cuda=${cudatoolkit}"
18+ ] else [
19+ "--enable-cpu"
20+ ]);
21+
22+ nativeBuildInputs = [
23+ pkg-config
24+ ];
25+
26+ buildInputs = lib.optionals cudaSupport [
27+ cudatoolkit
28+ ];
29+
30+ installFlags = [ "prefix=$(out)" ];
31+ enableParallelBuilding = true;
32+
33+ meta = with lib; {
34+ description = "TrueCrack is a brute-force password cracker for TrueCrypt volumes. It works on Linux and it is optimized for Nvidia Cuda technology.";
35+ homepage = "https://gitlab.com/kalilinux/packages/truecrack";
36+ license = licenses.gpl3Plus;
37+ platforms = platforms.unix;
38+ maintainers = with maintainers; [ ethancedwards8 ];
39+ };
40+}