6 stdenv.mkDerivation (finalAttrs: {
11 url = "https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack/pkcrack-${finalAttrs.version}.tar.gz";
12 hash = "sha256-j0n6OHlio3oUyavVSQFnIaY0JREFv0uDfMcvC61BPTg=";
14 sourceRoot = "pkcrack-${finalAttrs.version}/src";
17 # malloc.h is not needed because stdlib.h is already included.
18 # On macOS, malloc.h does not even exist, resulting in an error.
19 substituteInPlace exfunc.c extract.c main.c readhead.c zipdecrypt.c \
20 --replace '#include <malloc.h>' ""
23 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
24 enableParallelBuilding = true;
29 install -D extract $out/bin/extract
30 install -D findkey $out/bin/findkey
31 install -D makekey $out/bin/makekey
32 install -D pkcrack $out/bin/pkcrack
33 install -D zipdecrypt $out/bin/zipdecrypt
35 mkdir -p $out/share/doc
36 cp -R ../doc/ $out/share/doc/pkcrack
42 description = "Breaking PkZip-encryption";
43 homepage = "https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack.html";
45 fullName = "PkCrack Non Commercial License";
46 url = "https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack/pkcrack-readme.html";
49 maintainers = with maintainers; [ emilytrau ];
50 platforms = platforms.all;
51 mainProgram = "pkcrack";