btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / cr / credslayer / package.nix
blobf09a86bc613a2ad04a8af19d631c23f05dcf9070
1 { lib
2 , fetchFromGitHub
3 , python3
4 , wireshark-cli
5 }:
7 python3.pkgs.buildPythonApplication rec {
8   pname = "credslayer";
9   version = "0.1.3";
10   format = "setuptools";
12   src = fetchFromGitHub {
13     owner = "ShellCode33";
14     repo = "CredSLayer";
15     rev = "refs/tags/v${version}";
16     hash = "sha256-gryV9MHULY6ZHy6YDFQDIkZsfIX8La0tHT0vrrQJNDQ=";
17   };
19   propagatedBuildInputs = with python3.pkgs; [
20     pyshark
21   ];
23   nativeCheckInputs = with python3.pkgs; [
24     py
25     pytestCheckHook
26     wireshark-cli
27   ];
29   pytestFlagsArray = [
30     "tests/tests.py"
31   ];
33   disabledTests = [
34     # Requires a telnet setup
35     "test_telnet"
36     # stdout has all the correct data, but the underlying test code fails
37     # functionally everything seems to be intact
38     "http_get_auth"
39     "test_http_post_auth"
40     "test_ntlmssp"
41   ];
43   pythonImportsCheck = [
44     "credslayer"
45   ];
47   postInstall = ''
48     wrapProgram $out/bin/credslayer \
49        --prefix PATH : "${lib.makeBinPath [ wireshark-cli ]}"
50   '';
52   meta = with lib; {
53     description = "Extract credentials and other useful info from network captures";
54     mainProgram = "credslayer";
55     homepage = "https://github.com/ShellCode33/CredSLayer";
56     license = with licenses; [ gpl3Only ];
57     maintainers = with maintainers; [ fab ];
58   };