about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/coercer/default.nix
blob: e0d921e62e2d7b9cce0335f608fcf9dfbb84282b (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
39
40
41
42
43
44
45
46
47
48
49
{ lib
, fetchFromGitHub
, python3
}:

python3.pkgs.buildPythonApplication rec {
  pname = "coercer";
  version = "2.4.3";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "p0dalirius";
    repo = "Coercer";
    rev = "refs/tags/${version}";
    hash = "sha256-WeaKToKYIB+jjTNIQvAUQQNb25TsNWALYZwIZuBjkPE=";
  };

  nativeBuildInputs = with python3.pkgs; [
    poetry-core
    pythonRelaxDepsHook
  ];

  pythonRelaxDeps = [
    "impacket"
  ];

  propagatedBuildInputs = with python3.pkgs; [
    impacket
    xlsxwriter
  ];

  pythonImportsCheck = [
    "coercer"
  ];

  # this file runs into issues on case-insensitive filesystems
  # ValueError: Both <...>/coercer and <...>/coercer.py exist
  postPatch = ''
    rm Coercer.py
  '';

  meta = with lib; {
    description = "Tool to automatically coerce a Windows server";
    mainProgram = "coercer";
    homepage = "https://github.com/p0dalirius/Coercer";
    license = with licenses; [ gpl2Only ];
    maintainers = with maintainers; [ fab ];
  };
}