c7f94ff3ce
GitOrigin-RevId: b85ed9dcbf187b909ef7964774f8847d554fab3b
117 lines
2.4 KiB
Nix
117 lines
2.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, cmake
|
|
, glib
|
|
, nss
|
|
, nspr
|
|
, atk
|
|
, at-spi2-atk
|
|
, libdrm
|
|
, expat
|
|
, libxcb
|
|
, libxkbcommon
|
|
, libX11
|
|
, libXcomposite
|
|
, libXdamage
|
|
, libXext
|
|
, libXfixes
|
|
, libXrandr
|
|
, mesa
|
|
, gtk3
|
|
, pango
|
|
, cairo
|
|
, alsa-lib
|
|
, dbus
|
|
, at-spi2-core
|
|
, cups
|
|
, libxshmfence
|
|
, obs-studio
|
|
}:
|
|
|
|
let
|
|
rpath = lib.makeLibraryPath [
|
|
glib
|
|
nss
|
|
nspr
|
|
atk
|
|
at-spi2-atk
|
|
libdrm
|
|
expat
|
|
libxcb
|
|
libxkbcommon
|
|
libX11
|
|
libXcomposite
|
|
libXdamage
|
|
libXext
|
|
libXfixes
|
|
libXrandr
|
|
mesa
|
|
gtk3
|
|
pango
|
|
cairo
|
|
alsa-lib
|
|
dbus
|
|
at-spi2-core
|
|
cups
|
|
libxshmfence
|
|
];
|
|
platforms = {
|
|
"aarch64-linux" = {
|
|
platformStr = "linuxarm64";
|
|
projectArch = "arm64";
|
|
};
|
|
"x86_64-linux" = {
|
|
platformStr = "linux64";
|
|
projectArch = "x86_64";
|
|
};
|
|
};
|
|
platforms."aarch64-linux".sha256 = "0iqih0fbafzlcfq3kljjr3pkywamwvahgm6b7b0z0xdbzq0idxdx";
|
|
platforms."x86_64-linux".sha256 = "1cc7lmp984653b9909pnk4brs96bmgq7hd6p9i6xgxy2y4n3887m";
|
|
|
|
platformInfo = builtins.getAttr stdenv.targetPlatform.system platforms;
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "cef-binary";
|
|
version = "116.0.14";
|
|
gitRevision = "376a780";
|
|
chromiumVersion = "116.0.5845.97";
|
|
|
|
src = fetchurl {
|
|
url = "https://cef-builds.spotifycdn.com/cef_binary_${version}+g${gitRevision}+chromium-${chromiumVersion}_${platformInfo.platformStr}_minimal.tar.bz2";
|
|
inherit (platformInfo) sha256;
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
cmakeFlags = [ "-DPROJECT_ARCH=${platformInfo.projectArch}" ];
|
|
makeFlags = [ "libcef_dll_wrapper" ];
|
|
dontStrip = true;
|
|
dontPatchELF = true;
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/lib/ $out/share/cef/
|
|
cp libcef_dll_wrapper/libcef_dll_wrapper.a $out/lib/
|
|
cp ../Release/libcef.so $out/lib/
|
|
patchelf --set-rpath "${rpath}" $out/lib/libcef.so
|
|
cp ../Release/*.bin $out/share/cef/
|
|
cp -r ../Resources/* $out/share/cef/
|
|
cp -r ../include $out/
|
|
'';
|
|
|
|
passthru.tests = {
|
|
inherit obs-studio; # frequently breaks on CEF updates
|
|
};
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
meta = with lib; {
|
|
description = "Simple framework for embedding Chromium-based browsers in other applications";
|
|
homepage = "https://cef-builds.spotifycdn.com/index.html";
|
|
maintainers = with maintainers; [ puffnfresh ];
|
|
sourceProvenance = with sourceTypes; [
|
|
fromSource
|
|
binaryNativeCode
|
|
];
|
|
license = licenses.bsd3;
|
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
|
};
|
|
}
|