diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-04-01 15:50:50 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-04-01 15:50:50 +0000 |
commit | 75eafe97f7df0d653bec67f3962214d7c357831f (patch) | |
tree | 09f2cc901e0e637876cbb78d192dfe2fcfef8156 /nixpkgs/pkgs/development/libraries/glibc/common.nix | |
parent | a53b121bf4331497da63df3b1b7f1a7897dad146 (diff) | |
parent | a2e06fc3423c4be53181b15c28dfbe0bcf67dd73 (diff) | |
download | nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.gz nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.bz2 nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.lz nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.xz nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.zst nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.zip |
Merge commit 'a2e06fc3423c4be53181b15c28dfbe0bcf67dd73'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/glibc/common.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/glibc/common.nix | 50 |
1 files changed, 32 insertions, 18 deletions
diff --git a/nixpkgs/pkgs/development/libraries/glibc/common.nix b/nixpkgs/pkgs/development/libraries/glibc/common.nix index 32be2205bcc1..50ee5097d1b8 100644 --- a/nixpkgs/pkgs/development/libraries/glibc/common.nix +++ b/nixpkgs/pkgs/development/libraries/glibc/common.nix @@ -19,10 +19,12 @@ { stdenv, lib , buildPackages -, fetchurl, fetchpatch +, fetchurl , linuxHeaders ? null , gd ? null, libpng ? null +, libidn2 , bison +, python3Minimal }: { name @@ -34,9 +36,9 @@ } @ args: let - version = "2.27"; + version = "2.30"; patchSuffix = ""; - sha256 = "0wpwq7gsm7sd6ysidv0z575ckqdg13cr2njyfgrbgh4f65adwwji"; + sha256 = "1bxqpg91d02qnaz837a5kamm0f43pr1il4r9pknygywsar713i72"; in assert withLinuxHeaders -> linuxHeaders != null; @@ -87,31 +89,30 @@ stdenv.mkDerivation ({ less linux-*?/arch/x86/kernel/syscall_table_32.S */ ./allow-kernel-2.6.32.patch + + /* Provide a fallback for missing prlimit64 syscall on RHEL 6 -like + kernels. + + This patch is maintained by @veprbl. If it gives you trouble, feel + free to ping me, I'd be happy to help. + */ + (fetchurl { + url = "https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/patches/glibc-reinstate-prlimit64-fallback.patch?id=eab07e78b691ae7866267fc04d31c7c3ad6b0eeb"; + sha256 = "091bk3kyrx1gc380gryrxjzgcmh1ajcj8s2rjhp2d2yzd5mpd5ps"; + }) + /* Provide utf-8 locales by default, so we can use it in stdenv without depending on our large locale-archive. */ (fetchurl { url = "https://salsa.debian.org/glibc-team/glibc/raw/49767c9f7de4828220b691b29de0baf60d8a54ec/debian/patches/localedata/locale-C.diff"; sha256 = "0irj60hs2i91ilwg5w7sqrxb695c93xg0ik7yhhq9irprd7fidn4"; }) - - # https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5460617d1567657621107d895ee2dd83bc1f88f2 - ./CVE-2018-11236.patch - # https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f51c8367685dc888a02f7304c729ed5277904aff - ./CVE-2018-11237.patch ] ++ lib.optionals stdenv.isx86_64 [ ./fix-x64-abi.patch ./2.27-CVE-2019-19126.patch ] ++ lib.optional stdenv.hostPlatform.isMusl ./fix-rpc-types-musl-conflicts.patch - ++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch - - # Remove after upgrading to glibc 2.28+ - ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform || stdenv.hostPlatform.isMusl) (fetchpatch { - url = "https://sourceware.org/git/?p=glibc.git;a=patch;h=780684eb04298977bc411ebca1eadeeba4877833"; - name = "correct-pwent-parsing-issue-and-resulting-build.patch"; - sha256 = "08fja894vzaj8phwfhsfik6jj2pbji7kypy3q8pgxvsd508zdv1q"; - excludes = [ "ChangeLog" ]; - }); + ++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch; postPatch = '' @@ -122,6 +123,19 @@ stdenv.mkDerivation ({ # nscd needs libgcc, and we don't want it dynamically linked # because we don't want it to depend on bootstrap-tools libs. echo "LDFLAGS-nscd += -static-libgcc" >> nscd/Makefile + '' + # FIXME: find a solution for infinite recursion in cross builds. + # For now it's hopefully acceptable that IDN from libc doesn't reliably work. + + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' + + # Ensure that libidn2 is found. + patch -p 1 <<EOF + --- a/inet/idna.c + +++ b/inet/idna.c + @@ -25,1 +25,1 @@ + -#define LIBIDN2_SONAME "libidn2.so.0" + +#define LIBIDN2_SONAME "${lib.getLib libidn2}/lib/libidn2.so.0" + EOF ''; configureFlags = @@ -153,7 +167,7 @@ stdenv.mkDerivation ({ outputs = [ "out" "bin" "dev" "static" ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ bison ]; + nativeBuildInputs = [ bison python3Minimal ]; buildInputs = [ linuxHeaders ] ++ lib.optionals withGd [ gd libpng ]; # Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to |