Merge pull request #184063 from emilytrau/pkzip-1.2.2

pkcrack: init at 1.2.2

authored by Emily Trau and committed by GitHub 231237cf f6a028db

+53
+53
pkgs/by-name/pk/pkcrack/package.nix
···
··· 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + }: 5 + 6 + stdenv.mkDerivation (finalAttrs: { 7 + pname = "pkcrack"; 8 + version = "1.2.2"; 9 + 10 + src = fetchurl { 11 + url = "https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack/pkcrack-${finalAttrs.version}.tar.gz"; 12 + hash = "sha256-TS3Bk/+kNCrC7TpjEf33cK5qB3Eiaz70U9yo0D5DiVo="; 13 + }; 14 + sourceRoot = "pkcrack-${finalAttrs.version}/src"; 15 + 16 + postPatch = '' 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>' "" 21 + ''; 22 + 23 + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; 24 + enableParallelBuilding = true; 25 + 26 + installPhase = '' 27 + runHook preInstall 28 + 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 34 + 35 + mkdir -p $out/share/doc 36 + cp -R ../doc/ $out/share/doc/pkcrack 37 + 38 + runHook postInstall 39 + ''; 40 + 41 + meta = with lib; { 42 + description = "Breaking PkZip-encryption"; 43 + homepage = "https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack.html"; 44 + license = { 45 + fullName = "PkCrack Non Commercial License"; 46 + url = "https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack/pkcrack-readme.html"; 47 + free = false; 48 + }; 49 + maintainers = with maintainers; [ emilytrau ]; 50 + platforms = platforms.all; 51 + mainProgram = "pkcrack"; 52 + }; 53 + })