summary refs log tree commit diff
path: root/pkgs/tools/security/metasploit/3.1.nix
blob: 0c8a6e9688a300f1fd9844b4c8ba8b273f327ae3 (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
args : with args; 
rec {
  src = fetchurl {
    url = http://www.packetstormsecurity.nl/UNIX/utilities/framework-3.1.tar.gz;
    sha256 = "114znq9dfcyh9gcj57p3zsc0d0amlzhwidmg8qjcgxpjh28h1afx";
  };

  buildInputs = [makeWrapper];
  configureFlags = [];

  doInstall = FullDepEntry(''
    ensureDir $out/share/msf
    ensureDir $out/bin

    cp -r * $out/share/msf
    ln -s $out/share/msf/msf* $out/bin

    sed -e 's@#!/usr/bin/env ruby@#! ${ruby}/bin/ruby@' -i $out/bin/msf*

    for i in $out/bin/*; do
        wrapProgram $i --prefix RUBYLIB : $out/share/msf/lib
    done
  '') ["minInit" "defEnsureDir" "doUnpack" "addInputs"];

  /* doConfigure should be specified separately */
  phaseNames = ["doInstall"];
      
  name = "metasploit-framework" + version;
  meta = {
    description = "Metasploit Framework - a collection of exploits";
    homepage = "http://framework.metasploit.org/";
  };
}