From 3d38f8e24d2a2474721b2015809704056395a991 Mon Sep 17 00:00:00 2001 From: Badi Abdul-Wahid Date: Mon, 18 Nov 2024 09:30:40 -0600 Subject: [PATCH] vivaldi: use coreutils from nixpkgs On non-nixos systems the startup script uses coreutils commands linked against a different glibc than exposed via our wrapped program. As a result the following failure can occur when invoking `rm`, `readlink`, `timeout`, and other coreutils commands: ``` + timeout 3s /update-ffmpeg --user timeout: symbol lookup error: /nix/store/pacbfvpzqz2mksby36awvbcn051zcji3-glibc-2.40-36/lib/libc.so.6: undefined symbol: __tunable_is_initialized, version GLIBC_PRIVATE ``` Repro: 1. Be on ubuntu 22.04[1] 2. `nix build --impure --expr 'with import ./. {config.allowUnfree=true;}; vivaldi.override { proprietaryCodecs = true; enableWidevine=true;}'` 3. `./result/bin/vivaldi` [1]: I suspect other distros can exhibit the issue, but this is what I've tested on. (cherry picked from commit 692c9fdbfaf55522114dd930cd205037b652947f) --- pkgs/applications/networking/browsers/vivaldi/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/vivaldi/default.nix b/pkgs/applications/networking/browsers/vivaldi/default.nix index bdcaeb600b5f..b97f7a79a61d 100644 --- a/pkgs/applications/networking/browsers/vivaldi/default.nix +++ b/pkgs/applications/networking/browsers/vivaldi/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, zlib, libX11, libXext, libSM, libICE, libxkbcommon, libxshmfence +{ lib, stdenv, coreutils, fetchurl, zlib, libX11, libXext, libSM, libICE, libxkbcommon, libxshmfence , libXfixes, libXt, libXi, libXcursor, libXScrnSaver, libXcomposite, libXdamage, libXtst, libXrandr , alsa-lib, dbus, cups, libexif, ffmpeg, systemd, libva, libGL , freetype, fontconfig, libXft, libXrender, libxcb, expat @@ -114,6 +114,7 @@ in stdenv.mkDerivation rec { --set-default FONTCONFIG_FILE "${fontconfig.out}/etc/fonts/fonts.conf" \ --set-default FONTCONFIG_PATH "${fontconfig.out}/etc/fonts" \ --suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/ \ + --prefix PATH : ${coreutils}/bin \ ${lib.optionalString enableWidevine "--suffix LD_LIBRARY_PATH : ${libPath}"} '' + lib.optionalString enableWidevine '' ln -sf ${widevine-cdm}/share/google/chrome/WidevineCdm $out/opt/${vivaldiName}/WidevineCdm