File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -140,19 +140,34 @@ rec {
140140 # /@prisma/engines-version/5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e:
141141 "5" =
142142 pnpmLock :
143- builtins . elemAt ( builtins . match ".*@prisma/engines-version/.*\\ .([0-9a-f]{40}):.*" pnpmLock ) 0 ;
143+ let
144+ version = builtins . elemAt ( builtins . split ":" (
145+ builtins . elemAt ( builtins . split ( "@prisma/engines-version/" ) pnpmLock ) 2
146+ ) ) 0 ;
147+ in
148+ nixpkgs . lib . lists . last ( nixpkgs . lib . strings . splitString "." version ) ;
144149
145150 # example line:
146151147152 "6" =
148153 pnpmLock :
149- builtins . elemAt ( builtins . match ".*@prisma/engines-version@.*\\ .([0-9a-f]{40}):.*" pnpmLock ) 0 ;
154+ let
155+ version = builtins . elemAt ( builtins . split ":" (
156+ builtins . elemAt ( builtins . split ( "@prisma/engines-version@" ) pnpmLock ) 2
157+ ) ) 0 ;
158+ in
159+ nixpkgs . lib . lists . last ( nixpkgs . lib . strings . splitString "." version ) ;
150160
151161 # exmple line:
152162 # '@prisma/engines-version@5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022':
153163 "9" =
154164 pnpmLock :
155- builtins . elemAt ( builtins . match ".*@prisma/engines-version@.*\\ .([0-9a-f]{40})'.*" pnpmLock ) 0 ;
165+ let
166+ version = builtins . elemAt ( builtins . split "'" (
167+ builtins . elemAt ( builtins . split ( "@prisma/engines-version@" ) pnpmLock ) 2
168+ ) ) 0 ;
169+ in
170+ nixpkgs . lib . lists . last ( nixpkgs . lib . strings . splitString "." version ) ;
156171 } ;
157172 pnpmLock = builtins . readFile path ;
158173 pnpmLockVersion = parsePnpmLockVersion pnpmLock ;
You can’t perform that action at this time.
0 commit comments