lol

Merge pull request #33257 from danielfullmer/john-utils

john: Fix extra utility programs

authored by

Joachim F and committed by
GitHub
24e8c382 f29ecd56

+18 -9
+18 -9
pkgs/tools/security/john/default.nix
··· 1 1 { stdenv, fetchurl, openssl, nss, nspr, kerberos, gmp, zlib, libpcap, re2 2 - , writeText, gcc 2 + , writeText, gcc, pythonPackages, perl, perlPackages, makeWrapper 3 3 }: 4 4 5 5 with stdenv.lib; ··· 35 35 ''; 36 36 configureFlags = [ "--disable-native-macro" ]; 37 37 38 - buildInputs = [ openssl nss nspr kerberos gmp zlib libpcap re2 gcc ]; 38 + buildInputs = [ openssl nss nspr kerberos gmp zlib libpcap re2 gcc pythonPackages.wrapPython perl makeWrapper ]; 39 + propagatedBuildInputs = (with pythonPackages; [ dpkt scapy lxml ]) ++ # For pcap2john.py 40 + (with perlPackages; [ DigestMD4 DigestMD5 DigestSHA1 GetoptLong MIMEBase64 # For pass_gen.pl 41 + NetLDAP ]); # For sha-dump.pl 42 + # TODO: Get dependencies for radius2john.pl and lion2john-alt.pl 39 43 40 44 # gcc -DAC_BUILT -Wall vncpcap2john.o memdbg.o -g -lpcap -fopenmp -o ../run/vncpcap2john 41 45 # gcc: error: memdbg.o: No such file or directory ··· 43 47 44 48 NIX_CFLAGS_COMPILE = [ "-DJOHN_SYSTEMWIDE=1" ]; 45 49 46 - installPhase = '' 47 - mkdir -p "$out/etc/john" "$out/share/john" "$out/share/doc/john" 48 - find ../run -mindepth 1 -maxdepth 1 -type f -executable \ 49 - -exec "${stdenv.shell}" "${writeText "john-binary-install.sh" '' 50 - filename="$(basename "$1")" 51 - install -vD "$1" "$out/bin/''${filename%.*}" 52 - ''}" {} \; 50 + postInstall = '' 51 + mkdir -p "$out/bin" "$out/etc/john" "$out/share/john" "$out/share/doc/john" 52 + find -L ../run -mindepth 1 -maxdepth 1 -type f -executable \ 53 + -exec cp -d {} "$out/bin" \; 53 54 cp -vt "$out/etc/john" ../run/*.conf 54 55 cp -vt "$out/share/john" ../run/*.chr ../run/password.lst 55 56 cp -vrt "$out/share/doc/john" ../doc/* 57 + ''; 58 + 59 + postFixup = '' 60 + wrapPythonPrograms 61 + 62 + for i in $out/bin/*.pl; do 63 + wrapProgram "$i" --prefix PERL5LIB : $PERL5LIB 64 + done 56 65 ''; 57 66 58 67 meta = {