Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

56 lines
1.4 KiB
Nix

{
lib,
python3Packages,
fetchFromGitHub,
fetchpatch,
}:
python3Packages.buildPythonApplication rec {
pname = "pre-commit-hook-ensure-sops";
version = "1.1";
pyproject = true;
src = fetchFromGitHub {
owner = "yuvipanda";
repo = "pre-commit-hook-ensure-sops";
tag = "v${version}";
hash = "sha256-8sMmHNzmYwOmHYSWoZ4rKb/2lKziFmT6ux+s+chd/Do=";
};
patches = [
# Add the command-line entrypoint to pyproject.toml
# Can be removed after v1.2 release that includes changes
(fetchpatch {
url = "https://github.com/yuvipanda/pre-commit-hook-ensure-sops/commit/ed88126afa253df6009af7cbe5aa2369f963be1c.patch";
hash = "sha256-mMxAoC3WEciO799Rq8gZ2PJ6FT/GbeSpxlr1EPj7r4s=";
})
];
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
ruamel-yaml
];
pythonImportsCheck = [
"pre_commit_hook_ensure_sops"
];
# Test entrypoint
checkPhase = ''
runHook preCheck
$out/bin/pre-commit-hook-ensure-sops --help
runHook postCheck
'';
meta = with lib; {
description = "Pre-commit hook to ensure that files that should be encrypted with sops are";
homepage = "https://github.com/yuvipanda/pre-commit-hook-ensure-sops";
maintainers = with maintainers; [ nialov ];
license = licenses.bsd3;
mainProgram = "pre-commit-hook-ensure-sops";
};
}