2021-06-28 23:13:55 +00:00
|
|
|
{ lib, gccStdenv, fetchFromGitLab, cudatoolkit
|
2023-08-04 22:07:22 +00:00
|
|
|
, config
|
|
|
|
, cudaSupport ? config.cudaSupport
|
2021-06-28 23:13:55 +00:00
|
|
|
, pkg-config }:
|
|
|
|
|
|
|
|
gccStdenv.mkDerivation rec {
|
|
|
|
pname = "truecrack";
|
|
|
|
version = "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "kalilinux";
|
|
|
|
repo = "packages/truecrack";
|
|
|
|
rev = "debian/${version}+git20150326-0kali1";
|
|
|
|
sha256 = "+Rw9SfaQtO1AJO6UVVDMCo8DT0dYEbv7zX8SI+pHCRQ=";
|
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = (if cudaSupport then [
|
|
|
|
"--with-cuda=${cudatoolkit}"
|
|
|
|
] else [
|
|
|
|
"--enable-cpu"
|
|
|
|
]);
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals cudaSupport [
|
|
|
|
cudatoolkit
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: CpuAes.o:/build/source/src/Crypto/CpuAes.h:1233: multiple definition of
|
|
|
|
# `t_rc'; CpuCore.o:/build/source/src/Crypto/CpuAes.h:1237: first defined here
|
|
|
|
# TODO: remove on upstream fixes it:
|
|
|
|
# https://gitlab.com/kalilinux/packages/truecrack/-/issues/1
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
installFlags = [ "prefix=$(out)" ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-01-13 08:15:51 +00:00
|
|
|
description = "A brute-force password cracker for TrueCrypt volumes, optimized for Nvidia Cuda technology";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "truecrack";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://gitlab.com/kalilinux/packages/truecrack";
|
2022-04-15 01:41:22 +00:00
|
|
|
broken = cudaSupport;
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ ethancedwards8 ];
|
|
|
|
};
|
|
|
|
}
|