Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5 fetchpatch, 6}: 7 8python3Packages.buildPythonApplication rec { 9 pname = "pre-commit-hook-ensure-sops"; 10 version = "1.1"; 11 pyproject = true; 12 13 src = fetchFromGitHub { 14 owner = "yuvipanda"; 15 repo = "pre-commit-hook-ensure-sops"; 16 tag = "v${version}"; 17 hash = "sha256-8sMmHNzmYwOmHYSWoZ4rKb/2lKziFmT6ux+s+chd/Do="; 18 }; 19 20 patches = [ 21 # Add the command-line entrypoint to pyproject.toml 22 # Can be removed after v1.2 release that includes changes 23 (fetchpatch { 24 url = "https://github.com/yuvipanda/pre-commit-hook-ensure-sops/commit/ed88126afa253df6009af7cbe5aa2369f963be1c.patch"; 25 hash = "sha256-mMxAoC3WEciO799Rq8gZ2PJ6FT/GbeSpxlr1EPj7r4s="; 26 }) 27 ]; 28 29 build-system = with python3Packages; [ 30 setuptools 31 ]; 32 33 dependencies = with python3Packages; [ 34 ruamel-yaml 35 ]; 36 37 pythonImportsCheck = [ 38 "pre_commit_hook_ensure_sops" 39 ]; 40 41 # Test entrypoint 42 checkPhase = '' 43 runHook preCheck 44 $out/bin/pre-commit-hook-ensure-sops --help 45 runHook postCheck 46 ''; 47 48 meta = with lib; { 49 description = "Pre-commit hook to ensure that files that should be encrypted with sops are"; 50 homepage = "https://github.com/yuvipanda/pre-commit-hook-ensure-sops"; 51 maintainers = with maintainers; [ nialov ]; 52 license = licenses.bsd3; 53 mainProgram = "pre-commit-hook-ensure-sops"; 54 }; 55}