about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/msfpc/default.nix
blob: 42861118141044d82bfe356261757cfbfe7a0117 (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
35
36
37
38
{ lib, stdenv, fetchFromGitHub, makeWrapper, metasploit, curl, inetutils, openssl }:

stdenv.mkDerivation rec {
  pname = "msfpc";
  version = "1.4.5";

  src = fetchFromGitHub {
    owner = "g0tmi1k";
    repo = pname;
    rev = "v${version}";
    sha256 = "UIdE0oSaNu16pf+M96x8AnNju88hdzokv86wm8uBYDQ=";
  };

  nativeBuildInputs = [
    makeWrapper
  ];

  installPhase = ''
    runHook preInstall

    install -Dm755 msfpc.sh $out/bin/msfpc

    runHook postInstall
  '';

  postFixup = ''
    wrapProgram $out/bin/msfpc \
      --prefix PATH : "${lib.makeBinPath [ metasploit curl inetutils openssl ]}"
  '';

  meta = with lib; {
    description = "MSFvenom Payload Creator";
    homepage = "https://github.com/g0tmi1k/msfpc";
    license = licenses.mit;
    maintainers = with maintainers; [ emilytrau ];
    platforms = platforms.unix;
  };
}