diff --git a/pkgs/development/python-modules/gitignore-parser/default.nix b/pkgs/development/python-modules/gitignore-parser/default.nix new file mode 100644 index 000000000000..f9758e38c2d7 --- /dev/null +++ b/pkgs/development/python-modules/gitignore-parser/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, unittestCheckHook +}: + +buildPythonPackage rec { + pname = "gitignore-parser"; + version = "0.1.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "mherrmann"; + repo = "gitignore_parser"; + rev = "refs/tags/v${version}"; + hash = "sha256-F1ZQQ33naOO7KNuSdlo0JN8i50lLty+eGSJAzVJL730="; + }; + + nativeCheckInputs = [ + unittestCheckHook + ]; + + pythonImportsCheck = [ + "gitignore_parser" + ]; + + meta = with lib; { + description = "A spec-compliant gitignore parser"; + homepage = "https://github.com/mherrmann/gitignore_parser"; + changelog = "https://github.com/mherrmann/gitignore_parser/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/single-source/default.nix b/pkgs/development/python-modules/single-source/default.nix new file mode 100644 index 000000000000..3bf2ff810d50 --- /dev/null +++ b/pkgs/development/python-modules/single-source/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, importlib-metadata +, poetry-core +, pytest-mock +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "single-source"; + version = "0.3.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "rabbit72"; + repo = "single-source"; + rev = "refs/tags/v${version}"; + hash = "sha256-bhfMRIeJUd5JhN2tPww7fdbmHQ7ypcsZrYSa55v0+W8="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + importlib-metadata + ]; + + nativeCheckInputs = [ + pytest-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ + "single_source" + ]; + + meta = with lib; { + description = "Access to the project version in Python code for PEP 621-style projects"; + homepage = "https://github.com/rabbit72/single-source"; + changelog = "https://github.com/rabbit72/single-source/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ ]; + }; +} diff --git a/pkgs/tools/security/tell-me-your-secrets/default.nix b/pkgs/tools/security/tell-me-your-secrets/default.nix new file mode 100644 index 000000000000..c01308e0de6e --- /dev/null +++ b/pkgs/tools/security/tell-me-your-secrets/default.nix @@ -0,0 +1,49 @@ +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "tell-me-your-secrets"; + version = "2.4.2"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "valayDave"; + repo = "tell-me-your-secrets"; + rev = "refs/tags/v${version}"; + hash = "sha256-3ZJyL/V1dsW6F+PiEhnWpv/Pz2H9/UKSJWDgw68M/Z8="; + }; + + pythonRelaxDeps = [ + "gitignore-parser" + ]; + + nativeBuildInputs = with python3.pkgs; [ + poetry-core + pythonRelaxDepsHook + ]; + + propagatedBuildInputs = with python3.pkgs; [ + gitignore-parser + pandas + pyyaml + single-source + ]; + + nativeCheckInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "tell_me_your_secrets" + ]; + + meta = with lib; { + description = "Tools to find secrets from various signatures"; + homepage = "https://github.com/valayDave/tell-me-your-secrets"; + changelog = "https://github.com/valayDave/tell-me-your-secrets/blob/${version}/CHANGELOG.md"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 728050ced2fd..aa474e37640b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -39646,6 +39646,8 @@ with pkgs; tcat = callPackage ../tools/misc/tcat { }; + tell-me-your-secrets = callPackage ../tools/security/tell-me-your-secrets { }; + tellico = libsForQt5.callPackage ../applications/misc/tellico { }; termpdfpy = python3Packages.callPackage ../applications/misc/termpdf.py { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 08f8abd793f1..3ddc92209bc2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4058,6 +4058,8 @@ self: super: with self; { github3_py = callPackage ../development/python-modules/github3_py { }; + gitignore-parser = callPackage ../development/python-modules/gitignore-parser { }; + gitpython = callPackage ../development/python-modules/gitpython { }; glad = callPackage ../development/python-modules/glad { }; @@ -11085,6 +11087,8 @@ self: super: with self; { simpy = callPackage ../development/python-modules/simpy { }; + single-source = callPackage ../development/python-modules/single-source { }; + single-version = callPackage ../development/python-modules/single-version { }; signify = callPackage ../development/python-modules/signify { };