···49 rest of the system on a stable release.
50 </para>
51 </listitem>
0000000000005253</itemizedlist>
54
···49 rest of the system on a stable release.
50 </para>
51 </listitem>
52+ <listitem>
53+ <para>
54+ Updated to FreeType 2.7.1, including a new TrueType engine.
55+ The new engine replaces the Infinality engine which was the default in
56+ NixOS. The default font rendering settings are now provided by
57+ fontconfig-penultimate, replacing fontconfig-ultimate; the new defaults
58+ are less invasive and provide rendering that is more consistent with
59+ other systems and hopefully with each font designer's intent. Some
60+ system-wide configuration has been removed from the Fontconfig NixOS
61+ module where user Fontconfig settings are available.
62+ </para>
63+ </listitem>
6465</itemizedlist>
66
···29 sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp
30 '';
310032 # Clang expects to find LLVMgold in its own prefix
33 # Clang expects to find sanitizer libraries in its own prefix
34 postInstall = ''
35 ln -sv ${llvm}/lib/LLVMgold.so $out/lib
36 ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
37 ln -sv $out/bin/clang $out/bin/cpp
00000000038 '';
3940 enableParallelBuilding = true;
···29 sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp
30 '';
3132+ outputs = [ "out" "python" ];
33+34 # Clang expects to find LLVMgold in its own prefix
35 # Clang expects to find sanitizer libraries in its own prefix
36 postInstall = ''
37 ln -sv ${llvm}/lib/LLVMgold.so $out/lib
38 ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
39 ln -sv $out/bin/clang $out/bin/cpp
40+41+ mkdir -p $python/bin $python/share/clang/
42+ mv $out/bin/{git-clang-format,scan-view} $python/bin
43+ if [ -e $out/bin/set-xcode-analyzer ]; then
44+ mv $out/bin/set-xcode-analyzer $python/bin
45+ fi
46+ mv $out/share/clang/*.py $python/share/clang
47+48+ rm $out/bin/c-index-test
49 '';
5051 enableParallelBuilding = true;
+9-7
pkgs/development/compilers/llvm/3.9/llvm.nix
···40 outputs = [ "out" ] ++ stdenv.lib.optional enableSharedLibraries "lib";
4142 buildInputs = [ perl groff cmake libxml2 python libffi ]
43- ++ stdenv.lib.optionals stdenv.isDarwin
44- [ libcxxabi darwin.cctools darwin.apple_sdk.libs.xpc ];
4546 propagatedBuildInputs = [ ncurses zlib ];
47···53 sha256 = "11sq86spw41v72f676igksapdlsgh7fiqp5qkkmgfj0ndqcn9skf";
54 }}
55 ''
56- # hacky fix: New LLVM releases require a newer OS X SDK than
57- # 10.9. This is a temporary measure until nixpkgs darwin support is
58- # updated.
00059 + stdenv.lib.optionalString stdenv.isDarwin ''
60- sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
061 ''
62 # Patch llvm-config to return correct library path based on --link-{shared,static}.
63 + stdenv.lib.optionalString (enableSharedLibraries) ''
···85 ++ stdenv.lib.optionals (isDarwin) [
86 "-DLLVM_ENABLE_LIBCXX=ON"
87 "-DCAN_TARGET_i386=false"
88- "-DCMAKE_LIBTOOL=${darwin.cctools}/bin/libtool"
89 ];
9091 postBuild = ''
···40 outputs = [ "out" ] ++ stdenv.lib.optional enableSharedLibraries "lib";
4142 buildInputs = [ perl groff cmake libxml2 python libffi ]
43+ ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi ];
04445 propagatedBuildInputs = [ ncurses zlib ];
46···52 sha256 = "11sq86spw41v72f676igksapdlsgh7fiqp5qkkmgfj0ndqcn9skf";
53 }}
54 ''
55+ # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
56+ # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
57+ # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
58+ # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
59+ # a flag and turn the flag off during the stdenv build. I realize that this LLVM isn't used in the stdenv but I want to
60+ # keep it consistent with 4.0. We really shouldn't be copying and pasting all this code around...
61 + stdenv.lib.optionalString stdenv.isDarwin ''
62+ substituteInPlace ./projects/compiler-rt/cmake/config-ix.cmake \
63+ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
64 ''
65 # Patch llvm-config to return correct library path based on --link-{shared,static}.
66 + stdenv.lib.optionalString (enableSharedLibraries) ''
···88 ++ stdenv.lib.optionals (isDarwin) [
89 "-DLLVM_ENABLE_LIBCXX=ON"
90 "-DCAN_TARGET_i386=false"
091 ];
9293 postBuild = ''
···8 sha256 = "0llraqw86jmw4vzv7inskp3xxm2gc64my08iwq5mzncgfdbfza4f";
9 };
1011- infinality_patch =
12- let subvers = "1";
13- in fetchurl {
14- url = http://www.infinality.net/fedora/linux/zips/fontconfig-infinality-1-20130104_1.tar.bz2;
15- sha256 = "1fm5xx0mx2243jrq5rxk4v0ajw2nawpj23399h710bx6hd1rviq7";
16- }
17- ;
1819 outputs = [ "bin" "dev" "lib" "out" ]; # $out contains all the config
20···4344 # Don't try to write to /var/cache/fontconfig at install time.
45 installFlags = "sysconfdir=$(out)/etc fc_cachedir=$(TMPDIR)/dummy RUN_FC_CACHE_TEST=false";
46-47- postInstall = ''
48- cd "$out/etc/fonts" && tar xvf ${infinality_patch}
49- '';
5051 passthru = {
52 # Empty for backward compatibility, there was no versioning before 2.11
···8 sha256 = "0llraqw86jmw4vzv7inskp3xxm2gc64my08iwq5mzncgfdbfza4f";
9 };
1011+ patches = [
12+ # FreeType 2.7 prefixes PCF font family names with the foundry name.
13+ # The output of fc-list and fc-query change which breaks the tests.
14+ ./test-pcf-family-names-freetype-2.7.patch
15+ ];
001617 outputs = [ "bin" "dev" "lib" "out" ]; # $out contains all the config
18···4142 # Don't try to write to /var/cache/fontconfig at install time.
43 installFlags = "sysconfdir=$(out)/etc fc_cachedir=$(TMPDIR)/dummy RUN_FC_CACHE_TEST=false";
00004445 passthru = {
46 # Empty for backward compatibility, there was no versioning before 2.11
···33 url = "https://cgit.freedesktop.org/fontconfig/patch/?id=1ab5258f7c";
34 sha256 = "0x2a4qx51j3gqcp1kp4lisdzmhrkw1zw0r851d82ksgjlc0vkbaz";
35 })
36+37+ # FreeType 2.7 prefixes PCF font family names with the foundry name.
38+ # The output of fc-list and fc-query change which breaks the tests.
39+ ./test-pcf-family-names-freetype-2.7.patch
40 ];
41 # additionally required for the glibc-2.25 patch; avoid requiring gperf
42 postPatch = ''
···1-{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, which, zlib, bzip2, libpng, gnumake
2-, glib /* passthru only */
0034- # FreeType supports sub-pixel rendering. This is patented by
5- # Microsoft, so it is disabled by default. This option allows it to
6- # be enabled. See http://www.freetype.org/patents.html.
7-, useEncumberedCode ? true
8-, useInfinality ? true
9}:
1011-assert useInfinality -> useEncumberedCode;
1213-let
14- version = "2.6.5";
1516- infinality = fetchFromGitHub {
17- owner = "archfan";
18- repo = "infinality_bundle";
19- rev = "5c0949a477bf43d2ac4e57b4fc39bcc3331002ee";
20- sha256 = "17389aqm6rlxl4b5mv1fx4b22x2v2n60hfhixfxqxpd8ialsdi6l";
0000000000021 };
22-23-in
24-with { inherit (stdenv.lib) optional optionals optionalString; };
25-stdenv.mkDerivation rec {
26- name = "freetype-${version}";
2728 src = fetchurl {
29 url = "mirror://savannah/freetype/${name}.tar.bz2";
30- sha256 = "1w5c87s4rpx9af5b3mk5cjd1yny3c4dq5p9iv3ixb3vr00a6w2p2";
31 };
3233- patches = [
34- # Patch for validation of OpenType and GX/AAT tables.
35- (fetchurl {
36- name = "freetype-2.2.1-enable-valid.patch";
37- url = "http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/plain/freetype-2.2.1-enable-valid.patch?id=9a81147af83b1166a5f301e379f85927cc610990";
38- sha256 = "0zkgqhws2s0j8ywksclf391iijhidb1a406zszd7xbdjn28kmj2l";
39- })
40- ] ++ optionals (!useInfinality && useEncumberedCode) [
41- # Patch to enable subpixel rendering.
42- # See https://www.freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html.
43- (fetchurl {
44- name = "freetype-2.3.0-enable-spr.patch";
45- url = http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/plain/freetype-2.3.0-enable-spr.patch?id=9a81147af83b1166a5f301e379f85927cc610990;
46- sha256 = "13ni9n5q3nla38wjmxd4f8cy29gp62kjx2l6y6nqhdyiqp8fz8nd";
47- })
48- ];
49-50- prePatch = optionalString useInfinality ''
51- patches="$patches $(ls ${infinality}/*_freetype2-iu/*-infinality-*.patch)"
52- '';
53-54- outputs = [ "out" "dev" ];
55-56 propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype
57 # dependence on harfbuzz is looser than the reverse dependence
58 nativeBuildInputs = [ pkgconfig which ]
59 # FreeType requires GNU Make, which is not part of stdenv on FreeBSD.
60 ++ optional (!stdenv.isLinux) gnumake;
0000006162 configureFlags = [ "--disable-static" "--bindir=$(dev)/bin" ];
63···75 # of gcc. I think it's due to the unwrapped gcc being in the PATH. I don't
76 # know why it's on the PATH.
77 configureFlags = "--disable-static CC_BUILD=gcc";
78- };
79-80- meta = with stdenv.lib; {
81- description = "A font rendering engine";
82- longDescription = ''
83- FreeType is a portable and efficient library for rendering fonts. It
84- supports TrueType, Type 1, CFF fonts, and WOFF, PCF, FNT, BDF and PFR
85- fonts. It has a bytecode interpreter and has an automatic hinter called
86- autofit which can be used instead of hinting instructions included in
87- fonts.
88- '';
89- homepage = https://www.freetype.org/;
90- license = licenses.gpl2Plus; # or the FreeType License (BSD + advertising clause)
91- #ToDo: encumbered = useEncumberedCode;
92- platforms = platforms.all;
93 };
94}
···1+{
2+ stdenv, lib, fetchurl, copyPathsToStore,
3+ pkgconfig, which,
4+ zlib, bzip2, libpng, gnumake, glib,
56+ # FreeType supports LCD filtering (colloquially referred to as sub-pixel rendering).
7+ # LCD filtering is also known as ClearType and covered by several Microsoft patents.
8+ # This option allows it to be disabled. See http://www.freetype.org/patents.html.
9+ useEncumberedCode ? true,
010}:
1112+with { inherit (stdenv.lib) optional optionals optionalString; };
1314+let version = "2.7.1"; name = "freetype-" + version; in
01516+stdenv.mkDerivation {
17+ inherit name;
18+19+ meta = with stdenv.lib; {
20+ description = "A font rendering engine";
21+ longDescription = ''
22+ FreeType is a portable and efficient library for rendering fonts. It
23+ supports TrueType, Type 1, CFF fonts, and WOFF, PCF, FNT, BDF and PFR
24+ fonts. It has a bytecode interpreter and has an automatic hinter called
25+ autofit which can be used instead of hinting instructions included in
26+ fonts.
27+ '';
28+ homepage = https://www.freetype.org/;
29+ license = licenses.gpl2Plus; # or the FreeType License (BSD + advertising clause)
30+ platforms = platforms.all;
31+ maintainers = with maintainers; [ ttuegel ];
32 };
000003334 src = fetchurl {
35 url = "mirror://savannah/freetype/${name}.tar.bz2";
36+ sha256 = "121gm15ayfg3rglby8ifh8384mcjb9dhmx9j40zl7yszw72b4frs";
37 };
380000000000000000000000039 propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype
40 # dependence on harfbuzz is looser than the reverse dependence
41 nativeBuildInputs = [ pkgconfig which ]
42 # FreeType requires GNU Make, which is not part of stdenv on FreeBSD.
43 ++ optional (!stdenv.isLinux) gnumake;
44+45+ patches =
46+ [ ./enable-table-validation.patch ]
47+ ++ optional useEncumberedCode ./enable-subpixel-rendering.patch;
48+49+ outputs = [ "out" "dev" ];
5051 configureFlags = [ "--disable-static" "--bindir=$(dev)/bin" ];
52···64 # of gcc. I think it's due to the unwrapped gcc being in the PATH. I don't
65 # know why it's on the PATH.
66 configureFlags = "--disable-static CC_BUILD=gcc";
00000000000000067 };
68}
···23stdenv.mkDerivation rec {
4 name = "jemalloc-${version}";
5- version = "4.3.1";
67 src = fetchurl {
8 url = "https://github.com/jemalloc/jemalloc/releases/download/${version}/${name}.tar.bz2";
9- sha256 = "12r71i8nm3vwz21fc16rwbb0pwcg5s05n1qg3rwl2s85v0x1ifzp";
10 };
1112 # By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which
13 # then stops downstream builds (mariadb in particular) from detecting it. This
14 # option should remove the prefix and give us a working jemalloc.
15 configureFlags = stdenv.lib.optional stdenv.isDarwin "--with-jemalloc-prefix=";
0001617 meta = with stdenv.lib; {
18 homepage = http://jemalloc.net;
···23stdenv.mkDerivation rec {
4 name = "jemalloc-${version}";
5+ version = "4.5.0";
67 src = fetchurl {
8 url = "https://github.com/jemalloc/jemalloc/releases/download/${version}/${name}.tar.bz2";
9+ sha256 = "9409d85664b4f135b77518b0b118c549009dc10f6cba14557d170476611f6780";
10 };
1112 # By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which
13 # then stops downstream builds (mariadb in particular) from detecting it. This
14 # option should remove the prefix and give us a working jemalloc.
15 configureFlags = stdenv.lib.optional stdenv.isDarwin "--with-jemalloc-prefix=";
16+17+ doCheck = true;
18+1920 meta = with stdenv.lib; {
21 homepage = http://jemalloc.net;
···28 sha256 = "1s1hyndva0yp62xy96pcp4anzrvw6cl0abjajim17sbmdp00fwhw";
29 };
3031- patches = [ ];
32-33 outputs = [ "bin" "dev" "out" "man" "devdoc" ];
3435 enableParallelBuilding = true;
···57 '';
5859 configureFlags = [
60- # OS X does not have a default system bundle, so we assume cacerts is installed in the default nix-env profile
61- # This sucks. We should probably just include the latest cacerts in the darwin bootstrap.
62- "--with-ca-bundle=${if stdenv.isDarwin then "/nix/var/nix/profiles/default" else ""}/etc/ssl/certs/ca-${if stdenv.isDarwin then "bundle" else "certificates"}.crt"
63 "--disable-manual"
64 ( if sslSupport then "--with-ssl=${openssl.dev}" else "--without-ssl" )
65 ( if gnutlsSupport then "--with-gnutls=${gnutls.dev}" else "--without-gnutls" )