Skip to content

Commit 929af44

Browse files
committed
fix(nix): use custom makeOverridable
1 parent 59be6eb commit 929af44

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

mkExtension.nix

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,23 @@
77
let
88
inherit (pkgs) lib;
99

10-
buildVscodeMarketplaceExtension = lib.customisation.makeOverridable pkgs.vscode-utils.buildVscodeMarketplaceExtension;
11-
buildVscodeExtension = lib.customisation.makeOverridable pkgs.vscode-utils.buildVscodeExtension;
10+
makeOverridable =
11+
f: args:
12+
lib.customisation.makeOverridable f (
13+
if builtins.isFunction args then
14+
(
15+
let
16+
x = args (f x);
17+
in
18+
x
19+
)
20+
else
21+
args
22+
);
23+
24+
buildVscodeMarketplaceExtension = makeOverridable pkgs.vscode-utils.buildVscodeMarketplaceExtension;
25+
26+
buildVscodeExtension = makeOverridable pkgs.vscode-utils.buildVscodeExtension;
1227

1328
# We don't modify callPackage because extensions
1429
# may use its original version

0 commit comments

Comments
 (0)