vivaldi: add missing build/install phase hooks

This commit is contained in:
Badi Abdul-Wahid 2021-05-03 09:50:19 -05:00
parent 1119dbe764
commit ba286702f5
No known key found for this signature in database
GPG Key ID: 5C02A763FA1FF588

View File

@ -47,6 +47,7 @@ in stdenv.mkDerivation rec {
+ ":$out/opt/${vivaldiName}/lib";
buildPhase = ''
runHook preBuild
echo "Patching Vivaldi binaries"
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
@ -56,12 +57,14 @@ in stdenv.mkDerivation rec {
ln -s ${vivaldi-ffmpeg-codecs}/lib/libffmpeg.so opt/${vivaldiName}/libffmpeg.so.''${version%\.*\.*}
'' + ''
echo "Finished patching Vivaldi binaries"
runHook postBuild
'';
dontPatchELF = true;
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p "$out"
cp -r opt "$out"
mkdir "$out/bin"
@ -84,6 +87,8 @@ in stdenv.mkDerivation rec {
${lib.optionalString enableWidevine "--suffix LD_LIBRARY_PATH : ${libPath}"}
'' + lib.optionalString enableWidevine ''
ln -sf ${vivaldi-widevine}/share/google/chrome/WidevineCdm $out/opt/${vivaldiName}/WidevineCdm
'' + ''
runHook postInstall
'';
meta = with lib; {