Skip to content

Commit 07a47be

Browse files
committed
fix(nix): support raw nixpkgs in usingFixesFrom
1 parent 04968a1 commit 07a47be

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

mkExtension.nix

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,18 @@ let
4444
callPackage = pkgs.beam.beamLib.callPackageWith pkgs';
4545

4646
# TODO find a cleaner way to get the store path of nixpkgs from given pkgs
47-
pathNixpkgs = lib.trivial.pipe pkgsWithFixes.hello.inputDerivation._derivation_original_args [
48-
builtins.tail
49-
builtins.head
50-
builtins.dirOf
51-
builtins.dirOf
52-
builtins.dirOf
53-
builtins.dirOf
54-
];
47+
pathNixpkgs =
48+
if pkgsWithFixes ? outPath then
49+
pkgsWithFixes.outPath
50+
else
51+
lib.trivial.pipe pkgsWithFixes.hello.inputDerivation._derivation_original_args [
52+
builtins.tail
53+
builtins.head
54+
builtins.dirOf
55+
builtins.dirOf
56+
builtins.dirOf
57+
builtins.dirOf
58+
];
5559

5660
extensionsNixpkgs =
5761
callPackage "${pathNixpkgs}/pkgs/applications/editors/vscode/extensions/default.nix"

0 commit comments

Comments
 (0)