Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 74f9e555d3b9
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f6fd7f44c7ef
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Nov 17, 2018

  1. hashcat: 4.2.1 -> 5.0.0

    This introduces a dependency on xxHash. Unfortunately, hashcat's
    build system wants to rebuild xxHash from the source code located
    in `<hashcat source root>/deps/git/xxHash`, a Git submodule whose
    contents are not included in the source tarball we currently
    download.
    
    This could be fixed by either using a recursive git clone instead
    a tarball download, or patching the build files to use an existing
    installation of xxHash (i.e. the one already provided by Nix). I
    believe the latter is preferable since it avoids the situation in
    which the xxHash version used by hashcat is different to the xxHash
    version used by all other Nix packages.
    
    Fortunately, this situation has been greatly improved [1] since
    release 5.0.0; the next release of hashcat should drop usage of
    git submodules and provide better support for using existing
    installations of dependencies.
    
    [1] hashcat/hashcat@4177e1e
    kierdavis committed Nov 17, 2018
    Copy the full SHA
    df462d0 View commit details

Commits on Nov 18, 2018

  1. Merge pull request #50523 from kierdavis/hashcat-5.0.0

    hashcat: 4.2.1 -> 5.0.0
    Mic92 authored Nov 18, 2018
    Copy the full SHA
    f6fd7f4 View commit details
Showing with 27 additions and 4 deletions.
  1. +5 −4 pkgs/tools/security/hashcat/default.nix
  2. +22 −0 pkgs/tools/security/hashcat/use-installed-xxhash.patch
9 changes: 5 additions & 4 deletions pkgs/tools/security/hashcat/default.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{ stdenv, fetchurl, makeWrapper, opencl-headers, ocl-icd }:
{ stdenv, fetchurl, makeWrapper, opencl-headers, ocl-icd, xxHash }:

stdenv.mkDerivation rec {
name = "hashcat-${version}";
version = "4.2.1";
version = "5.0.0";

src = fetchurl {
url = "https://hashcat.net/files/hashcat-${version}.tar.gz";
sha256 = "082k5srjwkfvnvz0bfcg5r12m9c2qjyfhnp135mparkf831p7bbx";
sha256 = "13xh1lmzdppvx8wr8blqhdr8vpa24j099kz2xzb9pcnqy26dk4kh";
};
patches = [ ./use-installed-xxhash.patch ];

nativeBuildInputs = [ makeWrapper ];
buildInputs = [ opencl-headers ];
buildInputs = [ opencl-headers xxHash ];

makeFlags = [
"OPENCL_HEADERS_KHRONOS=${opencl-headers}/include"
22 changes: 22 additions & 0 deletions pkgs/tools/security/hashcat/use-installed-xxhash.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/src/Makefile b/src/Makefile
index 3a1cd680..576353fe 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -189,7 +189,7 @@ endif
# brain and xxHash
ifeq ($(ENABLE_BRAIN),1)
CFLAGS += -DWITH_BRAIN
-CFLAGS += -Ideps/git/xxHash
+LFLAGS += -lxxhash
endif

##
@@ -313,7 +313,7 @@ WIN_32_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).WIN.32.o)
WIN_64_OBJS := $(foreach OBJ,$(OBJS_ALL),obj/$(OBJ).WIN.64.o)

ifeq ($(ENABLE_BRAIN),1)
-OBJS_XXHASH := xxhash
+OBJS_XXHASH :=

NATIVE_STATIC_OBJS += $(foreach OBJ,$(OBJS_XXHASH),obj/$(OBJ).NATIVE.STATIC.o)
NATIVE_SHARED_OBJS += $(foreach OBJ,$(OBJS_XXHASH),obj/$(OBJ).NATIVE.SHARED.o)