2021-08-11 14:56:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, cmake
|
2021-06-28 23:13:55 +00:00
|
|
|
, 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
|
2022-02-21 08:47:16 +00:00
|
|
|
, obs-studio
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2021-06-28 23:13:55 +00:00
|
|
|
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
|
|
|
|
];
|
2021-08-11 14:56:57 +00:00
|
|
|
platforms = {
|
|
|
|
"aarch64-linux" = {
|
|
|
|
platformStr = "linuxarm64";
|
|
|
|
projectArch = "arm64";
|
|
|
|
};
|
|
|
|
"x86_64-linux" = {
|
|
|
|
platformStr = "linux64";
|
|
|
|
projectArch = "x86_64";
|
|
|
|
};
|
|
|
|
};
|
2023-03-27 19:17:25 +00:00
|
|
|
platforms."aarch64-linux".sha256 = "1mrrsj213jc3s926wc1ccz63n7052mbmb70411lsi0192xfmrpjb";
|
|
|
|
platforms."x86_64-linux".sha256 = "1jf4yv83xjbj75j1mqzib9f3kb9pwsnqryhv1dwqm5qi6if6g5y3";
|
2021-08-11 14:56:57 +00:00
|
|
|
|
|
|
|
platformInfo = builtins.getAttr stdenv.targetPlatform.system platforms;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "cef-binary";
|
2023-03-27 19:17:25 +00:00
|
|
|
version = "111.2.6";
|
|
|
|
gitRevision = "491d238";
|
|
|
|
chromiumVersion = "111.0.5563.65";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-11 14:56:57 +00:00
|
|
|
url = "https://cef-builds.spotifycdn.com/cef_binary_${version}+g${gitRevision}+chromium-${chromiumVersion}_${platformInfo.platformStr}_minimal.tar.bz2";
|
|
|
|
inherit (platformInfo) sha256;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2022-08-12 12:06:08 +00:00
|
|
|
cmakeFlags = [ "-DPROJECT_ARCH=${platformInfo.projectArch}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
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/
|
2021-06-28 23:13:55 +00:00
|
|
|
patchelf --set-rpath "${rpath}" $out/lib/libcef.so
|
2020-04-24 23:36:52 +00:00
|
|
|
cp ../Release/*.bin $out/share/cef/
|
|
|
|
cp -r ../Resources/* $out/share/cef/
|
|
|
|
cp -r ../include $out/
|
|
|
|
'';
|
|
|
|
|
2022-02-21 08:47:16 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit obs-studio; # frequently breaks on CEF updates
|
|
|
|
};
|
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Simple framework for embedding Chromium-based browsers in other applications";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://cef-builds.spotifycdn.com/index.html";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ puffnfresh ];
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [
|
|
|
|
fromSource
|
|
|
|
binaryNativeCode
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2023-04-12 12:48:02 +00:00
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|