summary refs log tree commit diff
path: root/pkgs/tools/security/evil-winrm/default.nix
blob: fe10bfaefec0e7f935cf1894b0e643d987676d07 (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
{ stdenv, lib, fetchFromGitHub, makeWrapper, bundlerEnv }:

stdenv.mkDerivation rec {
  pname = "evil-winrm";
  version = "3.3";

  src = fetchFromGitHub {
    owner = "Hackplayers";
    repo = "evil-winrm";
    rev = "v${version}";
    sha256 = "sha256-uWhRkq7I/XRWSUpR8lWRhDImE6x0pX9/B3gKhRIhkf8=";
  };

  env = bundlerEnv {
    name = pname;
    gemfile = ./Gemfile;
    lockfile = ./Gemfile.lock;
    gemset = ./gemset.nix;
  };

  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [ env.wrappedRuby ];

  installPhase = ''
    mkdir -p $out/bin
    cp evil-winrm.rb $out/bin/evil-winrm
  '';

  meta = with lib; {
    homepage = "https://github.com/Hackplayers/evil-winrm";
    changelog = "https://github.com/Hackplayers/evil-winrm/releases/tag/v${version}";
    description = "WinRM shell for hacking/pentesting";
    license = licenses.lgpl3Plus;
    maintainers = with maintainers; [ elohmeier ];
  };
}