summary refs log tree commit diff
path: root/pkgs/tools/security/crunch/default.nix
blob: 914d79965c3e199c770fda6eff9e227d0babba88 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ stdenv, fetchurl, which }:

stdenv.mkDerivation  rec {
  name = "crunch-${version}";
  version = "3.6";

  src = fetchurl {
    url = "mirror://sourceforge/crunch-wordlist/${name}.tgz";
    sha256 = "0mgy6ghjvzr26yrhj1bn73qzw6v9qsniskc5wqq1kk0hfhy6r3va";
  };

  buildInputs = [ which ];

  configurePhase = "true";

  preBuild = ''
    sed 's/sudo //' -i Makefile
    sed 's/-g root -o root//' -i Makefile
  '';

  makeFlags = "PREFIX=$(out)";

  meta = with stdenv.lib; {
    description = "Wordlist generator";
    homepage = https://sourceforge.net/projects/crunch-wordlist/;
    platforms = platforms.linux;
    maintainers = [ maintainers.lethalman ];
  };
}