nixpkgs/pkgs/tools/security/john/default.nix
aszlig 2a1bf2a776
john: Clean up and Update to v1.8.0-jumbo-1.
Cleanups are mostly stylistic, like putting src more to the top (to make
sure it won't be missed on updates of the version attribute) or using
mkdir -p instead of ensureDir.

The most significant change here is that we update the package to
1.8.0-jumbo-1, which is the latest tag available and contains community
updates which were already in magnumripper/JohnTheRipper@93f061bc41.

We're now also using fetchurl to ensure that we don't need to clone the
whole repository and keep download times low.

And the derivation name is now "john" instead of "JohnTheRipper",
because most users would expect "nix-env -i john" to work.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-10-13 04:42:39 +02:00

35 lines
896 B
Nix

{ stdenv, fetchurl, openssl, nss, nspr, kerberos, gmp, zlib, libpcap, re2 }:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "john-${version}";
version = "1.8.0-jumbo-1";
src = fetchurl {
url = "http://www.openwall.com/john/j/${name}.tar.xz";
sha256 = "08q92sfdvkz47rx6qjn7qv57cmlpy7i7rgddapq5384mb413vjds";
};
buildInputs = [ openssl nss nspr kerberos gmp zlib libpcap re2 ];
NIX_CFLAGS_COMPILE = "-DJOHN_SYSTEMWIDE=1";
preConfigure = "cd src";
installPhase = ''
mkdir -p "$out/share/john"
mkdir -p "$out/bin"
cp -R ../run/* "$out/share/john"
ln -s "$out/share/john/john" "$out/bin/john"
'';
meta = {
description = "John the Ripper password cracker";
license = licenses.gpl2;
homepage = https://github.com/magnumripper/JohnTheRipper/;
maintainers = with maintainers; [ offline ];
platforms = with platforms; unix;
};
}