diff options
author | Joachim Fasting <joachifm@fastmail.fm> | 2015-06-15 14:11:05 +0200 |
---|---|---|
committer | Joachim Fasting <joachifm@fastmail.fm> | 2015-11-24 14:45:15 +0100 |
commit | c844b6d041707515405265e9eb4e5dec6e39e9dc (patch) | |
tree | f9e0c0b30451b61b54dfb7dc25add49c2e05592b /pkgs/tools/security/metasploit | |
parent | 685717091611d52b7ca7dd1a8d305db1fa601231 (diff) |
metasploit: reimplement using mkDerivation
Also fixes download location. Bumps version to 3.3.1, which is the closest to the original version for which a source archive is still available.
Diffstat (limited to 'pkgs/tools/security/metasploit')
-rw-r--r-- | pkgs/tools/security/metasploit/3.1.nix | 31 | ||||
-rw-r--r-- | pkgs/tools/security/metasploit/default.nix | 33 |
2 files changed, 33 insertions, 31 deletions
diff --git a/pkgs/tools/security/metasploit/3.1.nix b/pkgs/tools/security/metasploit/3.1.nix deleted file mode 100644 index c3aab9b709e37..0000000000000 --- a/pkgs/tools/security/metasploit/3.1.nix +++ /dev/null @@ -1,31 +0,0 @@ -args @ { makeWrapper, ... }: with args; -rec { - src = fetchurl { - url = http://www.packetstormsecurity.nl/UNIX/utilities/framework-3.1.tar.gz; - sha256 = "114znq9dfcyh9gcj57p3zsc0d0amlzhwidmg8qjcgxpjh28h1afx"; - }; - - buildInputs = [makeWrapper]; - configureFlags = []; - - doInstall = fullDepEntry('' - mkdir -p $out/share/msf - mkdir -p $out/bin - - cp -r * $out/share/msf - - for i in $out/share/msf/msf*; do - makeWrapper $i $out/bin/$(basename $i) --prefix RUBYLIB : $out/share/msf/lib - done - '') ["minInit" "defEnsureDir" "doUnpack" "addInputs"]; - - /* doConfigure should be specified separately */ - phaseNames = ["doInstall" (doPatchShebangs "$out/share/msf")]; - - name = "metasploit-framework-3.1"; - meta = { - description = "Metasploit Framework - a collection of exploits"; - homepage = "http://framework.metasploit.org/"; - }; -} - diff --git a/pkgs/tools/security/metasploit/default.nix b/pkgs/tools/security/metasploit/default.nix new file mode 100644 index 0000000000000..7a9dcdb8d89a8 --- /dev/null +++ b/pkgs/tools/security/metasploit/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, makeWrapper, ruby }: + +stdenv.mkDerivation rec { + name = "metasploit-framework-${version}"; + version = "3.3.1"; + + src = fetchurl { + url = "http://downloads.metasploit.com/data/releases/archive/framework-${version}.tar.bz2"; + sha256 = "07clzw1zfnqjhyydsc4mza238isai58p7aygh653qxsqb9a0j7qw"; + }; + + buildInputs = [makeWrapper]; + + installPhase = '' + mkdir -p $out/share/msf + mkdir -p $out/bin + + cp -r * $out/share/msf + + for i in $out/share/msf/msf*; do + makeWrapper $i $out/bin/$(basename $i) --prefix RUBYLIB : $out/share/msf/lib + done + ''; + + postInstall = '' + patchShebangs $out/share/msf + ''; + + meta = { + description = "Metasploit Framework - a collection of exploits"; + homepage = https://github.com/rapid7/metasploit-framework/wiki; + }; +} |