chromium: Move the version helper functions into default.nix
Those functions can be required anywhere in the Nix expressions for Chromium and therefore they should be defined in default.nix and inherited where necessary. This fixes the chromiumBeta build which failed because I forgot to update the channel conditional when the beta channel advanced to M94. This is exactly why the version based conditionals should be used everywhere. (cherry picked from commit 186315def77d62b53ad6ccdf57ec9593edbe8bc3)
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
{ lib, mkChromiumDerivation, channel, enableWideVine, ungoogled }:
|
||||
{ lib, mkChromiumDerivation
|
||||
, channel, chromiumVersionAtLeast
|
||||
, enableWideVine, ungoogled
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
@@ -16,8 +19,8 @@ mkChromiumDerivation (base: rec {
|
||||
cp -v "$buildPath/"*.so "$buildPath/"*.pak "$buildPath/"*.bin "$libExecPath/"
|
||||
cp -v "$buildPath/icudtl.dat" "$libExecPath/"
|
||||
cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
|
||||
${lib.optionalString (channel != "dev") ''cp -v "$buildPath/crashpad_handler" "$libExecPath/"''}
|
||||
${lib.optionalString (channel == "dev") ''cp -v "$buildPath/chrome_crashpad_handler" "$libExecPath/"''}
|
||||
${lib.optionalString (!chromiumVersionAtLeast "94") ''cp -v "$buildPath/crashpad_handler" "$libExecPath/"''}
|
||||
${lib.optionalString (chromiumVersionAtLeast "94") ''cp -v "$buildPath/chrome_crashpad_handler" "$libExecPath/"''}
|
||||
cp -v "$buildPath/chrome" "$libExecPath/$packageName"
|
||||
|
||||
# Swiftshader
|
||||
|
||||
Reference in New Issue
Block a user