Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, gccStdenv, fetchFromGitLab, cudatoolkit 2, cudaSupport ? false 3, pkg-config }: 4 5gccStdenv.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 # Workaround build failure on -fno-common toolchains like upstream 31 # gcc-10. Otherwise build fails as: 32 # ld: CpuAes.o:/build/source/src/Crypto/CpuAes.h:1233: multiple definition of 33 # `t_rc'; CpuCore.o:/build/source/src/Crypto/CpuAes.h:1237: first defined here 34 # TODO: remove on upstream fixes it: 35 # https://gitlab.com/kalilinux/packages/truecrack/-/issues/1 36 env.NIX_CFLAGS_COMPILE = "-fcommon"; 37 38 installFlags = [ "prefix=$(out)" ]; 39 enableParallelBuilding = true; 40 41 meta = with lib; { 42 description = "TrueCrack is a brute-force password cracker for TrueCrypt volumes. It works on Linux and it is optimized for Nvidia Cuda technology."; 43 homepage = "https://gitlab.com/kalilinux/packages/truecrack"; 44 broken = cudaSupport; 45 license = licenses.gpl3Plus; 46 platforms = platforms.unix; 47 maintainers = with maintainers; [ ethancedwards8 ]; 48 }; 49}