summary refs log tree commit diff
path: root/pkgs/tools/security/john/default.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-10-12 20:29:52 +0200
committeraszlig <aszlig@redmoonstudios.org>2015-10-13 04:42:39 +0200
commit2a1bf2a7769eee1453fbe24d8e37ff1a42cd6bff (patch)
tree6d078510f5779ba711003e20d388a033218eb5e5 /pkgs/tools/security/john/default.nix
parent1f172c6e7b0582cc9d2873dda0e94e7418002f03 (diff)
downloadnixpkgs-2a1bf2a7769eee1453fbe24d8e37ff1a42cd6bff.tar
nixpkgs-2a1bf2a7769eee1453fbe24d8e37ff1a42cd6bff.tar.gz
nixpkgs-2a1bf2a7769eee1453fbe24d8e37ff1a42cd6bff.tar.bz2
nixpkgs-2a1bf2a7769eee1453fbe24d8e37ff1a42cd6bff.tar.lz
nixpkgs-2a1bf2a7769eee1453fbe24d8e37ff1a42cd6bff.tar.xz
nixpkgs-2a1bf2a7769eee1453fbe24d8e37ff1a42cd6bff.tar.zst
nixpkgs-2a1bf2a7769eee1453fbe24d8e37ff1a42cd6bff.zip
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>
Diffstat (limited to 'pkgs/tools/security/john/default.nix')
-rw-r--r--pkgs/tools/security/john/default.nix33
1 files changed, 19 insertions, 14 deletions
diff --git a/pkgs/tools/security/john/default.nix b/pkgs/tools/security/john/default.nix
index 4ef9b8f65b6..cde2047a5f1 100644
--- a/pkgs/tools/security/john/default.nix
+++ b/pkgs/tools/security/john/default.nix
@@ -1,29 +1,34 @@
-{ stdenv, fetchgit, openssl, nss, nspr, kerberos, gmp, zlib, libpcap, re2 }:
+{ stdenv, fetchurl, openssl, nss, nspr, kerberos, gmp, zlib, libpcap, re2 }:
 
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
-  name = "JohnTheRipper-${version}";
-  version = "8a3e3c1d";
+  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'';
+
+  preConfigure = "cd src";
+
   installPhase = ''
-    ensureDir $out/share/john/
-    ensureDir $out/bin
-    cp -R ../run/* $out/share/john
-    ln -s $out/share/john/john $out/bin/john
+    mkdir -p "$out/share/john"
+    mkdir -p "$out/bin"
+    cp -R ../run/* "$out/share/john"
+    ln -s "$out/share/john/john" "$out/bin/john"
   '';
-  src = fetchgit {
-    url = https://github.com/magnumripper/JohnTheRipper.git;
-    rev = "93f061bc41652c94ae049b52572aac709d18aa4c";
-    sha256 = "1rnfi09830n34jcqaxmsam54p4zsq9a49ic2ljh44lahcipympvy";
-  };
+
   meta = {
     description = "John the Ripper password cracker";
     license = licenses.gpl2;
     homepage = https://github.com/magnumripper/JohnTheRipper/;
-    maintainers = with maintainers; [offline];
+    maintainers = with maintainers; [ offline ];
     platforms = with platforms; unix;
   };
 }