Skip to content

Commit 0d2d096

Browse files
committed
fix auto-calling fromCommit, fromNpmLock etc
1 parent 1e5e45c commit 0d2d096

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

prisma.nix

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,6 @@ let
3030
inherit (pkgs) lib;
3131
parsers = pkgs.callPackage ./lib/parsers.nix { };
3232
binaryTarget = binaryTargetBySystem.${pkgs.system};
33-
commitValue =
34-
if _commit != null then
35-
_commit
36-
else if npmLock != null then
37-
fromNpmLock npmLock
38-
else if yarnLock != null then
39-
fromYarnLock yarnLock
40-
else if pnpmLock != null then
41-
fromPnpmLock pnpmLock
42-
else if bunLock != null then
43-
fromBunLock bunLock
44-
else
45-
null;
4633
fromCommit =
4734
commit:
4835
if builtins.stringLength commit != 40 then
@@ -87,8 +74,16 @@ lib.warnIf (nixpkgs != null)
8774
if your code has `nixpkgs = pkgs;`, replace it with `pkgs = pkgs;` or `inherit pkgs;`.
8875
''
8976
(
90-
if commitValue != null then # direct fetch
91-
fromCommit commitValue
77+
if _commit != null then
78+
fromCommit _commit
79+
else if npmLock != null then
80+
fromNpmLock npmLock
81+
else if yarnLock != null then
82+
fromYarnLock yarnLock
83+
else if pnpmLock != null then
84+
fromPnpmLock pnpmLock
85+
else if bunLock != null then
86+
fromBunLock bunLock
9287
else
9388
{
9489
# builder pattern

0 commit comments

Comments
 (0)