Merge branch 'staging'

This commit is contained in:
Vladimír Čunát
2017-03-24 21:07:55 +01:00
49 changed files with 385 additions and 204 deletions

View File

@@ -19,13 +19,6 @@ stdenv.mkDerivation rec {
sha1 = "c6f7b99986f93c9df78653c3e6a3b5043f65145e";
};
infinality = fetchFromGitHub {
owner = "bohoomil";
repo = "fontconfig-ultimate";
rev = "730f5e77580677e86522c1f2119aa78803741759";
sha256 = "1hbrdpm6xcczs2c2iid7by8h7dsd0jcf7an88s150njyqnjzxjg7";
};
patches = [
# from https://bugs.freedesktop.org/show_bug.cgi?id=98165
(fetchpatch {
@@ -35,10 +28,6 @@ stdenv.mkDerivation rec {
})
];
prePatch = ''
patches="$patches $(echo $infinality/*_cairo-iu/*.patch)"
'';
outputs = [ "out" "dev" "devdoc" ];
outputBin = "dev"; # very small

View File

@@ -8,13 +8,11 @@ stdenv.mkDerivation rec {
sha256 = "0llraqw86jmw4vzv7inskp3xxm2gc64my08iwq5mzncgfdbfza4f";
};
infinality_patch =
let subvers = "1";
in fetchurl {
url = http://www.infinality.net/fedora/linux/zips/fontconfig-infinality-1-20130104_1.tar.bz2;
sha256 = "1fm5xx0mx2243jrq5rxk4v0ajw2nawpj23399h710bx6hd1rviq7";
}
;
patches = [
# FreeType 2.7 prefixes PCF font family names with the foundry name.
# The output of fc-list and fc-query change which breaks the tests.
./test-pcf-family-names-freetype-2.7.patch
];
outputs = [ "bin" "dev" "lib" "out" ]; # $out contains all the config
@@ -44,10 +42,6 @@ stdenv.mkDerivation rec {
# Don't try to write to /var/cache/fontconfig at install time.
installFlags = "sysconfdir=$(out)/etc fc_cachedir=$(TMPDIR)/dummy RUN_FC_CACHE_TEST=false";
postInstall = ''
cd "$out/etc/fonts" && tar xvf ${infinality_patch}
'';
passthru = {
# Empty for backward compatibility, there was no versioning before 2.11
configVersion = "";

View File

@@ -33,6 +33,10 @@ stdenv.mkDerivation rec {
url = "https://cgit.freedesktop.org/fontconfig/patch/?id=1ab5258f7c";
sha256 = "0x2a4qx51j3gqcp1kp4lisdzmhrkw1zw0r851d82ksgjlc0vkbaz";
})
# FreeType 2.7 prefixes PCF font family names with the foundry name.
# The output of fc-list and fc-query change which breaks the tests.
./test-pcf-family-names-freetype-2.7.patch
];
# additionally required for the glibc-2.25 patch; avoid requiring gperf
postPatch = ''

View File

@@ -0,0 +1,18 @@
diff -Nuar fontconfig-2.10.2-orig/test/out.expected fontconfig-2.10.2/test/out.expected
--- fontconfig-2.10.2-orig/test/out.expected 2017-03-06 06:45:50.876053093 -0600
+++ fontconfig-2.10.2/test/out.expected 2017-03-06 06:48:18.012514337 -0600
@@ -1,8 +1,8 @@
-Fixed:pixelsize=16
-Fixed:pixelsize=6
+Misc Fixed:pixelsize=6
+Sony Fixed:pixelsize=16
=
-Fixed:pixelsize=16
-Fixed:pixelsize=6
+Misc Fixed:pixelsize=6
+Sony Fixed:pixelsize=16
=
-Fixed:pixelsize=16
-Fixed:pixelsize=6
+Misc Fixed:pixelsize=6
+Sony Fixed:pixelsize=16

View File

@@ -1,64 +1,53 @@
{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, which, zlib, bzip2, libpng, gnumake
, glib /* passthru only */
{
stdenv, lib, fetchurl, copyPathsToStore,
pkgconfig, which,
zlib, bzip2, libpng, gnumake, glib,
# FreeType supports sub-pixel rendering. This is patented by
# Microsoft, so it is disabled by default. This option allows it to
# be enabled. See http://www.freetype.org/patents.html.
, useEncumberedCode ? true
, useInfinality ? true
# FreeType supports LCD filtering (colloquially referred to as sub-pixel rendering).
# LCD filtering is also known as ClearType and covered by several Microsoft patents.
# This option allows it to be disabled. See http://www.freetype.org/patents.html.
useEncumberedCode ? true,
}:
assert useInfinality -> useEncumberedCode;
let
version = "2.6.5";
infinality = fetchFromGitHub {
owner = "archfan";
repo = "infinality_bundle";
rev = "5c0949a477bf43d2ac4e57b4fc39bcc3331002ee";
sha256 = "17389aqm6rlxl4b5mv1fx4b22x2v2n60hfhixfxqxpd8ialsdi6l";
};
in
with { inherit (stdenv.lib) optional optionals optionalString; };
stdenv.mkDerivation rec {
name = "freetype-${version}";
let version = "2.7.1"; name = "freetype-" + version; in
stdenv.mkDerivation {
inherit name;
meta = with stdenv.lib; {
description = "A font rendering engine";
longDescription = ''
FreeType is a portable and efficient library for rendering fonts. It
supports TrueType, Type 1, CFF fonts, and WOFF, PCF, FNT, BDF and PFR
fonts. It has a bytecode interpreter and has an automatic hinter called
autofit which can be used instead of hinting instructions included in
fonts.
'';
homepage = https://www.freetype.org/;
license = licenses.gpl2Plus; # or the FreeType License (BSD + advertising clause)
platforms = platforms.all;
maintainers = with maintainers; [ ttuegel ];
};
src = fetchurl {
url = "mirror://savannah/freetype/${name}.tar.bz2";
sha256 = "1w5c87s4rpx9af5b3mk5cjd1yny3c4dq5p9iv3ixb3vr00a6w2p2";
sha256 = "121gm15ayfg3rglby8ifh8384mcjb9dhmx9j40zl7yszw72b4frs";
};
patches = [
# Patch for validation of OpenType and GX/AAT tables.
(fetchurl {
name = "freetype-2.2.1-enable-valid.patch";
url = "http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/plain/freetype-2.2.1-enable-valid.patch?id=9a81147af83b1166a5f301e379f85927cc610990";
sha256 = "0zkgqhws2s0j8ywksclf391iijhidb1a406zszd7xbdjn28kmj2l";
})
] ++ optionals (!useInfinality && useEncumberedCode) [
# Patch to enable subpixel rendering.
# See https://www.freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html.
(fetchurl {
name = "freetype-2.3.0-enable-spr.patch";
url = http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/plain/freetype-2.3.0-enable-spr.patch?id=9a81147af83b1166a5f301e379f85927cc610990;
sha256 = "13ni9n5q3nla38wjmxd4f8cy29gp62kjx2l6y6nqhdyiqp8fz8nd";
})
];
prePatch = optionalString useInfinality ''
patches="$patches $(ls ${infinality}/*_freetype2-iu/*-infinality-*.patch)"
'';
outputs = [ "out" "dev" ];
propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype
# dependence on harfbuzz is looser than the reverse dependence
nativeBuildInputs = [ pkgconfig which ]
# FreeType requires GNU Make, which is not part of stdenv on FreeBSD.
++ optional (!stdenv.isLinux) gnumake;
patches =
[ ./enable-table-validation.patch ]
++ optional useEncumberedCode ./enable-subpixel-rendering.patch;
outputs = [ "out" "dev" ];
configureFlags = [ "--disable-static" "--bindir=$(dev)/bin" ];
# The asm for armel is written with the 'asm' keyword.
@@ -76,19 +65,4 @@ stdenv.mkDerivation rec {
# know why it's on the PATH.
configureFlags = "--disable-static CC_BUILD=gcc";
};
meta = with stdenv.lib; {
description = "A font rendering engine";
longDescription = ''
FreeType is a portable and efficient library for rendering fonts. It
supports TrueType, Type 1, CFF fonts, and WOFF, PCF, FNT, BDF and PFR
fonts. It has a bytecode interpreter and has an automatic hinter called
autofit which can be used instead of hinting instructions included in
fonts.
'';
homepage = https://www.freetype.org/;
license = licenses.gpl2Plus; # or the FreeType License (BSD + advertising clause)
#ToDo: encumbered = useEncumberedCode;
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,13 @@
Index: freetype-2.7.1/include/freetype/config/ftoption.h
===================================================================
--- freetype-2.7.1.orig/include/freetype/config/ftoption.h
+++ freetype-2.7.1/include/freetype/config/ftoption.h
@@ -122,7 +122,7 @@ FT_BEGIN_HEADER
/* This is done to allow FreeType clients to run unmodified, forcing */
/* them to display normal gray-level anti-aliased glyphs. */
/* */
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
/*************************************************************************/

View File

@@ -0,0 +1,22 @@
Index: freetype-2.7.1/modules.cfg
===================================================================
--- freetype-2.7.1.orig/modules.cfg
+++ freetype-2.7.1/modules.cfg
@@ -120,7 +120,7 @@ AUX_MODULES += cache
# TrueType GX/AAT table validation. Needs ftgxval.c below.
#
# No FT_CONFIG_OPTION_PIC support.
-# AUX_MODULES += gxvalid
+AUX_MODULES += gxvalid
# Support for streams compressed with gzip (files with suffix .gz).
#
@@ -143,7 +143,7 @@ AUX_MODULES += bzip2
# OpenType table validation. Needs ftotval.c below.
#
# No FT_CONFIG_OPTION_PIC support.
-# AUX_MODULES += otvalid
+AUX_MODULES += otvalid
# Auxiliary PostScript driver component to share common code.
#

View File

@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "jemalloc-${version}";
version = "4.3.1";
version = "4.5.0";
src = fetchurl {
url = "https://github.com/jemalloc/jemalloc/releases/download/${version}/${name}.tar.bz2";
sha256 = "12r71i8nm3vwz21fc16rwbb0pwcg5s05n1qg3rwl2s85v0x1ifzp";
sha256 = "9409d85664b4f135b77518b0b118c549009dc10f6cba14557d170476611f6780";
};
# By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which
@@ -14,6 +14,9 @@ stdenv.mkDerivation rec {
# option should remove the prefix and give us a working jemalloc.
configureFlags = stdenv.lib.optional stdenv.isDarwin "--with-jemalloc-prefix=";
doCheck = true;
meta = with stdenv.lib; {
homepage = http://jemalloc.net;
description = "General purpose malloc(3) implementation";

View File

@@ -5,7 +5,9 @@
, libelf, libvdpau, python2
, grsecEnabled ? false
, enableRadv ? false
, enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
# Texture floats are patented, see docs/patents.txt, so we don't enable them for full Mesa.
# It's overridden for mesa_drivers.
, enableTextureFloats ? false
, galliumDrivers ? null
, driDrivers ? null
, vulkanDrivers ? null
@@ -63,7 +65,7 @@ let
in
let
version = "17.0.1";
version = "17.0.2";
branch = head (splitString "." version);
driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32";
in
@@ -78,7 +80,7 @@ stdenv.mkDerivation {
"ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
"https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz"
];
sha256 = "96fd70ef5f31d276a17e424e7e1bb79447ccbbe822b56844213ef932e7ad1b0c";
sha256 = "f8f191f909e01e65de38d5bdea5fb057f21649a3aed20948be02348e77a689d4";
};
prePatch = "patchShebangs .";

View File

@@ -1,7 +1,7 @@
{ stdenv, fetchurl, pkgconfig
# Optional Dependencies
, openssl ? null, libev ? null, zlib ? null, libcares ? null
, openssl ? null, libev ? null, zlib ? null, c-ares ? null
, enableHpack ? false, jansson ? null
, enableAsioLib ? false, boost ? null
, enableGetAssets ? false, libxml2 ? null
@@ -17,18 +17,18 @@ with { inherit (stdenv.lib) optional; };
stdenv.mkDerivation rec {
name = "nghttp2-${version}";
version = "1.19.0";
version = "1.20.0";
# Don't use fetchFromGitHub since this needs a bootstrap curl
src = fetchurl {
url = "https://github.com/nghttp2/nghttp2/releases/download/v${version}/nghttp2-${version}.tar.bz2";
sha256 = "477466eee27158d37b4478d9335dd091497cae4d7f2375fc6657beab67db9e7a";
sha256 = "fb29d0500b194f11680203aed21aafab241063ec1397cc51ab5cc0957341141b";
};
outputs = [ "out" "dev" "lib" ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl libev zlib libcares ]
buildInputs = [ openssl libev zlib c-ares ]
++ optional enableHpack jansson
++ optional enableAsioLib boost
++ optional enableGetAssets libxml2
@@ -36,8 +36,14 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
configureFlags = [ "--with-spdylay=no" "--disable-examples" "--disable-python-bindings" ]
++ optional enableAsioLib "--enable-asio-lib --with-boost-libdir=${boost}/lib";
#doCheck = true; # requires CUnit ; currently failing at test_util_localtime_date in util_test.cc
meta = with stdenv.lib; {
homepage = http://nghttp2.org/;
homepage = https://nghttp2.org/;
description = "A C implementation of HTTP/2";
license = licenses.mit;
platforms = platforms.all;

View File

@@ -19,7 +19,9 @@ let
patches =
(args.patches or [])
++ optional (versionOlder version "1.1.0") ./use-etc-ssl-certs.patch
++ [ ./nix-ssl-cert-file.patch ]
++ optional (versionOlder version "1.1.0")
(if stdenv.isDarwin then ./use-etc-ssl-certs-darwin.patch else ./use-etc-ssl-certs.patch)
++ optional stdenv.isCygwin ./1.0.1-cygwin64.patch
++ optional
(versionOlder version "1.0.2" && (stdenv.isDarwin || (stdenv ? cross && stdenv.cross.libc == "libSystem")))

View File

@@ -0,0 +1,14 @@
diff -ru -x '*~' openssl-1.0.2j-orig/crypto/x509/by_file.c openssl-1.0.2j/crypto/x509/by_file.c
--- openssl-1.0.2j-orig/crypto/x509/by_file.c 2016-09-26 11:49:07.000000000 +0200
+++ openssl-1.0.2j/crypto/x509/by_file.c 2016-10-13 16:54:31.400288302 +0200
@@ -97,7 +97,9 @@
switch (cmd) {
case X509_L_FILE_LOAD:
if (argl == X509_FILETYPE_DEFAULT) {
- file = (char *)getenv(X509_get_default_cert_file_env());
+ file = (char *)getenv("NIX_SSL_CERT_FILE");
+ if (!file)
+ file = (char *)getenv(X509_get_default_cert_file_env());
if (file)
ok = (X509_load_cert_crl_file(ctx, file,
X509_FILETYPE_PEM) != 0);

View File

@@ -0,0 +1,13 @@
diff -ru -x '*~' openssl-1.0.1r-orig/crypto/cryptlib.h openssl-1.0.1r/crypto/cryptlib.h
--- openssl-1.0.1r-orig/crypto/cryptlib.h 2016-01-28 14:38:30.000000000 +0100
+++ openssl-1.0.1r/crypto/cryptlib.h 2016-02-03 12:54:29.193165176 +0100
@@ -81,8 +81,8 @@
# ifndef OPENSSL_SYS_VMS
# define X509_CERT_AREA OPENSSLDIR
# define X509_CERT_DIR OPENSSLDIR "/certs"
-# define X509_CERT_FILE OPENSSLDIR "/cert.pem"
+# define X509_CERT_FILE "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt"
# define X509_PRIVATE_DIR OPENSSLDIR "/private"
# else
# define X509_CERT_AREA "SSLROOT:[000000]"