3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libcef/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

119 lines
2.5 KiB
Nix
Raw Normal View History

2021-08-10 21:34:42 +01:00
{ lib
, stdenv
, fetchurl
, cmake
2021-06-10 10:32:46 +01: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
, obs-studio
}:
2018-05-29 03:10:18 +01:00
let
2021-06-10 10:32:46 +01: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-10 21:34:42 +01:00
platforms = {
"aarch64-linux" = {
platformStr = "linuxarm64";
projectArch = "arm64";
};
"i686-linux" = {
platformStr = "linux32";
projectArch = "x86";
};
2021-08-10 21:34:42 +01:00
"x86_64-linux" = {
platformStr = "linux64";
projectArch = "x86_64";
};
};
2022-02-18 08:59:31 +00:00
platforms."aarch64-linux".sha256 = "0m12adzcs6xsmgnqsdc5g0xs6xmjbj560x4d9rnv9fpf1p7jv2fa";
platforms."i686-linux".sha256 = "00cy5kxx8hpifkwhn9qbfch7ng3crx0zb6ypllzip6qms956mama";
platforms."x86_64-linux".sha256 = "1f1hxx4xl0wljyrgj0m3zq47yz2cyqd52qigrkpcvavr1d2sx6m3";
2021-08-10 21:34:42 +01:00
platformInfo = builtins.getAttr stdenv.targetPlatform.system platforms;
in
stdenv.mkDerivation rec {
pname = "cef-binary";
2022-02-18 08:59:31 +00:00
version = "98.1.21";
gitRevision = "9782362";
chromiumVersion = "98.0.4758.102";
2018-05-29 03:10:18 +01:00
src = fetchurl {
2021-08-10 21:34:42 +01:00
url = "https://cef-builds.spotifycdn.com/cef_binary_${version}+g${gitRevision}+chromium-${chromiumVersion}_${platformInfo.platformStr}_minimal.tar.bz2";
inherit (platformInfo) sha256;
2018-05-29 03:10:18 +01:00
};
2018-05-29 03:10:18 +01:00
nativeBuildInputs = [ cmake ];
2021-08-10 21:34:42 +01:00
cmakeFlags = "-DPROJECT_ARCH=${platformInfo.projectArch}";
makeFlags = [ "libcef_dll_wrapper" ];
2018-05-29 03:10:18 +01:00
dontStrip = true;
dontPatchELF = true;
2018-05-29 03:10:18 +01:00
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-10 10:32:46 +01:00
patchelf --set-rpath "${rpath}" $out/lib/libcef.so
2018-05-29 03:10:18 +01:00
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
};
2022-01-30 17:06:36 +00:00
passthru.updateScript = ./update.sh;
meta = with lib; {
2018-05-29 03:10:18 +01:00
description = "Simple framework for embedding Chromium-based browsers in other applications";
2021-06-10 10:32:46 +01:00
homepage = "https://cef-builds.spotifycdn.com/index.html";
2018-05-29 03:10:18 +01:00
maintainers = with maintainers; [ puffnfresh ];
license = licenses.bsd3;
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
2018-05-29 03:10:18 +01:00
};
}