Skip to content

Commit 7f2b7dd

Browse files
committed
feat: add optional shellHook
1 parent 8158d30 commit 7f2b7dd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
};
2626

2727
outputs = { nixpkgs, git-hooks, go-overlay, gomod2nix, ... }@inputs: {
28-
lib.mkShell = { system, packages ? [], preCommitHooks ? {}, goVersion ? null, ... }:
28+
lib.mkShell = { system, packages ? [], preCommitHooks ? {}, goVersion ? null, shellHook ? "", ... }:
2929
let
3030
pkgs = import nixpkgs {
3131
inherit system;
@@ -78,7 +78,7 @@
7878
pkgs.mkShell {
7979
shellHook = gitHooks.shellHook + ''
8080
[[ -f .git/hooks/pre-commit.legacy ]] && rm -v .git/hooks/pre-commit.legacy
81-
'';
81+
'' ++ shellHook;
8282

8383
packages = defaultPkgs ++ packages ++ lib.optionals (goVersion != null) [
8484
pkgs.go-bin.versions.${goVersion}

0 commit comments

Comments
 (0)