git.iko.soy/typeable/nixpkgs
on master help sign in
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@93f061bc41652. 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>

commit2a1bf2a7769eee1453fbe24d8e37ff1a42cd6bff authoraszlig <aszlig@redmoonstudios.org> dateMon 12 Oct 2015, 20:29 (11 years ago) parent1f172c6
1 file changed+19−14
pkgs/tools/security/john/default.nix+19−14
pkgs/tools/security/john/default.nix+19−14
@@ -1,29 +1,34 @@
1−{ stdenv, fetchgit, openssl, nss, nspr, kerberos, gmp, zlib, libpcap, re2 }:
1+{ stdenv, fetchurl, openssl, nss, nspr, kerberos, gmp, zlib, libpcap, re2 }:
22
33with stdenv.lib;
44
55stdenv.mkDerivation rec {
6− name = "JohnTheRipper-${version}";
7− version = "8a3e3c1d";
6+ name = "john-${version}";
7+ version = "1.8.0-jumbo-1";
8+
9+ src = fetchurl {
10+ url = "http://www.openwall.com/john/j/${name}.tar.xz";
11+ sha256 = "08q92sfdvkz47rx6qjn7qv57cmlpy7i7rgddapq5384mb413vjds";
12+ };
13+
814 buildInputs = [ openssl nss nspr kerberos gmp zlib libpcap re2 ];
15+
916 NIX_CFLAGS_COMPILE = "-DJOHN_SYSTEMWIDE=1";
10− preConfigure = ''cd src'';
17+
18+ preConfigure = "cd src";
19+
1120 installPhase = ''
12− ensureDir $out/share/john/
13− ensureDir $out/bin
14− cp -R ../run/* $out/share/john
15− ln -s $out/share/john/john $out/bin/john
21+ mkdir -p "$out/share/john"
22+ mkdir -p "$out/bin"
23+ cp -R ../run/* "$out/share/john"
24+ ln -s "$out/share/john/john" "$out/bin/john"
1625 '';
17− src = fetchgit {
18− url = https://github.com/magnumripper/JohnTheRipper.git;
19− rev = "93f061bc41652c94ae049b52572aac709d18aa4c";
20− sha256 = "1rnfi09830n34jcqaxmsam54p4zsq9a49ic2ljh44lahcipympvy";
21− };
26+
2227 meta = {
2328 description = "John the Ripper password cracker";
2429 license = licenses.gpl2;
2530 homepage = https://github.com/magnumripper/JohnTheRipper/;
26− maintainers = with maintainers; [offline];
31+ maintainers = with maintainers; [ offline ];
2732 platforms = with platforms; unix;
2833 };
2934}