e18f6fb5f9
GitOrigin-RevId: 9df2cb074d72ea80ac9fd225b29060c8cf13dd39
112 lines
2.3 KiB
Nix
112 lines
2.3 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
|
|
}:
|
|
|
|
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";
|
|
sha256 = "1j93qawh9h6k2ic70i10npppv5f9dch961lc1wxwsi68daq8r081";
|
|
};
|
|
"i686-linux" = {
|
|
platformStr = "linux32";
|
|
projectArch = "x86";
|
|
sha256 = "0ki4zr8ih06kirgbpxbinv4baw3qvacx208q6qy1cvpfh6ll4fwb";
|
|
};
|
|
"x86_64-linux" = {
|
|
platformStr = "linux64";
|
|
projectArch = "x86_64";
|
|
sha256 = "1ja711x9fdlf21qw1k9xn3lvjc5zsfgnjga1w1r8sysam73jk7xj";
|
|
};
|
|
};
|
|
|
|
platformInfo = builtins.getAttr stdenv.targetPlatform.system platforms;
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "cef-binary";
|
|
version = "90.6.7";
|
|
gitRevision = "19ba721";
|
|
chromiumVersion = "90.0.4430.212";
|
|
|
|
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/
|
|
'';
|
|
|
|
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 ];
|
|
license = licenses.bsd3;
|
|
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
|
|
};
|
|
}
|