Skip to content

Commit ea66c7c

Browse files
committed
refactor: remove literalExample
1 parent d8a9a87 commit ea66c7c

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

modules/hook.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ in
186186
Confines the hook to run at a particular stage.
187187
'';
188188
default = default_stages;
189-
defaultText = (lib.literalExpression or lib.literalExample) "default_stages";
189+
defaultText = lib.literalExpression "default_stages";
190190
};
191191

192192
verbose = mkOption {

modules/pre-commit.nix

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ let
55
concatStringsSep
66
compare
77
filterAttrs
8-
literalExample
98
mapAttrsToList
109
mkOption
1110
types
@@ -181,10 +180,7 @@ in
181180
The `git` package to use.
182181
'';
183182
default = pkgs.gitMinimal;
184-
defaultText =
185-
lib.literalExpression or literalExample ''
186-
pkgs.gitMinimal
187-
'';
183+
defaultText = lib.literalExpression "pkgs.gitMinimal";
188184
};
189185

190186
tools =
@@ -196,8 +192,9 @@ in
196192
197193
`nix-pre-commit-hooks` comes with its own set of packages for this purpose.
198194
'';
199-
defaultText =
200-
lib.literalExpression or literalExample ''git-hooks.nix-pkgs.callPackage tools-dot-nix { inherit (pkgs) system; }'';
195+
defaultText = lib.literalExpression ''
196+
git-hooks.nix-pkgs.callPackage tools-dot-nix { inherit (pkgs) system; }
197+
'';
201198
};
202199

203200
enabledPackages = mkOption {
@@ -351,7 +348,7 @@ in
351348
If you use the `flakeModule`, the default is `self.outPath`; the whole flake
352349
sources.
353350
'';
354-
defaultText = lib.literalExpression or literalExample ''gitignoreSource config.src'';
351+
defaultText = lib.literalExpression ''gitignoreSource config.src'';
355352
};
356353

357354
excludes =

0 commit comments

Comments
 (0)