about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/cewl/default.nix
blob: dc1ad37513daaf650428ef16897b6b7c55fb5ae3 (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
30
31
32
33
34
{ stdenv, lib, fetchFromGitHub, bundlerEnv }:

let
  rubyEnv = bundlerEnv {
    name = "cewl-ruby-env";
    gemdir = ./.;
  };
in
stdenv.mkDerivation rec {
  pname = "cewl";
  version = "5.5.2";
  src = fetchFromGitHub {
    owner = "digininja";
    repo = "CeWL";
    rev = version;
    sha256 = "sha256-5LTZUr3OMeu1NODhIgBiVqtQnUWYfZTm73q61vT3rXc=";
  };

  buildInputs = [ rubyEnv.wrappedRuby ];

  installPhase = ''
    mkdir -p $out/bin
    cp *.rb $out/bin/
    mv $out/bin/cewl.rb $out/bin/cewl
  '';

  meta = with lib; {
    description = "Custom wordlist generator";
    mainProgram = "cewl";
    homepage = "https://digi.ninja/projects/cewl.php/";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ elohmeier ];
  };
}