File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 5555 } ;
5656 }
5757 . ${ platform } ;
58- cef_version = "146.0.9+g3ca6a87+chromium-146.0.7680.165" ;
59- inherit ( arches ) depsArch projectArch targetArch ;
58+ cmakeListsContent = builtins . readFile ./CMakeLists.txt ;
59+
60+ # The regex looks for the CEF_VERSION variable and captures the content inside quotes
61+ # [^"]+ matches one or more characters that are NOT a double quote
62+ match = builtins . match ".*set\\ (CEF_VERSION \" ([^\" ]+)\" \\ ).*" ( builtins . replaceStrings [ "\n " ] [ " " ] cmakeListsContent ) ;
6063
64+ # builtins.match returns a list of captures or null if no match is found
65+ cef_version = if match != null then builtins . head match else "unknown" ;
66+ inherit ( arches ) depsArch projectArch targetArch ;
6167in
6268pkgs . stdenv . mkDerivation rec {
6369 pname = "jcef-ccbluex" ;
@@ -89,7 +95,7 @@ pkgs.stdenv.mkDerivation rec {
8995 name = "cef_binary_${ cef_version } _${ platform } " ;
9096 hash =
9197 {
92- "linux64" = "sha256-ELgbopPAN/GZuYRi3RqSTe44PFwN4UyQHhNPeRjxF3U =" ;
98+ "linux64" = "sha256-8qZCfpYPgAABhLQXvW7ZIcFxU29EiHllB9n+YH2AGXw =" ;
9399 }
94100 . ${ platform } ;
95101 urlName = builtins . replaceStrings [ "+" ] [ "%2B" ] name ;
You can’t perform that action at this time.
0 commit comments