Merge pull request #84584 from andir/firefox

firefox: 74.0.1 -> 75.0 and related updates
This commit is contained in:
Andreas Rammhold 2020-04-07 20:05:14 +02:00 committed by GitHub
commit 80d0a401d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1350 additions and 1164 deletions

View File

@ -6,7 +6,8 @@
, libjpeg, zlib, dbus, dbus-glib, bzip2, xorg , libjpeg, zlib, dbus, dbus-glib, bzip2, xorg
, freetype, fontconfig, file, nspr, nss, libnotify , freetype, fontconfig, file, nspr, nss, libnotify
, yasm, libGLU, libGL, sqlite, unzip, makeWrapper , yasm, libGLU, libGL, sqlite, unzip, makeWrapper
, hunspell, libXdamage, libevent, libstartup_notification, libvpx , hunspell, libXdamage, libevent, libstartup_notification
, libvpx, libvpx_1_8
, icu, libpng, jemalloc, glib , icu, libpng, jemalloc, glib
, autoconf213, which, gnused, cargo, rustc, llvmPackages , autoconf213, which, gnused, cargo, rustc, llvmPackages
, rust-cbindgen, nodejs, nasm, fetchpatch , rust-cbindgen, nodejs, nasm, fetchpatch
@ -108,8 +109,8 @@ stdenv.mkDerivation ({
xorg.libX11 xorg.libXrender xorg.libXft xorg.libXt file xorg.libX11 xorg.libXrender xorg.libXft xorg.libXt file
libnotify xorg.pixman yasm libGLU libGL libnotify xorg.pixman yasm libGLU libGL
xorg.libXScrnSaver xorg.xorgproto xorg.libXScrnSaver xorg.xorgproto
xorg.libXext sqlite unzip makeWrapper xorg.libXext unzip makeWrapper
libevent libstartup_notification libvpx /* cairo */ libevent libstartup_notification /* cairo */
icu libpng jemalloc glib icu libpng jemalloc glib
nasm nasm
# >= 66 requires nasm for the AV1 lib dav1d # >= 66 requires nasm for the AV1 lib dav1d
@ -118,7 +119,8 @@ stdenv.mkDerivation ({
# https://groups.google.com/forum/#!msg/mozilla.dev.platform/o-8levmLU80/SM_zQvfzCQAJ # https://groups.google.com/forum/#!msg/mozilla.dev.platform/o-8levmLU80/SM_zQvfzCQAJ
nspr nss nspr nss
] ]
++ lib.optionals (lib.versionOlder ffversion "75") [ libvpx sqlite ]
++ lib.optional (lib.versionAtLeast ffversion "75.0") libvpx_1_8
++ lib.optional alsaSupport alsaLib ++ lib.optional alsaSupport alsaLib
++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed ++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed
++ lib.optional gtk3Support gtk3 ++ lib.optional gtk3Support gtk3
@ -206,7 +208,6 @@ stdenv.mkDerivation ({
"--with-system-icu" "--with-system-icu"
"--enable-system-ffi" "--enable-system-ffi"
"--enable-system-pixman" "--enable-system-pixman"
"--enable-system-sqlite"
#"--enable-system-cairo" #"--enable-system-cairo"
"--enable-startup-notification" "--enable-startup-notification"
#"--enable-content-sandbox" # TODO: probably enable after 54 #"--enable-content-sandbox" # TODO: probably enable after 54
@ -221,6 +222,7 @@ stdenv.mkDerivation ({
"--with-system-nspr" "--with-system-nspr"
"--with-system-nss" "--with-system-nss"
] ]
++ lib.optional (lib.versionOlder ffversion "75") "--enable-system-sqlite"
++ lib.optional (stdenv.isDarwin) "--disable-xcode-checks" ++ lib.optional (stdenv.isDarwin) "--disable-xcode-checks"
++ lib.optionals (lib.versionOlder ffversion "69") [ ++ lib.optionals (lib.versionOlder ffversion "69") [
"--enable-webrender=build" "--enable-webrender=build"

View File

@ -7,10 +7,10 @@ in
rec { rec {
firefox = common rec { firefox = common rec {
pname = "firefox"; pname = "firefox";
ffversion = "74.0.1"; ffversion = "75.0";
src = fetchurl { src = fetchurl {
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz"; url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
sha512 = "3aycj3wllsz97x30dxngpbwryqss209cisj91vs1yfgspp8nbl148fk37id6bgl33hga1irc4zxx7glmymibymkfkrmy0xx803w8dy4"; sha512 = "0m3ibm6dy9cpvsxkzkzwj7na5rm5qz7sm3bpx604ibay9pccvgv59jxapisvmswzmlz2nv02l6p2gxlz3b0lbcg7rd5zasia92y7j99";
}; };
patches = [ patches = [
@ -35,10 +35,10 @@ rec {
firefox-esr-68 = common rec { firefox-esr-68 = common rec {
pname = "firefox-esr"; pname = "firefox-esr";
ffversion = "68.6.1esr"; ffversion = "68.7.0esr";
src = fetchurl { src = fetchurl {
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz"; url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
sha512 = "1xg2hdk50ys9np5a0jdwr2wb543sq8ibmvr05h9apmb4yn1hhz3ml9yq9r4v2di4hnb3s181zvq4np5srka2v6aqz8rk7cq46096fls"; sha512 = "29qbcc78hz1rsnz735a5miwfj0c3r1c5qm2043vyd9qz879vsh4ab82k7wncm3xa04kqdff26zh1rpbbjmdr7gwn4q8nmjzzs7wzpd3";
}; };
patches = [ patches = [

View File

@ -0,0 +1,183 @@
{ stdenv, fetchFromGitHub, perl, yasm
, vp8DecoderSupport ? true # VP8 decoder
, vp8EncoderSupport ? true # VP8 encoder
, vp9DecoderSupport ? true # VP9 decoder
, vp9EncoderSupport ? true # VP9 encoder
, extraWarningsSupport ? false # emit non-fatal warnings
, werrorSupport ? false # treat warnings as errors (not available with all compilers)
, debugSupport ? false # debug mode
, gprofSupport ? false # gprof profiling instrumentation
, gcovSupport ? false # gcov coverage instrumentation
, sizeLimitSupport ? true # limit max size to allow in the decoder
, optimizationsSupport ? true # compiler optimization flags
, runtimeCpuDetectSupport ? true # detect cpu capabilities at runtime
, thumbSupport ? false # build arm assembly in thumb mode
, examplesSupport ? true # build examples (vpxdec & vpxenc are part of examples)
, debugLibsSupport ? false # include debug version of each library
, postprocSupport ? true # postprocessing
, multithreadSupport ? true # multithreaded decoding & encoding
, internalStatsSupport ? false # output of encoder internal stats for debug, if supported (encoders)
, spatialResamplingSupport ? true # spatial sampling (scaling)
, realtimeOnlySupport ? false # build for real-time encoding
, ontheflyBitpackingSupport ? false # on-the-fly bitpacking in real-time encoding
, errorConcealmentSupport ? false # decoder conceals losses
, smallSupport ? false # favor smaller binary over speed
, postprocVisualizerSupport ? false # macro block/block level visualizers
, unitTestsSupport ? false, curl ? null, coreutils ? null # unit tests
, webmIOSupport ? true # input from and output to webm container
, libyuvSupport ? true # libyuv
, decodePerfTestsSupport ? false # build decoder perf tests with unit tests
, encodePerfTestsSupport ? false # build encoder perf tests with unit tests
, multiResEncodingSupport ? false # multiple-resolution encoding
, temporalDenoisingSupport ? true # use temporal denoising instead of spatial denoising
, coefficientRangeCheckingSupport ? false # decoder checks if intermediate transform coefficients are in valid range
, vp9HighbitdepthSupport ? true # 10/12 bit color support in VP9
# Experimental features
, experimentalSpatialSvcSupport ? false # Spatial scalable video coding
, experimentalFpMbStatsSupport ? false
, experimentalEmulateHardwareSupport ? false
}:
let
inherit (stdenv) is64bit isMips isDarwin isCygwin;
inherit (stdenv.lib) enableFeature optional optionals;
in
assert vp8DecoderSupport || vp8EncoderSupport || vp9DecoderSupport || vp9EncoderSupport;
assert internalStatsSupport && (vp9DecoderSupport || vp9EncoderSupport) -> postprocSupport;
/* If spatialResamplingSupport not enabled, build will fail with undeclared variable errors.
Variables called in vpx_scale/generic/vpx_scale.c are declared by vpx_scale/vpx_scale_rtcd.pl,
but is only executed if spatialResamplingSupport is enabled */
assert spatialResamplingSupport;
assert postprocVisualizerSupport -> postprocSupport;
assert unitTestsSupport -> curl != null && coreutils != null;
assert vp9HighbitdepthSupport -> (vp9DecoderSupport || vp9EncoderSupport);
assert isCygwin -> unitTestsSupport && webmIOSupport && libyuvSupport;
stdenv.mkDerivation rec {
pname = "libvpx";
version = "1.8.2";
src = fetchFromGitHub {
owner = "webmproject";
repo = "libvpx";
rev = "v${version}";
sha256 = "0gyq4fkbd2fv7m1mm9xrvn6rk6f4jsmbv8bnlhingmnrvyncnmnr";
};
patches = [
# ./CVE-2019-9232.CVE-2019-9325.CVE-2019-9371.CVE-2019-9433.patch
];
postPatch = ''patchShebangs .'';
outputs = [ "bin" "dev" "out" ];
setOutputFlags = false;
configurePlatforms = [];
configureFlags = [
(enableFeature (vp8EncoderSupport || vp8DecoderSupport) "vp8")
(enableFeature vp8EncoderSupport "vp8-encoder")
(enableFeature vp8DecoderSupport "vp8-decoder")
(enableFeature (vp9EncoderSupport || vp9DecoderSupport) "vp9")
(enableFeature vp9EncoderSupport "vp9-encoder")
(enableFeature vp9DecoderSupport "vp9-decoder")
(enableFeature extraWarningsSupport "extra-warnings")
(enableFeature werrorSupport "werror")
"--disable-install-docs"
(enableFeature examplesSupport "install-bins")
"--enable-install-libs"
"--disable-install-srcs"
(enableFeature debugSupport "debug")
(enableFeature gprofSupport "gprof")
(enableFeature gcovSupport "gcov")
# Required to build shared libraries
(enableFeature (!isCygwin) "pic")
(enableFeature optimizationsSupport "optimizations")
(enableFeature runtimeCpuDetectSupport "runtime-cpu-detect")
(enableFeature thumbSupport "thumb")
"--enable-libs"
(enableFeature examplesSupport "examples")
"--disable-docs"
"--as=yasm"
# Limit default decoder max to WHXGA
(if sizeLimitSupport then "--size-limit=5120x3200" else null)
"--disable-codec-srcs"
(enableFeature debugLibsSupport "debug-libs")
(enableFeature isMips "dequant-tokens")
(enableFeature isMips "dc-recon")
(enableFeature postprocSupport "postproc")
(enableFeature (postprocSupport && (vp9DecoderSupport || vp9EncoderSupport)) "vp9-postproc")
(enableFeature multithreadSupport "multithread")
(enableFeature internalStatsSupport "internal-stats")
(enableFeature spatialResamplingSupport "spatial-resampling")
(enableFeature realtimeOnlySupport "realtime-only")
(enableFeature ontheflyBitpackingSupport "onthefly-bitpacking")
(enableFeature errorConcealmentSupport "error-concealment")
# Shared libraries are only supported on ELF platforms
(if isDarwin || isCygwin then
"--enable-static --disable-shared"
else
"--enable-shared")
(enableFeature smallSupport "small")
(enableFeature postprocVisualizerSupport "postproc-visualizer")
(enableFeature unitTestsSupport "unit-tests")
(enableFeature webmIOSupport "webm-io")
(enableFeature libyuvSupport "libyuv")
(enableFeature decodePerfTestsSupport "decode-perf-tests")
(enableFeature encodePerfTestsSupport "encode-perf-tests")
(enableFeature multiResEncodingSupport "multi-res-encoding")
(enableFeature temporalDenoisingSupport "temporal-denoising")
(enableFeature (temporalDenoisingSupport && (vp9DecoderSupport || vp9EncoderSupport)) "vp9-temporal-denoising")
(enableFeature coefficientRangeCheckingSupport "coefficient-range-checking")
(enableFeature (vp9HighbitdepthSupport && is64bit) "vp9-highbitdepth")
(enableFeature (experimentalSpatialSvcSupport ||
experimentalFpMbStatsSupport ||
experimentalEmulateHardwareSupport) "experimental")
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
#"--extra-cflags="
#"--extra-cxxflags="
#"--prefix="
#"--libc="
#"--libdir="
"--enable-external-build"
# libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version)
# See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure
# Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14
"--force-target=${stdenv.hostPlatform.config}${
if stdenv.hostPlatform.isDarwin then
if stdenv.hostPlatform.osxMinVersion == "10.10" then "14"
else if stdenv.hostPlatform.osxMinVersion == "10.9" then "13"
else if stdenv.hostPlatform.osxMinVersion == "10.8" then "12"
else if stdenv.hostPlatform.osxMinVersion == "10.7" then "11"
else if stdenv.hostPlatform.osxMinVersion == "10.6" then "10"
else if stdenv.hostPlatform.osxMinVersion == "10.5" then "9"
else "8"
else ""}-gcc"
(if stdenv.hostPlatform.isCygwin then "--enable-static-msvcrt" else "")
] # Experimental features
++ optional experimentalSpatialSvcSupport "--enable-spatial-svc"
++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats"
++ optional experimentalEmulateHardwareSupport "--enable-emulate-hardware";
nativeBuildInputs = [ perl yasm ];
buildInputs = [ ]
++ optionals unitTestsSupport [ coreutils curl ];
NIX_LDFLAGS = [
"-lpthread" # fixes linker errors
];
enableParallelBuilding = true;
postInstall = ''moveToOutput bin "$bin" '';
meta = with stdenv.lib; {
description = "WebM VP8/VP9 codec SDK";
homepage = https://www.webmproject.org/;
license = licenses.bsd3;
maintainers = with maintainers; [ codyopel ];
platforms = platforms.all;
};
}

View File

@ -13316,6 +13316,7 @@ in
libviper = callPackage ../development/libraries/libviper { }; libviper = callPackage ../development/libraries/libviper { };
libvpx = callPackage ../development/libraries/libvpx { }; libvpx = callPackage ../development/libraries/libvpx { };
libvpx_1_8 = callPackage ../development/libraries/libvpx/1_8.nix { };
libvterm = callPackage ../development/libraries/libvterm { }; libvterm = callPackage ../development/libraries/libvterm { };
libvterm-neovim = callPackage ../development/libraries/libvterm-neovim { }; libvterm-neovim = callPackage ../development/libraries/libvterm-neovim { };