cider-2: 3.0.0 -> 3.1.1, fix update script (#439656)

Changed files
+24 -4
pkgs
by-name
ci
+23 -3
pkgs/by-name/ci/cider-2/package.nix
···
# Required dependencies for autoPatchelfHook
alsa-lib,
+
asar,
gtk3,
libgbm,
+
libGL,
nspr,
nss,
+
widevine-cdm,
}:
stdenv.mkDerivation rec {
pname = "cider-2";
-
version = "3.0.0";
+
version = "3.1.1";
src = fetchurl {
url = "https://repo.cider.sh/apt/pool/main/cider-v${version}-linux-x64.deb";
-
hash = "sha256-XKyzt8QkPNQlgFxR12KA5t+PCJki7UuFpn4SGmoGkpg=";
+
hash = "sha256-2gd/ThI59GFU/lMKFLtwHeRWSqp14jFd8YMrV8Cu/oQ=";
};
nativeBuildInputs = [
+
asar
dpkg
autoPatchelfHook
makeWrapper
···
alsa-lib
gtk3
libgbm
+
libGL
nspr
nss
];
···
runHook postInstall
'';
+
postInstall = ''
+
${lib.getExe asar} extract $out/lib/cider/resources/app.asar ./cider-build
+
+
# Patch login popup webview creation
+
substituteInPlace ./cider-build/.vite/build/events-*.js \
+
--replace-fail 'else if(c.includes(r))return{action:"allow"}' 'else if(c.includes(r))return{action:"allow",overrideBrowserWindowOptions:{webPreferences:{devTools:!0,nodeIntegration:!1,contextIsolation:!0,webSecurity:!1,sandbox:!1,experimentalFeatures:!0}}}'
+
+
${lib.getExe asar} pack ./cider-build $out/lib/cider/resources/app.asar
+
rm -rf ./cider-build
+
+
# Install Widevine CDM for DRM support
+
ln -sf ${widevine-cdm}/share/google/chrome/WidevineCdm $out/lib/cider/
+
'';
+
postFixup = ''
makeWrapper $out/lib/cider/Cider $out/bin/${pname} \
--add-flags "\$\{NIXOS_OZONE_WL:+\$\{WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true\}\}" \
-
--add-flags "--no-sandbox --disable-gpu-sandbox"
+
--add-flags "--no-sandbox --disable-gpu-sandbox" \
+
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}"
mv $out/share/applications/cider.desktop $out/share/applications/${pname}.desktop
substituteInPlace $out/share/applications/${pname}.desktop \
+1 -1
pkgs/by-name/ci/cider-2/updater.sh
···
cd ../../../..
if [[ "${1-default}" != "--deps-only" ]]; then
-
SHA="$(nix-prefetch-url --quiet --unpack --type sha256 $DEB_URL)"
+
SHA="$(nix-prefetch-url --quiet --type sha256 $DEB_URL)"
SRI=$(nix --experimental-features nix-command hash to-sri "sha256:$SHA")
update-source-version cider-2 "$NEW_VERSION" "$SRI"
fi