diff --git a/pkgs/by-name/sp/spraycharles/package.nix b/pkgs/by-name/sp/spraycharles/package.nix new file mode 100644 index 000000000000..f252fd0bef02 --- /dev/null +++ b/pkgs/by-name/sp/spraycharles/package.nix @@ -0,0 +1,49 @@ +{ + lib, + python3, + fetchFromGitHub, +}: + +python3.pkgs.buildPythonApplication rec { + pname = "spraycharles"; + version = "2.0.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "Tw1sm"; + repo = "spraycharles"; + tag = "v${version}"; + hash = "sha256-HQ57+LBBlpjPnmgbh4+esRoIgTSE7+4JYRwHE8CTb1c="; + }; + + pythonRelaxDeps = true; + + build-system = with python3.pkgs; [ poetry-core ]; + + dependencies = with python3.pkgs; [ + discord-webhook + impacket + numpy + pymsteams + pyyaml + requests + requests-ntlm + rich + typer + typer-config + ]; + + pythonImportsCheck = [ "spraycharles" ]; + + # Project has no tests + doCheck = false; + + meta = { + description = "Low and slow password spraying tool"; + homepage = "https://github.com/Tw1sm/spraycharles"; + changelog = "https://github.com/Tw1sm/spraycharles/blob/${src.tag}/CHANGELOG.md"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ fab ]; + mainProgram = "spraycharles"; + }; +} diff --git a/pkgs/development/python-modules/typer-config/default.nix b/pkgs/development/python-modules/typer-config/default.nix new file mode 100644 index 000000000000..b3447e2bfc9d --- /dev/null +++ b/pkgs/development/python-modules/typer-config/default.nix @@ -0,0 +1,68 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pydantic, + pytestCheckHook, + python-dotenv, + pyyaml, + schema, + toml, + typer, + uv-build, +}: + +buildPythonPackage rec { + pname = "typer-config"; + version = "1.4.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "maxb2"; + repo = "typer-config"; + tag = version; + hash = "sha256-pR32E6zdlfNpzIS4u/WOCxuqrnjDWZYiroUu92RBHVM="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "uv_build>=0.7.19,<0.8.0" "uv_build" + ''; + + build-system = [ uv-build ]; + + dependencies = [ typer ]; + + optional-dependencies = { + all = [ + python-dotenv + pyyaml + toml + ]; + python-dotenv = [ python-dotenv ]; + toml = [ toml ]; + yaml = [ pyyaml ]; + }; + + nativeCheckInputs = [ + pydantic + pytestCheckHook + schema + ] + ++ lib.flatten (builtins.attrValues optional-dependencies); + + pythonImportsCheck = [ "typer_config" ]; + + disabledTestPaths = [ + # Don't test the example + "tests/test_example.py" + ]; + + meta = { + description = "Utilities for working with configuration files in typer CLIs"; + homepage = "https://github.com/maxb2/typer-config"; + changelog = "https://github.com/maxb2/typer-config/blob/${src.tag}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eaf0c9d72d73..904b386af508 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -19407,6 +19407,8 @@ self: super: with self; { typer = callPackage ../development/python-modules/typer { }; + typer-config = callPackage ../development/python-modules/typer-config { }; + typer-shell = callPackage ../development/python-modules/typer-shell { }; typer-slim = self.typer.override { package = "typer-slim"; };