Merge staging into staging-next

This commit is contained in:
Frederik Rietdijk 2020-01-03 13:18:26 +01:00
commit 68b6fea67c
32 changed files with 248 additions and 127 deletions

View File

@ -1,12 +1,12 @@
{ lib, fetchFromGitHub }:
rec {
version = "8.1.2407";
version = "8.2.0013";
src = fetchFromGitHub {
owner = "vim";
repo = "vim";
rev = "v${version}";
sha256 = "1h23lncm8py0ip8p61y8hivmnd8fzf8xpwpkd73d3a3fpiyd2yx8";
sha256 = "00sc9zdjdww6f3svwf0nxpx8q2zp1n1r978h7ijapgvn2ysx2z1f";
};
enableParallelBuilding = true;
@ -24,7 +24,7 @@ rec {
description = "The most popular clone of the VI editor";
homepage = http://www.vim.org;
license = licenses.vim;
maintainers = with maintainers; [ lovek323 ];
maintainers = with maintainers; [ lovek323 equirosa ];
platforms = platforms.unix;
};
}

View File

@ -9,11 +9,11 @@ let
pname = "clang";
inherit version;
src = fetch "cfe" "0426ma80i41qsgzm1qdz81mjskck426diygxi2k5vji2gkpixa3v";
src = fetch "clang" "0ls2h3iv4finqyflyhry21qhc9cm9ga7g1zq21020p065qmm2y2p";
unpackPhase = ''
unpackFile $src
mv cfe-${version}* clang
mv clang-${version}* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
mv clang-tools-extra-* $sourceRoot/tools/extra

View File

@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
pname = "compiler-rt";
inherit version;
src = fetch pname "03ni43lbkp63lr3p6sc94dphqmvnz5av5mml0xmk930xvnbcvr2n";
src = fetch pname "0xwh79g3zggdabxgnd0bphry75asm1qz7mv3hcqihqwqr6aspgy2";
nativeBuildInputs = [ cmake python llvm ];
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;

View File

