From ae7794dddd6ee1700fea466270a56965c9c2daaa Mon Sep 17 00:00:00 2001 From: Qubasa Date: Wed, 22 May 2024 14:31:53 +0200 Subject: [PATCH] Revert "Merge pull request 'add pre-commit-check' (#1369) from fricklerhandwerk/clan-core:add-pre-commit into main" This reverts commit acaa69e2bff7b0ba9677db1c18e86dc0e54292dc, reversing changes made to a78f5b2bec5752a87a1ad8fa7d7ae1a545a4128a. --- devShell.nix | 10 ++-------- flake.lock | 17 ----------------- flake.nix | 2 -- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/devShell.nix b/devShell.nix index ad72eb213..1815a4f7b 100644 --- a/devShell.nix +++ b/devShell.nix @@ -1,4 +1,3 @@ -{ inputs, ... }: { perSystem = { @@ -9,7 +8,6 @@ }: let writers = pkgs.callPackage ./pkgs/builders/script-writers.nix { }; - inherit (pkgs.callPackage inputs.git-hooks { }) lib; ansiEscapes = { reset = ''\033[0m''; @@ -22,11 +20,6 @@ select-shell = writers.writePython3Bin "select-shell" { flakeIgnore = [ "E501" ]; } ./pkgs/scripts/select-shell.py; - - # run treefmt before each commit - install-pre-commit-hook = - with lib.git-hooks; - pre-commit (wrap.abort-on-change config.treefmt.build.wrapper); in { devShells.default = pkgs.mkShell { @@ -41,7 +34,8 @@ config.treefmt.build.wrapper ]; shellHook = '' - ${install-pre-commit-hook} + # no longer used + rm -f "$(git rev-parse --show-toplevel)/.git/hooks/pre-commit" echo -e "${ansiEscapes.green}switch to another dev-shell using: select-shell${ansiEscapes.reset}" ''; diff --git a/flake.lock b/flake.lock index 78caa0321..a2b719340 100644 --- a/flake.lock +++ b/flake.lock @@ -40,22 +40,6 @@ "type": "github" } }, - "git-hooks": { - "flake": false, - "locked": { - "lastModified": 1715912400, - "narHash": "sha256-7GYXKJP7bglYgofN3/PW5EBGaGOIKbBKSgFb6m4ttC4=", - "owner": "fricklerhandwerk", - "repo": "git-hooks", - "rev": "5a23214ca74a7656048fe1402c4e98f5cd2b3729", - "type": "github" - }, - "original": { - "owner": "fricklerhandwerk", - "repo": "git-hooks", - "type": "github" - } - }, "nixlib": { "locked": { "lastModified": 1712450863, @@ -149,7 +133,6 @@ "inputs": { "disko": "disko", "flake-parts": "flake-parts", - "git-hooks": "git-hooks", "nixos-generators": "nixos-generators", "nixos-images": "nixos-images", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 2d6fc28b5..3b2890287 100644 --- a/flake.nix +++ b/flake.nix @@ -21,8 +21,6 @@ flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs"; treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; - git-hooks.url = "github:fricklerhandwerk/git-hooks"; - git-hooks.flake = false; }; outputs =