diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-06-11 17:45:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-11 17:45:12 -0400 |
commit | 288eb1485b88807d47a988fc86bf44eab50fb974 (patch) | |
tree | 023c9f2c06527c7d0340e86f4c09ca42739d64d3 /pkgs/servers/sql | |
parent | c51d8d97b07cf617d78bf07ef2a308e00a61947e (diff) | |
parent | 70db1185b72a9da50d5e7b373f0bc44e29e9b7cc (diff) | |
download | nixlib-288eb1485b88807d47a988fc86bf44eab50fb974.tar nixlib-288eb1485b88807d47a988fc86bf44eab50fb974.tar.gz nixlib-288eb1485b88807d47a988fc86bf44eab50fb974.tar.bz2 nixlib-288eb1485b88807d47a988fc86bf44eab50fb974.tar.lz nixlib-288eb1485b88807d47a988fc86bf44eab50fb974.tar.xz nixlib-288eb1485b88807d47a988fc86bf44eab50fb974.tar.zst nixlib-288eb1485b88807d47a988fc86bf44eab50fb974.zip |
Merge pull request #62900 from thefloweringash/mysql55-clang6
mysql55: fix build under clang 6 (and newer)
Diffstat (limited to 'pkgs/servers/sql')
-rw-r--r-- | pkgs/servers/sql/mysql/5.5.x.nix | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/pkgs/servers/sql/mysql/5.5.x.nix b/pkgs/servers/sql/mysql/5.5.x.nix index d5fbe0bf2494..e089640a5b6f 100644 --- a/pkgs/servers/sql/mysql/5.5.x.nix +++ b/pkgs/servers/sql/mysql/5.5.x.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, cmake, bison, ncurses, openssl, readline, zlib, perl -, cctools, CoreServices }: +{ stdenv, fetchpatch, fetchurl, cmake, bison, ncurses, openssl +, readline, zlib, perl, cctools, CoreServices }: # Note: zlib is not required; MySQL can use an internal zlib. @@ -13,10 +13,17 @@ self = stdenv.mkDerivation rec { sha256 = "1mwrzwk9ap09s430fpdkyhvx5j2syd3xj2hyfzvanjphq4xqbrxi"; }; - patches = if stdenv.isCygwin then [ - ./5.5.17-cygwin.patch - ./5.5.17-export-symbols.patch - ] else null; + patches = + # Minor type error that is a build failure as of clang 6. + stdenv.lib.optional stdenv.cc.isClang (fetchpatch { + url = "https://svn.freebsd.org/ports/head/databases/mysql55-server/files/patch-sql_sql_partition.cc?rev=469888"; + extraPrefix = ""; + sha256 = "09sya27z3ir3xy5mrv3x68hm274594y381n0i6r5s627x71jyszf"; + }) ++ + stdenv.lib.optionals stdenv.isCygwin [ + ./5.5.17-cygwin.patch + ./5.5.17-export-symbols.patch + ]; preConfigure = stdenv.lib.optional stdenv.isDarwin '' ln -s /bin/ps $TMPDIR/ps @@ -51,7 +58,10 @@ self = stdenv.mkDerivation rec { "-DINSTALL_SQLBENCHDIR=" ]; - NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; # since gcc-7 + NIX_CFLAGS_COMPILE = + stdenv.lib.optionals stdenv.cc.isGNU [ "-fpermissive" ] # since gcc-7 + ++ stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-c++11-narrowing" ]; # since clang 6 + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s"; prePatch = '' @@ -78,6 +88,6 @@ self = stdenv.mkDerivation rec { artistic1 bsd0 bsd2 bsd3 bsdOriginal gpl2 lgpl2 lgpl21 mit publicDomain licenses.zlib ]; - broken = stdenv.isAarch64 && stdenv.isDarwin; + broken = stdenv.isAarch64; }; }; in self |