diff options
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/glibc/common.nix | 12 | ||||
-rw-r--r-- | pkgs/development/libraries/libmicrodns/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/libressl/default.nix | 8 | ||||
-rw-r--r-- | pkgs/development/libraries/libwebsockets/default.nix | 63 |
4 files changed, 60 insertions, 27 deletions
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 33c8e5076da..8e8e445f017 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -19,7 +19,7 @@ { stdenv, lib , buildPackages -, fetchurl ? null +, fetchurl, fetchpatch , linuxHeaders ? null , gd ? null, libpng ? null , bison @@ -95,7 +95,15 @@ stdenv.mkDerivation ({ ] ++ lib.optional stdenv.isx86_64 ./fix-x64-abi.patch ++ lib.optional stdenv.hostPlatform.isMusl ./fix-rpc-types-musl-conflicts.patch - ++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch; + ++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch + + # Remove after upgrading to glibc 2.28+ + ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) (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" ]; + }); postPatch = '' diff --git a/pkgs/development/libraries/libmicrodns/default.nix b/pkgs/development/libraries/libmicrodns/default.nix index 3c55a6b036c..41d81f1f176 100644 --- a/pkgs/development/libraries/libmicrodns/default.nix +++ b/pkgs/development/libraries/libmicrodns/default.nix @@ -5,14 +5,14 @@ }: stdenv.mkDerivation rec { - version = "0.0.10"; + version = "0.1.0"; pname = "libmicrodns"; src = fetchFromGitHub { owner = "videolabs"; repo = pname; rev = version; - sha256 = "1xvl9k49ng35wbsqmnjnyqvkyjf8dcq2ywsq3jp3wh0rgmxhq2fh"; + sha256 = "1pmf461zn35spbpbls1ih68ki7f8g8xjwhzr2csy63nnyq2k9jji"; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/libressl/default.nix b/pkgs/development/libraries/libressl/default.nix index 71b8d2bb20e..4bfa6cd0b8e 100644 --- a/pkgs/development/libraries/libressl/default.nix +++ b/pkgs/development/libraries/libressl/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, lib, cmake }: +{ stdenv, fetchurl, lib, cmake, cacert }: let @@ -31,6 +31,12 @@ let rm configure ''; + # Since 2.9.x the default location can't be configured from the build using + # DEFAULT_CA_FILE anymore, instead we have to patch the default value. + postPatch = lib.optionalString (lib.versionAtLeast version "2.9.2") '' + substituteInPlace ./tls/tls_config.c --replace '"/etc/ssl/cert.pem"' '"${cacert}/etc/ssl/certs/ca-bundle.crt"' + ''; + enableParallelBuilding = true; outputs = [ "bin" "dev" "out" "man" "nc" ]; diff --git a/pkgs/development/libraries/libwebsockets/default.nix b/pkgs/development/libraries/libwebsockets/default.nix index a297bf61f78..732a529c21f 100644 --- a/pkgs/development/libraries/libwebsockets/default.nix +++ b/pkgs/development/libraries/libwebsockets/default.nix @@ -1,28 +1,47 @@ { fetchFromGitHub, stdenv, cmake, openssl, zlib, libuv }: -stdenv.mkDerivation rec { - pname = "libwebsockets"; - version = "3.2.0"; - - src = fetchFromGitHub { - owner = "warmcat"; - repo = "libwebsockets"; - rev = "v${version}"; - sha256 = "0ac5755h3w1pl6cznqbvg63dwkqy544fqlhvqyp7s11hgs7jx6l8"; +let + generic = { version, sha256 }: stdenv.mkDerivation rec { + pname = "libwebsockets"; + inherit version; + + src = fetchFromGitHub { + owner = "warmcat"; + repo = "libwebsockets"; + rev = "v${version}"; + inherit sha256; + }; + + buildInputs = [ openssl zlib libuv ]; + + nativeBuildInputs = [ cmake ]; + + cmakeFlags = [ "-DLWS_WITH_PLUGINS=ON" ]; + + meta = with stdenv.lib; { + description = "Light, portable C library for websockets"; + longDescription = '' + Libwebsockets is a lightweight pure C library built to + use minimal CPU and memory resources, and provide fast + throughput in both directions. + ''; + homepage = "https://libwebsockets.org/"; + license = licenses.lgpl21; + platforms = platforms.all; + }; }; - buildInputs = [ cmake openssl zlib libuv ]; - cmakeFlags = [ "-DLWS_WITH_PLUGINS=ON" ]; - - meta = { - description = "Light, portable C library for websockets"; - longDescription = '' - Libwebsockets is a lightweight pure C library built to - use minimal CPU and memory resources, and provide fast - throughput in both directions. - ''; - homepage = https://github.com/warmcat/libwebsockets; - license = stdenv.lib.licenses.lgpl21; - platforms = stdenv.lib.platforms.all; +in +rec { + libwebsockets_3_1 = generic { + sha256 = "1w1wz6snf3cmcpa3f4dci2nz9za2f5rrylxl109id7bcb36xhbdl"; + version = "3.1.0"; }; + + libwebsockets_3_2 = generic { + version = "3.2.0"; + sha256 = "0ac5755h3w1pl6cznqbvg63dwkqy544fqlhvqyp7s11hgs7jx6l8"; + }; + + libwebsockets = libwebsockets_3_2; } |