@ -5,15 +5,15 @@
}:
let
release_version = "9.0.0";
release_version = "9.0.1";
version = release_version; # differentiating these is important for rc's
fetch = name: sha256: fetchurl {
url = "https://releases.llvm.org/${release_version}/${name}-${version}.src.tar.xz";
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz";
inherit sha256;
};
clang-tools-extra_src = fetch "clang-tools-extra" "045cldmcfd8s33wyjlviifgpnw52yqicd6v4ysvdg4i96p78c77a";
clang-tools-extra_src = fetch "clang-tools-extra" "01vgzd4k1q93nfs8gyl83mjlc4x0qsgfqw32lacbjzdxg0mdfvxj";
tools = stdenv.lib.makeExtensible (tools: let
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; });

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation {
pname = "libc++";
inherit version;
src = fetch "libcxx" "136j3v7il9aq8wyp48klx6sifnl5asj4lf5c8yx08cjx5fbn4h9w";
src = fetch "libcxx" "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089";
postUnpack = ''
unpackFile ${libcxxabi.src}

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation {
pname = "libc++abi";
inherit version;
src = fetch "libcxxabi" "1s9haplqv8ashlsdx2psxiqxh50gqk2jp2vz5yn0djb56mw42l37";
src = fetch "libcxxabi" "1b4aiaa8cirx52vk2p5kfk57qmbqf1ipb4nqnjhdgqps9jm7iyg8";
nativeBuildInputs = [ cmake ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;

View File

@ -4,7 +4,7 @@ stdenv.mkDerivation rec {
pname = "libunwind";
inherit version;
src = fetch pname "1chd1nz4bscrs6qa7p8sqgk5df86ll0frv0f451vhks2w44qsslp";
src = fetch pname "1wb02ha3gl6p0a321hwpll74pz5qvjr11xmjqx62g288f1m10njk";
nativeBuildInputs = [ cmake ];

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
pname = "lld";
inherit version;
src = fetch pname "14cgd34gr826qpxzhrkbz6qgm8ymds0hrsiznwzp42ax4f5p9iii";
src = fetch pname "10hckfxpapfnh6y9apjiya2jpw9nmbbmh8ayijx89mrg7snjn9l6";
nativeBuildInputs = [ cmake ];
buildInputs = [ llvm libxml2 ];

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
pname = "lldb";
inherit version;
src = fetch pname "1507dl0xw03nppxpz2xsq4s30jdbkplx4w14za54ngqm3xm2yk0y";
src = fetch pname "02gb3fbz09kyw8n71218v5v77ip559x3gqbcp8y3w6n3jpbryywa";
patches = [ ./lldb-procfs.patch ];

View File

@ -31,8 +31,8 @@ in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
src = fetch pname "117ymdz1by2nkfq1c2p9m4050dp848kbjbiv6nsfj8hzy9f5d86n";
polly_src = fetch "polly" "0cyl2gsibf1dhqvkyw1qb0f8q58ib6cihzyh4f9kj9g77ll95ym4";
src = fetch pname "16hwp3qa54c3a3v7h8nlw0fh5criqh0hlr1skybyk0cz70gyx880";
polly_src = fetch "polly" "1kqg0isv0kicnylrdp5iajlgd6alc0zx1l3cxc9hs8r3z6fwcjls";
unpackPhase = ''
unpackFile $src

View File

@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
pname = "openmp";
inherit version;
src = fetch pname "0nrv9np134b7c483jnq786spy3hbpj11d7g21g67cqq66c8ynycr";
src = fetch pname "1knafnpp0f7hylx8q20lkd6g1sf0flly572dayc5d5kghh7hd52w";
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];

View File

@ -23,10 +23,18 @@ stdenv.mkDerivation rec {
configureFlagsArray+=("--with-installbuilddir=$dev/share/build")
'';
configureFlags =
configureFlags = stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
"ac_cv_file__dev_zero=yes"
"ac_cv_func_setpgrp_void=0"
"apr_cv_process_shared_works=1"
"apr_cv_tcp_nodelay_with_cork=1"
] ++ stdenv.lib.optionals (stdenv.hostPlatform.system == "i686-cygwin") [
# Including the Windows headers breaks unistd.h.
# Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2
stdenv.lib.optional (stdenv.hostPlatform.system == "i686-cygwin") "ac_cv_header_windows_h=no";
"ac_cv_header_windows_h=no"
];
CPPFLAGS=stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-DAPR_IOVEC_DEFINED";
enableParallelBuilding = true;

View File

@ -1,6 +1,7 @@
{ stdenv, fetchurl, fetchFromGitHub, fixDarwinDylibNames, autoconf, boost
{ stdenv, lib, fetchurl, fetchFromGitHub, fixDarwinDylibNames, autoconf, boost
, brotli, cmake, double-conversion, flatbuffers, gflags, glog, gtest, lz4, perl
, python, rapidjson, snappy, thrift, uriparser, which, zlib, zstd }:
, python, rapidjson, snappy, thrift, uriparser, which, zlib, zstd
, enableShared ? true }:
let
parquet-testing = fetchFromGitHub {
@ -34,13 +35,16 @@ in stdenv.mkDerivation rec {
patches = [
# patch to fix python-test
./darwin.patch
] ++ lib.optionals (!enableShared) [
# The shared jemalloc lib is unused and breaks in static mode due to missing -fpic.
./jemalloc-disable-shared.patch
];
nativeBuildInputs = [
cmake
autoconf # for vendored jemalloc
flatbuffers
] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
buildInputs = [
boost
brotli
@ -71,21 +75,26 @@ in stdenv.mkDerivation rec {
"-DARROW_DEPENDENCY_SOURCE=SYSTEM"
"-DARROW_PARQUET=ON"
"-DARROW_PLASMA=ON"
"-DARROW_PYTHON=ON"
# Disable Python for static mode because openblas is currently broken there.
"-DARROW_PYTHON=${if enableShared then "ON" else "OFF"}"
"-Duriparser_SOURCE=SYSTEM"
] ++ stdenv.lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF";
] ++ lib.optionals (!enableShared) [
"-DARROW_BUILD_SHARED=OFF"
"-DARROW_TEST_LINKAGE=static"
"-DOPENSSL_USE_STATIC_LIBS=ON"
] ++ lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF";
doInstallCheck = true;
PARQUET_TEST_DATA =
if doInstallCheck then "${parquet-testing}/data" else null;
installCheckInputs = [ perl which ];
installCheckPhase = (stdenv.lib.optionalString stdenv.isDarwin ''
installCheckPhase = (lib.optionalString stdenv.isDarwin ''
for f in release/*test{,s}; do
install_name_tool -add_rpath "$out"/lib "$f"
done
'')
+ (let
excludedTests = stdenv.lib.optionals stdenv.isDarwin [
excludedTests = lib.optionals stdenv.isDarwin [
# Some plasma tests need to be patched to use a shorter AF_UNIX socket
# path on Darwin. See https://github.com/NixOS/nix/pull/1085
"plasma-external-store-tests"
@ -99,8 +108,8 @@ in stdenv.mkDerivation rec {
meta = {
description = "A cross-language development platform for in-memory data";
homepage = "https://arrow.apache.org/";
license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.unix;
maintainers = with stdenv.lib.maintainers; [ tobim veprbl ];
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ tobim veprbl ];
};
}

View File

@ -0,0 +1,11 @@
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -1428,6 +1428,7 @@ if(ARROW_JEMALLOC)
"--with-jemalloc-prefix=je_arrow_"
"--with-private-namespace=je_arrow_private_"
"--without-export"
+ "--disable-shared"
# Don't override operator new()
"--disable-cxx" "--disable-libdl"
# See https://github.com/jemalloc/jemalloc/issues/1237

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl, openssl, openldap, kerberos, db, gettext
, pam, fixDarwinDylibNames, autoreconfHook, enableLdap ? false
, buildPackages, pruneLibtoolFiles }:
, buildPackages, pruneLibtoolFiles, fetchpatch }:
with stdenv.lib;
stdenv.mkDerivation rec {
@ -27,6 +27,11 @@ stdenv.mkDerivation rec {
patches = [
./missing-size_t.patch # https://bugzilla.redhat.com/show_bug.cgi?id=906519
./cyrus-sasl-ac-try-run-fix.patch
(fetchpatch {
name = "CVE-2019-19906.patch";
url = "https://sources.debian.org/data/main/c/cyrus-sasl2/2.1.27+dfsg-1+deb10u1/debian/patches/0021-CVE-2019-19906.patch";
sha256 = "1n4c5wg7l9j8rlbvx8i605j5d39xmj5wm618k8acxl4fmglcmfls";
})
];
configureFlags = [

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, cmake }:
{ stdenv, lib, fetchFromGitHub, cmake, static ? false }:
stdenv.mkDerivation rec {
pname = "double-conversion";
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ];
# Case sensitivity issue
preConfigure = lib.optionalString stdenv.isDarwin ''
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "Binary-decimal and decimal-binary routines for IEEE doubles";
homepage = https://github.com/google/double-conversion;
homepage = "https://github.com/google/double-conversion";
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [ abbradar ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake }:
{ stdenv, fetchFromGitHub, cmake, enableShared ? true}:
stdenv.mkDerivation rec {
pname = "gflags";
@ -17,8 +17,8 @@ stdenv.mkDerivation rec {
preConfigure = "rm BUILD";
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
"-DBUILD_STATIC_LIBS=ON"
"-DGFLAGS_BUILD_SHARED_LIBS=${if enableShared then "ON" else "OFF"}"
"-DGFLAGS_BUILD_STATIC_LIBS=ON"
];
doCheck = false;

View File

@ -138,9 +138,6 @@ stdenv.mkDerivation rec {
patchShebangs tests/gen-casemap-txt.py
'';
LIBELF_CFLAGS = optional stdenv.isFreeBSD "-I${libelf}";
LIBELF_LIBS = optional stdenv.isFreeBSD "-L${libelf} -lelf";
DETERMINISTIC_BUILD = 1;
postInstall = ''

View File

@ -48,21 +48,21 @@ callPackage ./common.nix { inherit stdenv; } {
# limit rebuilds by only disabling pie w/musl
++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie";
NIX_CFLAGS_COMPILE =
if !stdenv.hostPlatform.isMusl
NIX_CFLAGS_COMPILE = stdenv.lib.concatStringsSep " "
(if !stdenv.hostPlatform.isMusl
# TODO: This (returning a string or `null`, instead of a list) is to
# not trigger a mass rebuild due to the introduction of the
# musl-specific flags below.
# At next change to non-musl glibc builds, remove this `then`
# and the above condition, instead keeping only the `else` below.
then (if withGd then gdCflags else null)
then (stdenv.lib.optionals withGd gdCflags)
else
(builtins.concatLists [
(stdenv.lib.optionals withGd gdCflags)
# Fix -Werror build failure when building glibc with musl with GCC >= 8, see:
# https://github.com/NixOS/nixpkgs/pull/68244#issuecomment-544307798
(stdenv.lib.optional stdenv.hostPlatform.isMusl "-Wno-error=attribute-alias")
]);
]));
# When building glibc from bootstrap-tools, we need libgcc_s at RPATH for
# any program we run, because the gcc will have been placed at a new

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, fetchpatch, autoreconfHook, perl }:
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, perl, static ? false }:
stdenv.mkDerivation rec {
pname = "glog";
@ -20,13 +20,15 @@ stdenv.mkDerivation rec {
})
];
nativeBuildInputs = [ autoreconfHook ];
nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ];
checkInputs = [ perl ];
doCheck = false; # fails with "Mangled symbols (28 out of 380) found in demangle.dm"
meta = with stdenv.lib; {
homepage = https://github.com/google/glog;
homepage = "https://github.com/google/glog";
license = licenses.bsd3;
description = "Library for application-level logging";
platforms = platforms.unix;

View File

@ -8,6 +8,7 @@
# See https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt
, target ? null
, enableStatic ? false
, enableShared ? true
}:
with stdenv.lib;
@ -60,7 +61,7 @@ let
TARGET = setTarget "ATHLON";
DYNAMIC_ARCH = true;
NO_AVX512 = true;
USE_OPENMP = true;
USE_OPENMP = !stdenv.hostPlatform.isMusl;
};
};
in
@ -115,6 +116,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
perl
which
];
depsBuildBuild = [
buildPackages.gfortran
buildPackages.stdenv.cc
];
@ -126,6 +130,7 @@ stdenv.mkDerivation rec {
NUM_THREADS = 64;
INTERFACE64 = blas64;
NO_STATIC = !enableStatic;
NO_SHARED = !enableShared;
CROSS = stdenv.hostPlatform != stdenv.buildPlatform;
HOSTCC = "cc";
# Makefile.system only checks defined status

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake }:
{ stdenv, fetchFromGitHub, cmake, static ? false }:
stdenv.mkDerivation rec {
pname = "snappy";
@ -17,7 +17,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_SKIP_BUILD_RPATH=OFF" ];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
];
postInstall = ''
substituteInPlace "$out"/lib/cmake/Snappy/SnappyTargets.cmake \
@ -29,7 +32,7 @@ stdenv.mkDerivation rec {
doCheck = true;
meta = with stdenv.lib; {
homepage = https://google.github.io/snappy/;
homepage = "https://google.github.io/snappy/";
license = licenses.bsd3;
description = "Compression/decompression library for very high speeds";
platforms = platforms.all;

View File

@ -1,6 +1,5 @@
{ stdenv, fetchurl, boost, zlib, libevent, openssl, python, pkgconfig, bison
, flex, twisted
}:
{ stdenv, fetchurl, boost, zlib, libevent, openssl, python, cmake, pkgconfig
, bison, flex, twisted, static ? false }:
stdenv.mkDerivation rec {
pname = "thrift";
@ -11,27 +10,36 @@ stdenv.mkDerivation rec {
sha256 = "0yai9c3bdsrkkjshgim7zk0i7malwfprg00l9774dbrkh2w4ilvs";
};
#enableParallelBuilding = true; problems on hydra
# Workaround to make the python wrapper not drop this package:
# pythonFull.buildEnv.override { extraLibs = [ thrift ]; }
pythonPath = [];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
boost zlib libevent openssl python bison flex twisted
];
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ boost zlib libevent openssl python bison flex ]
++ stdenv.lib.optional (!static) twisted;
preConfigure = "export PY_PREFIX=$out";
# TODO: package boost-test, so we can run the test suite. (Currently it fails
# to find libboost_unit_test_framework.a.)
configureFlags = [ "--enable-tests=no" ];
doCheck = false;
cmakeFlags = [
# FIXME: Fails to link in static mode with undefined reference to
# `boost::unit_test::unit_test_main(bool (*)(), int, char**)'
"-DBUILD_TESTING:BOOL=${if static then "OFF" else "ON"}"
] ++ stdenv.lib.optionals static [
"-DWITH_STATIC_LIB:BOOL=ON"
"-DOPENSSL_USE_STATIC_LIBS=ON"
];
doCheck = !static;
checkPhase = ''
runHook preCheck
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib ctest -E PythonTestSSLSocket
runHook postCheck
'';
enableParallelChecking = false;
meta = with stdenv.lib; {
description = "Library for scalable cross-language services";
homepage = http://thrift.apache.org/;
homepage = "http://thrift.apache.org/";
license = licenses.asl20;
platforms = platforms.linux ++ platforms.darwin;
maintainers = [ maintainers.bjornfor ];

View File

@ -1,4 +1,15 @@
{ lib, fetchPypi, python, buildPythonPackage, gfortran, pytest, blas, writeTextFile, isPyPy }:
{ lib
, fetchPypi
, python
, buildPythonPackage
, gfortran
, pytest
, blas
, writeTextFile
, isPyPy
, cython
, setuptoolsBuildHook
}:
let
blasImplementation = lib.nameFromURL blas.name "-";
@ -16,15 +27,16 @@ let
};
in buildPythonPackage rec {
pname = "numpy";
version = "1.17.4";
version = "1.18.0";
format = "pyproject.toml";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "f58913e9227400f1395c7b800503ebfdb0772f1c33ff8cb4d6451c06cabdf316";
sha256 = "a9d72d9abaf65628f0f31bbb573b7d9304e43b1e6bbae43149c17737a42764c4";
};
nativeBuildInputs = [ gfortran pytest ];
nativeBuildInputs = [ gfortran pytest cython setuptoolsBuildHook ];
buildInputs = [ blas ];
patches = lib.optionals python.hasDistutilsCxxPatch [

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "bison";
version = "3.4.2";
version = "3.5";
src = fetchurl {
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
sha256 = "1kzsb6fmmpq00l2s55hyb4dbsmz8f3a64ria6354wlbx6ypj4fgz";
sha256 = "1l8k2fcklwy0y57yidxvk5lbf0kb96ci3zffg2djivk8k05j0dhb";
};
nativeBuildInputs = [ m4 perl ] ++ stdenv.lib.optional stdenv.isSunOS help2man;

View File

@ -0,0 +1,36 @@
diff a/cmake/FindBrotliDec.cmake b/cmake/FindBrotliDec.cmake
--- a/cmake/FindBrotliDec.cmake
+++ b/cmake/FindBrotliDec.cmake
@@ -18,10 +18,10 @@ find_path(BROTLIDEC_INCLUDE_DIRS
HINTS ${PC_BROTLIDEC_INCLUDEDIR}
)
-find_library(BROTLIDEC_LIBRARIES
- NAMES brotlidec
- HINTS ${PC_BROTLIDEC_LIBDIR}
-)
+if(NOT BUILD_SHARED_LIBS)
+ set(_S "STATIC_")
+endif()
+set(BROTLIDEC_LIBRARIES ${PC_BROTLIDEC_${_S}LIBRARIES})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(BrotliDec
diff a/cmake/FindBrotliEnc.cmake b/cmake/FindBrotliEnc.cmake
--- a/cmake/FindBrotliEnc.cmake
+++ b/cmake/FindBrotliEnc.cmake
@@ -18,10 +18,10 @@ find_path(BROTLIENC_INCLUDE_DIRS
HINTS ${PC_BROTLIENC_INCLUDEDIR}
)
-find_library(BROTLIENC_LIBRARIES
- NAMES brotlienc
- HINTS ${PC_BROTLIENC_LIBDIR}
-)
+if(NOT BUILD_SHARED_LIBS)
+ set(_S "STATIC_")
+endif()
+set(BROTLIENC_LIBRARIES ${PC_BROTLIENC_${_S}LIBRARIES})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(BrotliEnc

View File

@ -1,4 +1,4 @@
{ brotli, cmake, fetchFromGitHub, stdenv }:
{ brotli, cmake, pkgconfig, fetchFromGitHub, stdenv, static ? false }:
stdenv.mkDerivation rec {
pname = "woff2";
@ -13,18 +13,24 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "lib" ];
nativeBuildInputs = [ cmake ];
# Need to explicitly link to brotlicommon
patches = stdenv.lib.optional static ./brotli-static.patch;
nativeBuildInputs = [ cmake pkgconfig ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ]
++ stdenv.lib.optional static "-DCMAKE_SKIP_RPATH:BOOL=TRUE";
propagatedBuildInputs = [ brotli ];
# without this binaries only get built if shared libs are disable
patchPhase = ''
postPatch = ''
# without this binaries only get built if shared libs are disable
sed 's@^if (NOT BUILD_SHARED_LIBS)$@if (TRUE)@g' -i CMakeLists.txt
'';
meta = with stdenv.lib; {
description = "Webfont compression reference code";
homepage = https://github.com/google/woff2;
homepage = "https://github.com/google/woff2";
license = licenses.mit;
maintainers = [ maintainers.hrdinka ];
platforms = platforms.unix;

View File

@ -36,10 +36,10 @@ in stdenv.mkDerivation {
# When updating, use https://github.com/systemd/systemd-stable tree, not the development one!
# Also fresh patches should be cherry-picked from that tree to our current one.
src = fetchFromGitHub {
owner = "NixOS";
owner = "nixos";
repo = "systemd";
rev = "491a247eff9b7ce1e5877f5f3431517c95f3222f";
sha256 = "1xqiahapg480m165glrwqbfmc1fxw5sacdlm933cwyi1q8x4537g";
rev = "d8853d39a28b9884e0acd3ae5732a1e7caaf08af";
sha256 = "1wqm51i2czbbb3nara11mnxzqng4na1l8fvz7qnbxcrjsqm7hz18";
};
outputs = [ "out" "lib" "man" "dev" ];
@ -263,6 +263,6 @@ in stdenv.mkDerivation {
license = licenses.lgpl21Plus;
platforms = platforms.linux;
priority = 10;
maintainers = with maintainers; [ eelco andir mic92 ];
maintainers = with maintainers; [ andir eelco flokli mic92 ];
};
}

View File

@ -1,7 +1,8 @@
{ stdenv, fetchFromGitHub, fetchpatch, gnugrep
{ stdenv, fetchFromGitHub, fetchpatch, cmake, gnugrep
, fixDarwinDylibNames
, file
, legacySupport ? false }:
, legacySupport ? false
, enableShared ? true }:
stdenv.mkDerivation rec {
pname = "zstd";
@ -14,56 +15,46 @@ stdenv.mkDerivation rec {
owner = "facebook";
};
nativeBuildInputs = [ cmake ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
patches = [
# All 3 from https://github.com/facebook/zstd/pull/1883
# From https://github.com/facebook/zstd/pull/1883
(fetchpatch {
url = "https://github.com/facebook/zstd/commit/106278e7e5fafaea3b7deb4147bdc8071562d2f0.diff";
sha256 = "13z7id1qbc05cv1rmak7c8xrchp7jh1i623bq5pwcihg57wzcyr8";
})
(fetchpatch {
url = "https://github.com/facebook/zstd/commit/0ede342acc2c26f87ae962fa88e158904d4198c4.diff";
sha256 = "12l5xbvnzkvr76mvl1ls767paqfwbd9q1pzq44ckacfpz4f6iaap";
excludes = [
# I think line endings are causing problems, or something like that
"programs/windres/generate_res.bat"
];
})
(fetchpatch {
url = "https://github.com/facebook/zstd/commit/10552eaffef84c011f67af0e04f0780b50a5ab26.diff";
sha256 = "1s27ravar3rn7q8abybp9733jhpsfcaci51k04da94ahahvxwiqw";
})
] # This I didn't upstream because if you use posix threads with MinGW it will
# work find, and I'm not sure how to write the condition.
++ stdenv.lib.optional stdenv.hostPlatform.isWindows ./mcfgthreads-no-pthread.patch;
nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
makeFlags = [
"ZSTD_LEGACY_SUPPORT=${if legacySupport then "1" else "0"}"
] ++ stdenv.lib.optional stdenv.hostPlatform.isWindows "OS=Windows";
cmakeFlags = [
"-DZSTD_BUILD_SHARED:BOOL=${if enableShared then "ON" else "OFF"}"
"-DZSTD_LEGACY_SUPPORT:BOOL=${if legacySupport then "ON" else "OFF"}"
"-DZSTD_BUILD_TESTS:BOOL=ON"
];
cmakeDir = "../build/cmake";
dontUseCmakeBuildDir = true;
preConfigure = ''
mkdir -p build_ && cd $_
'';
checkInputs = [ file ];
doCheck = true;
preCheck = ''
substituteInPlace tests/playTests.sh \
substituteInPlace ../tests/playTests.sh \
--replace 'MD5SUM="md5 -r"' 'MD5SUM="md5sum"'
'';
installFlags = [
"PREFIX=$(out)"
];
preInstall = ''
substituteInPlace programs/zstdgrep \
preInstall = stdenv.lib.optionalString enableShared ''
substituteInPlace ../programs/zstdgrep \
--replace ":-grep" ":-${gnugrep}/bin/grep" \
--replace ":-zstdcat" ":-$out/bin/zstdcat"
substituteInPlace programs/zstdless \
substituteInPlace ../programs/zstdless \
--replace "zstdcat" "$out/bin/zstdcat"
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "Zstandard real-time compression algorithm";
longDescription = ''

View File

@ -1,25 +1,17 @@
{ stdenv, fetchurl, fetchpatch, file, zlib, libgnurx }:
{ stdenv, fetchurl, file, zlib, libgnurx }:
stdenv.mkDerivation rec {
pname = "file";
version = "5.37";
version = "5.38";
src = fetchurl {
urls = [
"ftp://ftp.astron.com/pub/file/${pname}-${version}.tar.gz"
"https://distfiles.macports.org/file/${pname}-${version}.tar.gz"
];
sha256 = "0zz0p9bqnswfx0c16j8k62ivjq1m16x10xqv4hy9lcyxyxkkkhg9";
sha256 = "0d7s376b4xqymnrsjxi3nsv3f5v89pzfspzml2pcajdk5by2yg2r";
};
patches = [
(fetchpatch {
name = "CVE-2019-18218.patch";
url = "https://sources.debian.org/data/main/f/file/1:5.37-6/debian/patches/cherry-pick.FILE5_37-67-g46a8443f.limit-the-number-of-elements-in-a-vector-found-by-oss-fuzz.patch";
sha256 = "1i22y91yndc3n2p2ngczp1lwil8l05sp8ciicil74xrc5f91y6mj";
})
];
nativeBuildInputs = stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) file;
buildInputs = [ zlib ]
++ stdenv.lib.optional stdenv.hostPlatform.isWindows libgnurx;

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff, libiconv, makeWrapper, buildPackages }:
stdenv.mkDerivation rec {
name = "man-db-2.8.7";
name = "man-db-2.9.0";
src = fetchurl {
url = "mirror://savannah/man-db/${name}.tar.xz";
sha256 = "09mkpvwirv9kh2pqhfq90zl7pjdl63f4w4g1x6zhhp9hjswmpkdr";
sha256 = "0qg2sdn8mayya0ril484iz1r7hi46l68d2d80cr6lvc7x3csqjjx";
};
outputs = [ "out" "doc" ];

View File

@ -143,6 +143,9 @@ in {
static = true;
shared = false;
};
fmt = super.fmt.override {
enableShared = false;
};
gifsicle = super.gifsicle.override {
static = true;
};
@ -152,7 +155,10 @@ in {
optipng = super.optipng.override {
static = true;
};
openblas = super.openblas.override { enableStatic = true; };
openblas = super.openblas.override {
enableStatic = true;
enableShared = false;
};
nix = super.nix.override { withAWS = false; };
# openssl 1.1 doesn't compile
openssl = super.openssl_1_0_2.override {
@ -162,6 +168,10 @@ in {
# --disable-shared flag
stdenv = super.stdenv;
};
arrow-cpp = super.arrow-cpp.override {
enableShared = false;
python = { pkgs = { python = null; numpy = null; }; };
};
boost = super.boost.override {
enableStatic = true;
enableShared = false;
@ -170,9 +180,25 @@ in {
# --disable-shared flag
stdenv = super.stdenv;
};
thrift = super.thrift.override {
static = true;
twisted = null;
};
double-conversion = super.double-conversion.override {
static = true;
};
gmp = super.gmp.override {
withStatic = true;
};
gflags = super.gflags.override {
enableShared = false;
};
glog = super.glog.override {
static = true;
};
gtest = super.gtest.override {
static = true;
};
cdo = super.cdo.override {
enable_all_static = true;
};
@ -191,6 +217,12 @@ in {
# it doesnt like the --disable-shared flag
stdenv = super.stdenv;
};
woff2 = super.woff2.override {
static = true;
};
snappy = super.snappy.override {
static = true;
};
lz4 = super.lz4.override {
enableShared = false;
enableStatic = true;
@ -223,6 +255,10 @@ in {
staticOnly = true;
};
zstd = super.zstd.override {
enableShared = false;
};
llvmPackages_8 = super.llvmPackages_8 // {
libraries = super.llvmPackages_8.libraries // rec {
libcxxabi = super.llvmPackages_8.libraries.libcxxabi.override {