cider-2: 3.0.0 -> 3.1.1

This commit is contained in:
Amadej Kastelic
2025-09-02 19:38:30 +02:00
parent 6af268dc22
commit 4d94729b6e

View File

@@ -8,21 +8,25 @@
# 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
@@ -32,6 +36,7 @@ stdenv.mkDerivation rec {
alsa-lib
gtk3
libgbm
libGL
nspr
nss
];
@@ -54,10 +59,25 @@ stdenv.mkDerivation rec {
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 \