1 { lib, gccStdenv, fetchFromGitLab, cudatoolkit
3 , cudaSupport ? config.cudaSupport
6 gccStdenv.mkDerivation rec {
10 src = fetchFromGitLab {
12 repo = "packages/truecrack";
13 rev = "debian/${version}+git20150326-0kali1";
14 sha256 = "+Rw9SfaQtO1AJO6UVVDMCo8DT0dYEbv7zX8SI+pHCRQ=";
17 configureFlags = (if cudaSupport then [
18 "--with-cuda=${cudatoolkit}"
27 buildInputs = lib.optionals cudaSupport [
31 # Workaround build failure on -fno-common toolchains like upstream
32 # gcc-10. Otherwise build fails as:
33 # ld: CpuAes.o:/build/source/src/Crypto/CpuAes.h:1233: multiple definition of
34 # `t_rc'; CpuCore.o:/build/source/src/Crypto/CpuAes.h:1237: first defined here
35 # TODO: remove on upstream fixes it:
36 # https://gitlab.com/kalilinux/packages/truecrack/-/issues/1
37 env.NIX_CFLAGS_COMPILE = "-fcommon";
39 installFlags = [ "prefix=$(out)" ];
40 enableParallelBuilding = true;
43 description = "Brute-force password cracker for TrueCrypt volumes, optimized for Nvidia Cuda technology";
44 mainProgram = "truecrack";
45 homepage = "https://gitlab.com/kalilinux/packages/truecrack";
47 license = licenses.gpl3Plus;
48 platforms = platforms.unix;
49 maintainers = with maintainers; [ ethancedwards8 ];