diff --git a/pkgs/applications/graphics/paraview/default.nix b/pkgs/applications/graphics/paraview/default.nix index 1a47a355749..ddf7c537062 100644 --- a/pkgs/applications/graphics/paraview/default.nix +++ b/pkgs/applications/graphics/paraview/default.nix @@ -30,7 +30,7 @@ mkDerivation rec { # libraries. These reside in build/lib, and are not found by # default. preBuild = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib:$PWD/VTK/ThirdParty/vtkm/vtk-m/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib:$PWD/VTK/ThirdParty/vtkm/vtk-m/lib ''; enableParallelBuilding = true; diff --git a/pkgs/applications/misc/audio/soxr/default.nix b/pkgs/applications/misc/audio/soxr/default.nix index 7c4e6ff8c3d..20a754ba98a 100644 --- a/pkgs/applications/misc/audio/soxr/default.nix +++ b/pkgs/applications/misc/audio/soxr/default.nix @@ -11,9 +11,9 @@ stdenv.mkDerivation rec { outputs = [ "out" "doc" ]; # headers are just two and very small preConfigure = if stdenv.isDarwin then '' - export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:"`pwd`/build/src + export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}"`pwd`/build/src '' else '' - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:"`pwd`/build/src + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}"`pwd`/build/src ''; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/applications/networking/ftp/filezilla/default.nix b/pkgs/applications/networking/ftp/filezilla/default.nix index f1b809009ad..8bb38230d5c 100644 --- a/pkgs/applications/networking/ftp/filezilla/default.nix +++ b/pkgs/applications/networking/ftp/filezilla/default.nix @@ -18,11 +18,11 @@ stdenv.mkDerivation rec { pname = "filezilla"; - version = "3.46.0"; + version = "3.46.3"; src = fetchurl { url = "https://download.filezilla-project.org/client/FileZilla_${version}_src.tar.bz2"; - sha256 = "0v7656p7b6w88a96wj8058b13yxbwi186l092i9whrisngnv2pnf"; + sha256 = "15bkg9qs07h4pzkxba1gymp8f264dk0zrzd9brx48fcwm7qbzigi"; }; configureFlags = [ diff --git a/pkgs/applications/networking/ike/default.nix b/pkgs/applications/networking/ike/default.nix index 3baa1352a80..0b0491ffb86 100644 --- a/pkgs/applications/networking/ike/default.nix +++ b/pkgs/applications/networking/ike/default.nix @@ -28,6 +28,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake flex bison makeWrapper ]; buildInputs = [ openssl libedit qt4 nettools iproute ]; + postPatch = '' + # fix build with bison3 + sed -i 's/define "parser_class_name"/define parser_class_name/' source/iked/conf.parse.yy + ''; + configurePhase = '' mkdir -p $out/{bin,sbin,lib} cmake -DQTGUI=YES -DETCDIR=$out/etc -DLIBDIR=$out/lib -DSBINDIR=$out/sbin -DBINDIR=$out/bin \ diff --git a/pkgs/applications/networking/mailreaders/claws-mail/default.nix b/pkgs/applications/networking/mailreaders/claws-mail/default.nix index e89a36eade0..f62ab292d66 100644 --- a/pkgs/applications/networking/mailreaders/claws-mail/default.nix +++ b/pkgs/applications/networking/mailreaders/claws-mail/default.nix @@ -43,7 +43,7 @@ stdenv.mkDerivation rec { preConfigure = '' # autotools check tries to dlopen libpython as a requirement for the python plugin - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${python}/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${python}/lib ''; postPatch = '' diff --git a/pkgs/applications/office/gnucash/default.nix b/pkgs/applications/office/gnucash/default.nix index 963a896dd51..476b1128b94 100644 --- a/pkgs/applications/office/gnucash/default.nix +++ b/pkgs/applications/office/gnucash/default.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { # 80 - test-gnc-module-scm-module (Failed) # 81 - test-gnc-module-scm-multi (Failed) preCheck = '' - export LD_LIBRARY_PATH=$PWD/lib:$PWD/lib/gnucash:$PWD/lib/gnucash/test:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=$PWD/lib:$PWD/lib/gnucash:$PWD/lib/gnucash/test''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH export NIX_CFLAGS_LINK="-lgtest -lgtest_main" ''; doCheck = false; diff --git a/pkgs/applications/radio/fldigi/default.nix b/pkgs/applications/radio/fldigi/default.nix index bc297b791f6..900f0ed7c04 100644 --- a/pkgs/applications/radio/fldigi/default.nix +++ b/pkgs/applications/radio/fldigi/default.nix @@ -2,12 +2,12 @@ libsamplerate, libpulseaudio, libXinerama, gettext, pkgconfig, alsaLib }: stdenv.mkDerivation rec { - version = "4.1.08"; + version = "4.1.08.51"; pname = "fldigi"; src = fetchurl { url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; - sha256 = "0jbk03w0wfvd9lxh1wdazim9gwxm1lkhc5xzi3h8ag7h9zx58jq0"; + sha256 = "0wki9d19q8rkjxcd3dz3k0a395gmbnji4fxlhw6dpcyqpfw88fcs"; }; buildInputs = [ libXinerama gettext hamlib fltk13 libjpeg libpng portaudio diff --git a/pkgs/applications/science/math/pcalc/default.nix b/pkgs/applications/science/math/pcalc/default.nix index 167ab9275fa..51c93f197e4 100644 --- a/pkgs/applications/science/math/pcalc/default.nix +++ b/pkgs/applications/science/math/pcalc/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, bison2, flex }: +{ stdenv, fetchgit, bison, flex }: with stdenv.lib; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { }; makeFlags = [ "DESTDIR= BINDIR=$(out)/bin" ]; - buildInputs = [ bison2 flex ]; + buildInputs = [ bison flex ]; meta = { homepage = http://pcalc.sourceforge.net/; diff --git a/pkgs/applications/science/math/sage/sage-env.nix b/pkgs/applications/science/math/sage/sage-env.nix index 00397239876..68e0d134ace 100644 --- a/pkgs/applications/science/math/sage/sage-env.nix +++ b/pkgs/applications/science/math/sage/sage-env.nix @@ -177,7 +177,7 @@ writeTextFile rec { export SAGE_EXTCODE='${sagelib.src}/src/ext' # for find_library - export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular]}:$DYLD_LIBRARY_PATH" + export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular]}''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH" ''; } // { lib = sagelib; # equivalent of `passthru`, which `writeTextFile` doesn't support diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index 7c46d26bf5b..c9775f14081 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -21,7 +21,7 @@ assert sendEmailSupport -> perlSupport; assert svnSupport -> perlSupport; let - version = "2.24.1"; + version = "2.25.0"; svn = subversionClient.override { perlBindings = perlSupport; }; gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ]; @@ -33,7 +33,7 @@ stdenv.mkDerivation { src = fetchurl { url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz"; - sha256 = "0ql5z31vgl7b785gwrf00m129mg7zi9pa65n12ij3mpxx3f28gvj"; + sha256 = "1l58v42aazj0x9276gk8r9mwyl9pgp9w99aakz4xfhzv7wd2jq60"; }; outputs = [ "out" ]; diff --git a/pkgs/applications/video/avidemux/default.nix b/pkgs/applications/video/avidemux/default.nix index c28d900dd9f..00bdb370aae 100644 --- a/pkgs/applications/video/avidemux/default.nix +++ b/pkgs/applications/video/avidemux/default.nix @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { cd "$sourceRoot" patchPhase - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libXext}/lib" + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${libXext}/lib" ${stdenv.shell} bootStrap.bash \ --with-core \ ${if withQT then "--with-qt" else "--without-qt"} \ diff --git a/pkgs/build-support/build-fhs-userenv/env.nix b/pkgs/build-support/build-fhs-userenv/env.nix index 295b17eec67..8de43d5a919 100644 --- a/pkgs/build-support/build-fhs-userenv/env.nix +++ b/pkgs/build-support/build-fhs-userenv/env.nix @@ -52,7 +52,7 @@ let etcProfile = writeText "profile" '' export PS1='${name}-chrootenv:\u@\h:\w\$ ' export LOCALE_ARCHIVE='/usr/lib/locale/locale-archive' - export LD_LIBRARY_PATH="/run/opengl-driver/lib:/run/opengl-driver-32/lib:/usr/lib:/usr/lib32:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="/run/opengl-driver/lib:/run/opengl-driver-32/lib:/usr/lib:/usr/lib32''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" export PATH="/run/wrappers/bin:/usr/bin:/usr/sbin:$PATH" export TZDIR='/etc/zoneinfo' diff --git a/pkgs/build-support/setup-hooks/make-symlinks-relative.sh b/pkgs/build-support/setup-hooks/make-symlinks-relative.sh new file mode 100644 index 00000000000..0608d3ca81c --- /dev/null +++ b/pkgs/build-support/setup-hooks/make-symlinks-relative.sh @@ -0,0 +1,28 @@ +fixupOutputHooks+=(_makeSymlinksRelative) + +# For every symlink in $output that refers to another file in $output +# ensure that the symlink is relative. This removes references to the output +# has from the resulting store paths and thus the NAR files. +_makeSymlinksRelative() { + local symlinkTarget + + if [ -n "${dontRewriteSymlinks-}" ]; then + return 0 + fi + + while IFS= read -r -d $'\0' f; do + symlinkTarget=$(readlink "$f") + if [[ "$symlinkTarget"/ != "$prefix"/* ]]; then + # skip this symlink as it doesn't point to $prefix + continue + fi + + if [ ! -e "$symlinkTarget" ]; then + echo "the symlink $f is broken, it points to $symlinkTarget (which is missing)" + fi + + echo "rewriting symlink $f to be relative to $prefix" + ln -snrf "$symlinkTarget" "$f" + + done < <(find $prefix -type l -print0) +} diff --git a/pkgs/desktops/deepin/dde-file-manager/default.nix b/pkgs/desktops/deepin/dde-file-manager/default.nix index 5d0d04bfb76..62931dfcd81 100644 --- a/pkgs/desktops/deepin/dde-file-manager/default.nix +++ b/pkgs/desktops/deepin/dde-file-manager/default.nix @@ -228,8 +228,8 @@ mkDerivation rec { ]; preBuild = '' - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${zlib}/lib"; - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${libX11}/lib"; + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${zlib}/lib"; + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${libX11}/lib"; ''; dontWrapQtApps = true; diff --git a/pkgs/desktops/enlightenment/efl.nix b/pkgs/desktops/enlightenment/efl.nix index 183e72565d3..b4b271fb38f 100644 --- a/pkgs/desktops/enlightenment/efl.nix +++ b/pkgs/desktops/enlightenment/efl.nix @@ -123,7 +123,7 @@ stdenv.mkDerivation rec { preConfigure = '' # allow ecore_con to find libcurl.so, which is a runtime dependency (it is dlopened) - export LD_LIBRARY_PATH="${curl.out}/lib:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="${curl.out}/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" source "$setupHook" ''; diff --git a/pkgs/desktops/gnome-2/platform/libgnomeprint/default.nix b/pkgs/desktops/gnome-2/platform/libgnomeprint/default.nix index 453a4459fdd..44c4469c565 100644 --- a/pkgs/desktops/gnome-2/platform/libgnomeprint/default.nix +++ b/pkgs/desktops/gnome-2/platform/libgnomeprint/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, gtk2, gettext, libxml2, intltool, libart_lgpl -, libgnomecups, bison2, flex }: +{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk2, gettext, libxml2, intltool, libart_lgpl +, libgnomecups, bison, flex }: stdenv.mkDerivation rec { name = "libgnomeprint-2.18.8"; @@ -9,10 +9,17 @@ stdenv.mkDerivation rec { sha256 = "1034ec8651051f84d2424e7a1da61c530422cc20ce5b2d9e107e1e46778d9691"; }; - patches = [ ./bug653388.patch ]; + patches = [ + ./bug653388.patch + # Fix compatibility with bison 3 + (fetchpatch { + url = "https://github.com/pld-linux/libgnomeprint/raw/54c0f9c3675b86c53f6d77a5bc526ce9ef0e38cd/bison3.patch"; + sha256 = "1sp04jbv34i1gcwf377hhmwdsmqzig70dd06rjz1isb6zwh4y01l"; + }) + ]; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ gtk2 gettext intltool libart_lgpl libgnomecups bison2 flex ]; + buildInputs = [ gtk2 gettext intltool libart_lgpl libgnomecups bison flex ]; propagatedBuildInputs = [ libxml2 ]; diff --git a/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix b/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix index 6c293cb55b9..d0273f0fac1 100644 --- a/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix +++ b/pkgs/desktops/gnome-3/core/evolution-data-server/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "evolution-data-server"; - version = "3.34.2"; + version = "3.34.3"; outputs = [ "out" "dev" ]; src = fetchurl { url = "mirror://gnome/sources/evolution-data-server/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "16z85y6hhazcrp5ngw47w4x9r0j8zrj7awv5im58hhp0xs19zf1y"; + sha256 = "1af3f218i5h3df81xkjdij0n9knsw355fsmhzdrfh1bflxfarpyj"; }; patches = [ diff --git a/pkgs/development/compilers/halide/default.nix b/pkgs/development/compilers/halide/default.nix index 0b28b61a27b..44c079af926 100644 --- a/pkgs/development/compilers/halide/default.nix +++ b/pkgs/development/compilers/halide/default.nix @@ -29,7 +29,7 @@ in llvmPackages.stdenv.mkDerivation { # To handle the lack of 'local' RPATH; required, as they call one of # their built binaries requiring their libs, in the build process. preBuild = '' - export LD_LIBRARY_PATH="$(pwd)/lib:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="$(pwd)/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" ''; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/llvm/4/clang/default.nix b/pkgs/development/compilers/llvm/4/clang/default.nix index a90fbe6ae83..5bdd3731207 100644 --- a/pkgs/development/compilers/llvm/4/clang/default.nix +++ b/pkgs/development/compilers/llvm/4/clang/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetch, cmake, libxml2, llvm, version, release_version, clang-tools-extra_src, python +{ stdenv, fetch, cmake, libxml2, llvm, version, release_version, clang-tools-extra_src, python3 , fixDarwinDylibNames , enableManpages ? false }: @@ -19,8 +19,8 @@ let mv clang-tools-extra-* $sourceRoot/tools/extra ''; - nativeBuildInputs = [ cmake python ] - ++ stdenv.lib.optional enableManpages python.pkgs.sphinx; + nativeBuildInputs = [ cmake python3 ] + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; buildInputs = [ libxml2 llvm ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/4/default.nix b/pkgs/development/compilers/llvm/4/default.nix index 9651dbb72f4..2f457880db1 100644 --- a/pkgs/development/compilers/llvm/4/default.nix +++ b/pkgs/development/compilers/llvm/4/default.nix @@ -1,5 +1,5 @@ { lowPrio, newScope, pkgs, stdenv, cmake, libstdcxxHook -, libxml2, python, isl, fetchurl, overrideCC, wrapCCWith +, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -17,7 +17,7 @@ let clang-tools-extra_src = fetch "clang-tools-extra" "1dhmp7ccfpr42bmvk3kp37ngjpf3a9m5d4kkpsn7d00hzi7fdl9m"; tools = stdenv.lib.makeExtensible (tools: let - callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); in { llvm = callPackage ./llvm.nix { @@ -29,12 +29,12 @@ let llvm-manpages = lowPrio (tools.llvm.override { enableManpages = true; - python = pkgs.python; # don't use python-boot + python3 = pkgs.python3; # don't use python-boot }); clang-manpages = lowPrio (tools.clang-unwrapped.override { enableManpages = true; - python = pkgs.python; # don't use python-boot + python3 = pkgs.python3; # don't use python-boot }); libclang = tools.clang-unwrapped.lib; @@ -57,7 +57,7 @@ let }); libraries = stdenv.lib.makeExtensible (libraries: let - callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); in { stdenv = overrideCC stdenv buildLlvmTools.clang; diff --git a/pkgs/development/compilers/llvm/4/libc++/default.nix b/pkgs/development/compilers/llvm/4/libc++/default.nix index 0213741e3e0..264342701ae 100644 --- a/pkgs/development/compilers/llvm/4/libc++/default.nix +++ b/pkgs/development/compilers/llvm/4/libc++/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetch, cmake, python, libcxxabi, fixDarwinDylibNames, version }: +{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }: stdenv.mkDerivation { pname = "libc++"; @@ -31,7 +31,7 @@ stdenv.mkDerivation { '' + lib.optionalString stdenv.hostPlatform.isMusl '' patchShebangs utils/cat_files.py ''; - nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3; buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/4/lldb.nix b/pkgs/development/compilers/llvm/4/lldb.nix index 8adf11abddd..7f6231278e6 100644 --- a/pkgs/development/compilers/llvm/4/lldb.nix +++ b/pkgs/development/compilers/llvm/4/lldb.nix @@ -9,7 +9,7 @@ , libxml2 , llvm , clang-unwrapped -, python +, python3 , version , darwin }: @@ -31,7 +31,7 @@ stdenv.mkDerivation { cmake/modules/LLDBStandalone.cmake ''; - nativeBuildInputs = [ cmake python which swig ]; + nativeBuildInputs = [ cmake python3 which swig ]; buildInputs = [ ncurses zlib libedit libxml2 llvm ] ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ]; diff --git a/pkgs/development/compilers/llvm/4/llvm.nix b/pkgs/development/compilers/llvm/4/llvm.nix index 317a5ea06f4..0d3ce1614de 100644 --- a/pkgs/development/compilers/llvm/4/llvm.nix +++ b/pkgs/development/compilers/llvm/4/llvm.nix @@ -2,7 +2,7 @@ , fetch , fetchpatch , cmake -, python +, python3 , libffi , libbfd , libxml2 @@ -40,8 +40,8 @@ stdenv.mkDerivation ({ outputs = [ "out" ] ++ stdenv.lib.optional enableSharedLibraries "lib"; - nativeBuildInputs = [ cmake python ] - ++ stdenv.lib.optional enableManpages python.pkgs.sphinx; + nativeBuildInputs = [ cmake python3 ] + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; buildInputs = [ libxml2 libffi ]; @@ -143,7 +143,7 @@ stdenv.mkDerivation ({ ''; preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib ''; postInstall = stdenv.lib.optionalString enableSharedLibraries '' diff --git a/pkgs/development/compilers/llvm/5/clang/default.nix b/pkgs/development/compilers/llvm/5/clang/default.nix index 6695609b8ec..e391ce046db 100644 --- a/pkgs/development/compilers/llvm/5/clang/default.nix +++ b/pkgs/development/compilers/llvm/5/clang/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python +{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3 , fixDarwinDylibNames , enableManpages ? false }: @@ -19,8 +19,8 @@ let mv clang-tools-extra-* $sourceRoot/tools/extra ''; - nativeBuildInputs = [ cmake python ] - ++ stdenv.lib.optional enableManpages python.pkgs.sphinx; + nativeBuildInputs = [ cmake python3 ] + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; buildInputs = [ libxml2 llvm ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/5/compiler-rt.nix b/pkgs/development/compilers/llvm/5/compiler-rt.nix index c87b0f23596..0282591b6e2 100644 --- a/pkgs/development/compilers/llvm/5/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/5/compiler-rt.nix @@ -1,11 +1,11 @@ -{ stdenv, version, fetch, cmake, python, llvm, libcxxabi }: +{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }: with stdenv.lib; stdenv.mkDerivation { pname = "compiler-rt"; inherit version; src = fetch "compiler-rt" "0ipd4jdxpczgr2w6lzrabymz6dhzj69ywmyybjjc1q397zgrvziy"; - nativeBuildInputs = [ cmake python llvm ]; + nativeBuildInputs = [ cmake python3 llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; configureFlags = [ diff --git a/pkgs/development/compilers/llvm/5/default.nix b/pkgs/development/compilers/llvm/5/default.nix index 6807240df81..05f4dbf6aa0 100644 --- a/pkgs/development/compilers/llvm/5/default.nix +++ b/pkgs/development/compilers/llvm/5/default.nix @@ -1,5 +1,5 @@ { lowPrio, newScope, pkgs, stdenv, cmake, libstdcxxHook -, libxml2, python, isl, fetchurl, overrideCC, wrapCCWith +, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -16,7 +16,7 @@ let clang-tools-extra_src = fetch "clang-tools-extra" "018b3fiwah8f8br5i26qmzh6sjvzchpn358sn8v079m49f2jldm3"; tools = stdenv.lib.makeExtensible (tools: let - callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); mkExtraBuildCommands = cc: '' rsrc="$out/resource-root" mkdir "$rsrc" @@ -36,12 +36,12 @@ let llvm-manpages = lowPrio (tools.llvm.override { enableManpages = true; - python = pkgs.python; # don't use python-boot + python3 = pkgs.python3; # don't use python-boot }); clang-manpages = lowPrio (tools.clang-unwrapped.override { enableManpages = true; - python = pkgs.python; # don't use python-boot + python3 = pkgs.python3; # don't use python-boot }); libclang = tools.clang-unwrapped.lib; @@ -74,7 +74,7 @@ let }); libraries = stdenv.lib.makeExtensible (libraries: let - callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); in { compiler-rt = callPackage ./compiler-rt.nix {}; diff --git a/pkgs/development/compilers/llvm/5/libc++/default.nix b/pkgs/development/compilers/llvm/5/libc++/default.nix index 03d8a2085d0..b02e09a83a8 100644 --- a/pkgs/development/compilers/llvm/5/libc++/default.nix +++ b/pkgs/development/compilers/llvm/5/libc++/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetch, cmake, python, libcxxabi, fixDarwinDylibNames, version }: +{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }: stdenv.mkDerivation { pname = "libc++"; @@ -25,7 +25,7 @@ stdenv.mkDerivation { '' + lib.optionalString stdenv.hostPlatform.isMusl '' patchShebangs utils/cat_files.py ''; - nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3; buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/5/lldb.nix b/pkgs/development/compilers/llvm/5/lldb.nix index cce44c7e50f..a91a7e4354e 100644 --- a/pkgs/development/compilers/llvm/5/lldb.nix +++ b/pkgs/development/compilers/llvm/5/lldb.nix @@ -9,7 +9,7 @@ , libxml2 , llvm , clang-unwrapped -, python +, python3 , version , darwin }: @@ -30,7 +30,7 @@ stdenv.mkDerivation { cmake/modules/LLDBStandalone.cmake ''; - nativeBuildInputs = [ cmake python which swig ]; + nativeBuildInputs = [ cmake python3 which swig ]; buildInputs = [ ncurses zlib libedit libxml2 llvm ] ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ]; diff --git a/pkgs/development/compilers/llvm/5/llvm.nix b/pkgs/development/compilers/llvm/5/llvm.nix index d26af8438e7..2ce17765d63 100644 --- a/pkgs/development/compilers/llvm/5/llvm.nix +++ b/pkgs/development/compilers/llvm/5/llvm.nix @@ -2,7 +2,7 @@ , fetch , fetchpatch , cmake -, python +, python3 , libffi , libbfd , libxml2 @@ -37,8 +37,8 @@ stdenv.mkDerivation ({ outputs = [ "out" "python" ] ++ stdenv.lib.optional enableSharedLibraries "lib"; - nativeBuildInputs = [ cmake python ] - ++ stdenv.lib.optional enableManpages python.pkgs.sphinx; + nativeBuildInputs = [ cmake python3 ] + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; buildInputs = [ libxml2 libffi ]; @@ -119,7 +119,7 @@ stdenv.mkDerivation ({ ''; preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib ''; postInstall = '' diff --git a/pkgs/development/compilers/llvm/6/clang/default.nix b/pkgs/development/compilers/llvm/6/clang/default.nix index d093379b3c9..9374fc0bda9 100644 --- a/pkgs/development/compilers/llvm/6/clang/default.nix +++ b/pkgs/development/compilers/llvm/6/clang/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python +{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3 , fixDarwinDylibNames , enableManpages ? false }: @@ -19,8 +19,8 @@ let mv clang-tools-extra-* $sourceRoot/tools/extra ''; - nativeBuildInputs = [ cmake python ] - ++ stdenv.lib.optional enableManpages python.pkgs.sphinx; + nativeBuildInputs = [ cmake python3 ] + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; buildInputs = [ libxml2 llvm ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/6/compiler-rt.nix b/pkgs/development/compilers/llvm/6/compiler-rt.nix index 4cf79e79569..b3b6e86fc52 100644 --- a/pkgs/development/compilers/llvm/6/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/6/compiler-rt.nix @@ -1,11 +1,11 @@ -{ stdenv, version, fetch, cmake, python, llvm, libcxxabi }: +{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }: with stdenv.lib; stdenv.mkDerivation { pname = "compiler-rt"; inherit version; src = fetch "compiler-rt" "1fcr3jn24yr8lh36nc0c4ikli4744i2q9m1ik67p1jymwwaixkgl"; - nativeBuildInputs = [ cmake python llvm ]; + nativeBuildInputs = [ cmake python3 llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; configureFlags = [ diff --git a/pkgs/development/compilers/llvm/6/default.nix b/pkgs/development/compilers/llvm/6/default.nix index ae51c19ec72..d4745930ed3 100644 --- a/pkgs/development/compilers/llvm/6/default.nix +++ b/pkgs/development/compilers/llvm/6/default.nix @@ -1,5 +1,5 @@ { lowPrio, newScope, pkgs, stdenv, cmake, libstdcxxHook -, libxml2, python, isl, fetchurl, overrideCC, wrapCCWith +, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -16,7 +16,7 @@ let clang-tools-extra_src = fetch "clang-tools-extra" "1w8ml7fyn4vyxmy59n2qm4r1k1kgwgwkaldp6m45fdv4g0kkfbhd"; tools = stdenv.lib.makeExtensible (tools: let - callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); mkExtraBuildCommands = cc: '' rsrc="$out/resource-root" mkdir "$rsrc" @@ -36,12 +36,12 @@ let llvm-manpages = lowPrio (tools.llvm.override { enableManpages = true; - python = pkgs.python; # don't use python-boot + python3 = pkgs.python3; # don't use python-boot }); clang-manpages = lowPrio (tools.clang-unwrapped.override { enableManpages = true; - python = pkgs.python; # don't use python-boot + python3 = pkgs.python3; # don't use python-boot }); libclang = tools.clang-unwrapped.lib; @@ -74,7 +74,7 @@ let }); libraries = stdenv.lib.makeExtensible (libraries: let - callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); in { compiler-rt = callPackage ./compiler-rt.nix {}; diff --git a/pkgs/development/compilers/llvm/6/libc++/default.nix b/pkgs/development/compilers/llvm/6/libc++/default.nix index 658068cbfaf..831c6c9c700 100644 --- a/pkgs/development/compilers/llvm/6/libc++/default.nix +++ b/pkgs/development/compilers/llvm/6/libc++/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetch, cmake, python, libcxxabi, fixDarwinDylibNames, version }: +{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }: stdenv.mkDerivation { pname = "libc++"; @@ -25,7 +25,7 @@ stdenv.mkDerivation { '' + lib.optionalString stdenv.hostPlatform.isMusl '' patchShebangs utils/cat_files.py ''; - nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3; buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/6/lldb.nix b/pkgs/development/compilers/llvm/6/lldb.nix index d3db8082c96..30d72d94426 100644 --- a/pkgs/development/compilers/llvm/6/lldb.nix +++ b/pkgs/development/compilers/llvm/6/lldb.nix @@ -9,7 +9,7 @@ , libxml2 , llvm , clang-unwrapped -, python +, python3 , version , darwin }: @@ -30,7 +30,7 @@ stdenv.mkDerivation { cmake/modules/LLDBStandalone.cmake ''; - nativeBuildInputs = [ cmake python which swig ]; + nativeBuildInputs = [ cmake python3 which swig ]; buildInputs = [ ncurses zlib libedit libxml2 llvm ] ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ]; diff --git a/pkgs/development/compilers/llvm/6/llvm.nix b/pkgs/development/compilers/llvm/6/llvm.nix index c6d2c09c2df..80acd3fa2fe 100644 --- a/pkgs/development/compilers/llvm/6/llvm.nix +++ b/pkgs/development/compilers/llvm/6/llvm.nix @@ -1,7 +1,7 @@ { stdenv , fetch , cmake -, python +, python3 , libffi , libbfd , libxml2 @@ -40,8 +40,8 @@ stdenv.mkDerivation ({ outputs = [ "out" "python" ] ++ optional enableSharedLibraries "lib"; - nativeBuildInputs = [ cmake python ] - ++ optional enableManpages python.pkgs.sphinx; + nativeBuildInputs = [ cmake python3 ] + ++ optional enableManpages python3.pkgs.sphinx; buildInputs = [ libxml2 libffi ]; @@ -120,7 +120,7 @@ stdenv.mkDerivation ({ ''; preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib ''; postInstall = '' diff --git a/pkgs/development/compilers/llvm/7/clang/default.nix b/pkgs/development/compilers/llvm/7/clang/default.nix index 5ac9a7a2672..cc5dcfc160b 100644 --- a/pkgs/development/compilers/llvm/7/clang/default.nix +++ b/pkgs/development/compilers/llvm/7/clang/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python +{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3 , fixDarwinDylibNames , enableManpages ? false , enablePolly ? false # TODO: get this info from llvm (passthru?) @@ -19,8 +19,8 @@ let mv clang-tools-extra-* $sourceRoot/tools/extra ''; - nativeBuildInputs = [ cmake python ] - ++ stdenv.lib.optional enableManpages python.pkgs.sphinx; + nativeBuildInputs = [ cmake python3 ] + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; buildInputs = [ libxml2 llvm ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/7/compiler-rt.nix b/pkgs/development/compilers/llvm/7/compiler-rt.nix index a7d4bcb8696..ae98940adea 100644 --- a/pkgs/development/compilers/llvm/7/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/7/compiler-rt.nix @@ -1,10 +1,10 @@ -{ stdenv, version, fetch, cmake, python, llvm, libcxxabi }: +{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }: stdenv.mkDerivation { pname = "compiler-rt"; inherit version; src = fetch "compiler-rt" "1n48p8gjarihkws0i2bay5w9bdwyxyxxbpwyng7ba58jb30dlyq5"; - nativeBuildInputs = [ cmake python llvm ]; + nativeBuildInputs = [ cmake python3 llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ diff --git a/pkgs/development/compilers/llvm/7/default.nix b/pkgs/development/compilers/llvm/7/default.nix index 621a246225d..f5dbea58a7d 100644 --- a/pkgs/development/compilers/llvm/7/default.nix +++ b/pkgs/development/compilers/llvm/7/default.nix @@ -1,5 +1,5 @@ { lowPrio, newScope, pkgs, stdenv, cmake, libstdcxxHook -, libxml2, python, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith +, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -16,7 +16,7 @@ let clang-tools-extra_src = fetch "clang-tools-extra" "0lb4kdh7j2fhfz8kd6iv5df7m3pikiryk1vvwsf87spc90n09q0w"; tools = stdenv.lib.makeExtensible (tools: let - callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); mkExtraBuildCommands = cc: '' rsrc="$out/resource-root" mkdir "$rsrc" @@ -42,12 +42,12 @@ let llvm-manpages = lowPrio (tools.llvm.override { enableManpages = true; - python = pkgs.python; # don't use python-boot + python3 = pkgs.python3; # don't use python-boot }); clang-manpages = lowPrio (tools.clang-unwrapped.override { enableManpages = true; - python = pkgs.python; # don't use python-boot + python3 = pkgs.python3; # don't use python-boot }); libclang = tools.clang-unwrapped.lib; @@ -126,7 +126,7 @@ let }); libraries = stdenv.lib.makeExtensible (libraries: let - callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); in { compiler-rt = callPackage ./compiler-rt.nix { diff --git a/pkgs/development/compilers/llvm/7/libc++/default.nix b/pkgs/development/compilers/llvm/7/libc++/default.nix index f6f9970d7a6..f2cdd2f6f5f 100644 --- a/pkgs/development/compilers/llvm/7/libc++/default.nix +++ b/pkgs/development/compilers/llvm/7/libc++/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetch, cmake, python, libcxxabi, fixDarwinDylibNames, version +{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version , enableShared ? ! stdenv.hostPlatform.isMusl }: stdenv.mkDerivation { @@ -24,7 +24,7 @@ stdenv.mkDerivation { '' + lib.optionalString stdenv.hostPlatform.isMusl '' patchShebangs utils/cat_files.py ''; - nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3; buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/7/lldb.nix b/pkgs/development/compilers/llvm/7/lldb.nix index 44687ead4d1..ace6ae812fd 100644 --- a/pkgs/development/compilers/llvm/7/lldb.nix +++ b/pkgs/development/compilers/llvm/7/lldb.nix @@ -10,7 +10,7 @@ , llvm , clang-unwrapped , perl -, python +, python3 , version , darwin }: @@ -21,7 +21,7 @@ stdenv.mkDerivation { src = fetch "lldb" "0klsscg1sczc4nw2l53xggi969k361cng2sjjrfp3bv4g5x14s4v"; - nativeBuildInputs = [ cmake perl python which swig ]; + nativeBuildInputs = [ cmake perl python3 which swig ]; buildInputs = [ ncurses zlib libedit libxml2 llvm ] ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ]; diff --git a/pkgs/development/compilers/llvm/7/llvm.nix b/pkgs/development/compilers/llvm/7/llvm.nix index c56bbfd0eab..d7fb1fe4b93 100644 --- a/pkgs/development/compilers/llvm/7/llvm.nix +++ b/pkgs/development/compilers/llvm/7/llvm.nix @@ -2,7 +2,7 @@ , fetch , fetchpatch , cmake -, python +, python3 , libffi , libbfd , libpfm @@ -48,8 +48,8 @@ in stdenv.mkDerivation ({ outputs = [ "out" "python" ] ++ optional enableSharedLibraries "lib"; - nativeBuildInputs = [ cmake python ] - ++ optional enableManpages python.pkgs.sphinx; + nativeBuildInputs = [ cmake python3 ] + ++ optional enableManpages python3.pkgs.sphinx; buildInputs = [ libxml2 libffi ] ++ optional enablePFM libpfm; # exegesis @@ -141,7 +141,7 @@ in stdenv.mkDerivation ({ ''; preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib ''; postInstall = '' diff --git a/pkgs/development/compilers/llvm/8/clang/default.nix b/pkgs/development/compilers/llvm/8/clang/default.nix index 8c540e45b28..8601f6d0680 100644 --- a/pkgs/development/compilers/llvm/8/clang/default.nix +++ b/pkgs/development/compilers/llvm/8/clang/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python +{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3 , fixDarwinDylibNames , enableManpages ? false , enablePolly ? false # TODO: get this info from llvm (passthru?) @@ -19,8 +19,8 @@ let mv clang-tools-extra-* $sourceRoot/tools/extra ''; - nativeBuildInputs = [ cmake python ] - ++ stdenv.lib.optional enableManpages python.pkgs.sphinx; + nativeBuildInputs = [ cmake python3 ] + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; buildInputs = [ libxml2 llvm ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/8/compiler-rt.nix b/pkgs/development/compilers/llvm/8/compiler-rt.nix index 344ff725675..9c0829146f7 100644 --- a/pkgs/development/compilers/llvm/8/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/8/compiler-rt.nix @@ -1,10 +1,10 @@ -{ stdenv, version, fetch, cmake, python, llvm, libcxxabi }: +{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }: stdenv.mkDerivation { pname = "compiler-rt"; inherit version; src = fetch "compiler-rt" "0dqqf8f930l8gag4d9qjgn1n0pj0nbv2anviqqhdi1rkhas8z0hi"; - nativeBuildInputs = [ cmake python llvm ]; + nativeBuildInputs = [ cmake python3 llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ diff --git a/pkgs/development/compilers/llvm/8/default.nix b/pkgs/development/compilers/llvm/8/default.nix index 36d7a14142b..8b916e1cda7 100644 --- a/pkgs/development/compilers/llvm/8/default.nix +++ b/pkgs/development/compilers/llvm/8/default.nix @@ -1,5 +1,5 @@ { lowPrio, newScope, pkgs, stdenv, cmake, libstdcxxHook -, libxml2, python, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith +, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -16,7 +16,7 @@ let clang-tools-extra_src = fetch "clang-tools-extra" "1qf3097bc5ia8p6cpmbx985rjr3yaah5s8fc0nv7pw742yv7jw8q"; tools = stdenv.lib.makeExtensible (tools: let - callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); mkExtraBuildCommands = cc: '' rsrc="$out/resource-root" mkdir "$rsrc" @@ -42,12 +42,12 @@ let llvm-manpages = lowPrio (tools.llvm.override { enableManpages = true; - python = pkgs.python; # don't use python-boot + python3 = pkgs.python3; # don't use python-boot }); clang-manpages = lowPrio (tools.clang-unwrapped.override { enableManpages = true; - python = pkgs.python; # don't use python-boot + python3 = pkgs.python3; # don't use python-boot }); libclang = tools.clang-unwrapped.lib; @@ -162,7 +162,7 @@ let }); libraries = stdenv.lib.makeExtensible (libraries: let - callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); in { compiler-rt = callPackage ./compiler-rt.nix ({} // diff --git a/pkgs/development/compilers/llvm/8/libc++/default.nix b/pkgs/development/compilers/llvm/8/libc++/default.nix index 8ec1c419748..883d9c8776f 100644 --- a/pkgs/development/compilers/llvm/8/libc++/default.nix +++ b/pkgs/development/compilers/llvm/8/libc++/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetch, cmake, python, libcxxabi, fixDarwinDylibNames, version +{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version , enableShared ? true }: stdenv.mkDerivation { @@ -25,7 +25,7 @@ stdenv.mkDerivation { patchShebangs utils/cat_files.py ''; nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python; + ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3; buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/8/lldb.nix b/pkgs/development/compilers/llvm/8/lldb.nix index 254933c82a0..75be5b993df 100644 --- a/pkgs/development/compilers/llvm/8/lldb.nix +++ b/pkgs/development/compilers/llvm/8/lldb.nix @@ -9,7 +9,7 @@ , libxml2 , llvm , clang-unwrapped -, python +, python3 , version , darwin }: @@ -30,7 +30,7 @@ stdenv.mkDerivation { cmake/modules/LLDBStandalone.cmake ''; - nativeBuildInputs = [ cmake python which swig ]; + nativeBuildInputs = [ cmake python3 which swig ]; buildInputs = [ ncurses zlib libedit libxml2 llvm ] ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ]; diff --git a/pkgs/development/compilers/llvm/8/llvm.nix b/pkgs/development/compilers/llvm/8/llvm.nix index df3d6e796aa..a9c4a6b0ba2 100644 --- a/pkgs/development/compilers/llvm/8/llvm.nix +++ b/pkgs/development/compilers/llvm/8/llvm.nix @@ -1,7 +1,7 @@ { stdenv , fetch , cmake -, python +, python3 , libffi , libbfd , libpfm @@ -46,8 +46,8 @@ in stdenv.mkDerivation ({ outputs = [ "out" "python" ] ++ optional enableSharedLibraries "lib"; - nativeBuildInputs = [ cmake python ] - ++ optionals enableManpages [ python.pkgs.sphinx python.pkgs.recommonmark ]; + nativeBuildInputs = [ cmake python3 ] + ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ]; buildInputs = [ libxml2 libffi ] ++ optional enablePFM libpfm; # exegesis @@ -117,7 +117,7 @@ in stdenv.mkDerivation ({ ''; preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib ''; postInstall = '' diff --git a/pkgs/development/compilers/llvm/9/clang/default.nix b/pkgs/development/compilers/llvm/9/clang/default.nix index 1b779b118a7..5f89c3dc3b7 100644 --- a/pkgs/development/compilers/llvm/9/clang/default.nix +++ b/pkgs/development/compilers/llvm/9/clang/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python +{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3 , fixDarwinDylibNames , enableManpages ? false , enablePolly ? false # TODO: get this info from llvm (passthru?) @@ -19,8 +19,8 @@ let mv clang-tools-extra-* $sourceRoot/tools/extra ''; - nativeBuildInputs = [ cmake python ] - ++ stdenv.lib.optional enableManpages python.pkgs.sphinx; + nativeBuildInputs = [ cmake python3 ] + ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx; buildInputs = [ libxml2 llvm ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/9/compiler-rt.nix b/pkgs/development/compilers/llvm/9/compiler-rt.nix index 75d0614b514..037953bb23d 100644 --- a/pkgs/development/compilers/llvm/9/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/9/compiler-rt.nix @@ -1,10 +1,10 @@ -{ stdenv, version, fetch, cmake, python, llvm, libcxxabi }: +{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }: stdenv.mkDerivation rec { pname = "compiler-rt"; inherit version; src = fetch pname "0xwh79g3zggdabxgnd0bphry75asm1qz7mv3hcqihqwqr6aspgy2"; - nativeBuildInputs = [ cmake python llvm ]; + nativeBuildInputs = [ cmake python3 llvm ]; buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi; NIX_CFLAGS_COMPILE = [ diff --git a/pkgs/development/compilers/llvm/9/default.nix b/pkgs/development/compilers/llvm/9/default.nix index c9e8ce91f0c..38ab7794018 100644 --- a/pkgs/development/compilers/llvm/9/default.nix +++ b/pkgs/development/compilers/llvm/9/default.nix @@ -1,5 +1,5 @@ { lowPrio, newScope, pkgs, stdenv, cmake, libstdcxxHook -, libxml2, python, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith +, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -16,7 +16,7 @@ let 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; }); + callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); mkExtraBuildCommands = cc: '' rsrc="$out/resource-root" mkdir "$rsrc" @@ -42,12 +42,12 @@ let llvm-manpages = lowPrio (tools.llvm.override { enableManpages = true; - python = pkgs.python; # don't use python-boot + python3 = pkgs.python3; # don't use python-boot }); clang-manpages = lowPrio (tools.clang-unwrapped.override { enableManpages = true; - python = pkgs.python; # don't use python-boot + python3 = pkgs.python3; # don't use python-boot }); libclang = tools.clang-unwrapped.lib; @@ -162,7 +162,7 @@ let }); libraries = stdenv.lib.makeExtensible (libraries: let - callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python isl release_version version fetch; }); + callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; }); in { compiler-rt = callPackage ./compiler-rt.nix ({} // diff --git a/pkgs/development/compilers/llvm/9/libc++/default.nix b/pkgs/development/compilers/llvm/9/libc++/default.nix index 1166c7bd76c..9e3525574d5 100644 --- a/pkgs/development/compilers/llvm/9/libc++/default.nix +++ b/pkgs/development/compilers/llvm/9/libc++/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetch, cmake, python, libcxxabi, fixDarwinDylibNames, version +{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version , enableShared ? true }: stdenv.mkDerivation { @@ -21,7 +21,7 @@ stdenv.mkDerivation { patchShebangs utils/cat_files.py ''; nativeBuildInputs = [ cmake ] - ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python; + ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3; buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/9/lldb.nix b/pkgs/development/compilers/llvm/9/lldb.nix index 64f111502cc..506fc1c3e50 100644 --- a/pkgs/development/compilers/llvm/9/lldb.nix +++ b/pkgs/development/compilers/llvm/9/lldb.nix @@ -9,7 +9,7 @@ , libxml2 , llvm , clang-unwrapped -, python +, python3 , version , darwin , lit @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { patches = [ ./lldb-procfs.patch ]; - nativeBuildInputs = [ cmake python which swig lit ]; + nativeBuildInputs = [ cmake python3 which swig lit ]; buildInputs = [ ncurses zlib diff --git a/pkgs/development/compilers/llvm/9/llvm.nix b/pkgs/development/compilers/llvm/9/llvm.nix index acd3ec92897..2cdc5a5fd06 100644 --- a/pkgs/development/compilers/llvm/9/llvm.nix +++ b/pkgs/development/compilers/llvm/9/llvm.nix @@ -1,7 +1,7 @@ { stdenv , fetch , cmake -, python +, python3 , libffi , libbfd , libpfm @@ -46,8 +46,8 @@ in stdenv.mkDerivation (rec { outputs = [ "out" "python" ] ++ optional enableSharedLibraries "lib"; - nativeBuildInputs = [ cmake python ] - ++ optionals enableManpages [ python.pkgs.sphinx python.pkgs.recommonmark ]; + nativeBuildInputs = [ cmake python3 ] + ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ]; buildInputs = [ libxml2 libffi ] ++ optional enablePFM libpfm; # exegesis @@ -134,7 +134,7 @@ in stdenv.mkDerivation (rec { ''; preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib ''; postInstall = '' diff --git a/pkgs/development/compilers/mlton/20130715.nix b/pkgs/development/compilers/mlton/20130715.nix index 207ed8f29bc..52bb0a0775c 100644 --- a/pkgs/development/compilers/mlton/20130715.nix +++ b/pkgs/development/compilers/mlton/20130715.nix @@ -77,7 +77,7 @@ stdenv.mkDerivation rec { chmod u+x $(pwd)/../${usr_prefix}/bin/mlton # So the builder runs the binary compiler with gmp. - export LD_LIBRARY_PATH=${gmp.out}/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${gmp.out}/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH '' + stdenv.lib.optionalString stdenv.isLinux '' # Patch ELF interpreter. diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index e5c8a709a90..2c235a12b31 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -132,9 +132,14 @@ in stdenv.mkDerivation rec { outputs = [ "out" "man" "doc" ]; setOutputFlags = false; - # remove references to llvm-config in lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so - # and thus a transitive dependency on ncurses postInstall = '' + # install rustc-dev components. Necessary to build rls, clippy... + python x.py dist rustc-dev + tar xf build/dist/rustc-dev*tar.gz + cp -r rustc-dev*/rustc-dev*/lib/* $out/lib/ + + # remove references to llvm-config in lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so + # and thus a transitive dependency on ncurses find $out/lib -name "*.so" -type f -exec remove-references-to -t ${llvmShared} '{}' '+' ''; diff --git a/pkgs/development/compilers/solc/default.nix b/pkgs/development/compilers/solc/default.nix index 23e6c64f3ff..0f71ed79e7e 100644 --- a/pkgs/development/compilers/solc/default.nix +++ b/pkgs/development/compilers/solc/default.nix @@ -49,7 +49,7 @@ stdenv.mkDerivation rec { checkPhase = '' while IFS= read -r -d ''' dir do - LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/$dir + LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$(pwd)/$dir export LD_LIBRARY_PATH done < <(find . -type d -print0) diff --git a/pkgs/development/guile-modules/guile-lib/default.nix b/pkgs/development/guile-modules/guile-lib/default.nix index cea464ad5d2..97f501f41db 100644 --- a/pkgs/development/guile-modules/guile-lib/default.nix +++ b/pkgs/development/guile-modules/guile-lib/default.nix @@ -21,7 +21,7 @@ in stdenv.mkDerivation { preCheck = '' # Make `libgcc_s.so' visible for `pthread_cancel'. export LD_LIBRARY_PATH=\ - "$(dirname $(echo ${stdenv.cc.cc.lib}/lib*/libgcc_s.so)):$LD_LIBRARY_PATH" + "$(dirname $(echo ${stdenv.cc.cc.lib}/lib*/libgcc_s.so))''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" ''; meta = with stdenv.lib; { diff --git a/pkgs/development/interpreters/pure/default.nix b/pkgs/development/interpreters/pure/default.nix index 9c35fc35497..764ee241aff 100644 --- a/pkgs/development/interpreters/pure/default.nix +++ b/pkgs/development/interpreters/pure/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-release" ]; doCheck = true; checkPhase = '' - LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${llvm}/lib make check + LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${llvm}/lib make check ''; postInstall = '' wrapProgram $out/bin/pure --prefix LD_LIBRARY_PATH : ${llvm}/lib diff --git a/pkgs/development/interpreters/python/cpython/2.7/boot.nix b/pkgs/development/interpreters/python/cpython/2.7/boot.nix deleted file mode 100644 index 0b9ddc0bb34..00000000000 --- a/pkgs/development/interpreters/python/cpython/2.7/boot.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ stdenv, fetchurl, configd, CF, coreutils }: - -with stdenv.lib; - -let - - mkPaths = paths: { - C_INCLUDE_PATH = makeSearchPathOutput "dev" "include" paths; - LIBRARY_PATH = makeLibraryPath paths; - }; - -in - -stdenv.mkDerivation rec { - pname = "python-boot"; - version = "2.7.12"; - libPrefix = "python2.7"; - - src = fetchurl { - url = "https://www.python.org/ftp/python/2.7.12/Python-${version}.tar.xz"; - sha256 = "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp"; - }; - - inherit (mkPaths buildInputs) C_INCLUDE_PATH LIBRARY_PATH; - - LDFLAGS = optionalString (!stdenv.isDarwin) "-lgcc_s"; - NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin "-msse2"; - - buildInputs = optionals stdenv.isDarwin [ CF configd ]; - - patches = - [ # Look in C_INCLUDE_PATH and LIBRARY_PATH for stuff. - ./search-path.patch - - # Python recompiles a Python if the mtime stored *in* the - # pyc/pyo file differs from the mtime of the source file. This - # doesn't work in Nix because Nix changes the mtime of files in - # the Nix store to 1. So treat that as a special case. - ./nix-store-mtime.patch - - # patch python to put zero timestamp into pyc - # if DETERMINISTIC_BUILD env var is set - ./deterministic-build.patch - ]; - - # Hack hack hack to stop shit from failing from a missing _scproxy on Darwin. Since - # we only use this python for bootstrappy things, it doesn't really matter if it - # doesn't have perfect proxy support in urllib :) this just makes it fall back on env - # vars instead of attempting to read the proxy configuration automatically, so not a - # huge loss even if for whatever reason we did want proxy support. - postPatch = '' - substituteInPlace Lib/urllib.py --replace "if sys.platform == 'darwin'" "if False" - ''; - - DETERMINISTIC_BUILD = 1; - - preConfigure = '' - # Purity. - for i in /usr /sw /opt /pkg; do - substituteInPlace ./setup.py --replace $i /no-such-path - done - '' + optionalString (stdenv ? cc && stdenv.cc.libc != null) '' - for i in Lib/plat-*/regen; do - substituteInPlace $i --replace /usr/include/ ${stdenv.cc.libc}/include/ - done - '' + optionalString stdenv.isDarwin '' - substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' - substituteInPlace Lib/multiprocessing/__init__.py \ - --replace 'os.popen(comm)' 'os.popen("${coreutils}/bin/nproc")' - ''; - - configureFlags = [ "--enable-shared" "--with-threads" "--enable-unicode=ucs4" ] - ++ optionals stdenv.isCygwin [ "ac_cv_func_bind_textdomain_codeset=yes" ] - ++ optionals stdenv.isDarwin [ "--disable-toolbox-glue" ]; - - postInstall = - '' - ln -s $out/share/man/man1/{python2.7.1.gz,python.1.gz} - - rm "$out"/lib/python*/plat-*/regen # refers to glibc.dev - ''; - - enableParallelBuilding = true; - - passthru.pkgs = builtins.throw "python-boot does not support packages, this package is only intended for bootstrapping." {}; - - meta = { - homepage = http://python.org; - description = "A high-level dynamically-typed programming language"; - longDescription = '' - Python is a remarkably powerful dynamic programming language that - is used in a wide variety of application domains. Some of its key - distinguishing features include: clear, readable syntax; strong - introspection capabilities; intuitive object orientation; natural - expression of procedural code; full modularity, supporting - hierarchical packages; exception-based error handling; and very - high level dynamic data types. - ''; - license = stdenv.lib.licenses.psfl; - platforms = stdenv.lib.platforms.all; - maintainers = with stdenv.lib.maintainers; [ lnl7 domenkozar ]; - }; -} diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index e6b3dff433b..77b37c5f5c3 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -11,7 +11,7 @@ , tcl ? null, tk ? null, tix ? null, xlibsWrapper ? null, libX11 ? null, x11Support ? false , zlib , self -, CF, configd, coreutils +, configd, coreutils , python-setup-hook # Some proprietary libs assume UCS2 unicode, especially on darwin :( , ucsEncoding ? 4 @@ -180,7 +180,7 @@ let ++ optional stdenv.hostPlatform.isCygwin expat ++ [ db gdbm ncurses sqlite readline ] ++ optionals x11Support [ tcl tk xlibsWrapper libX11 ] - ++ optionals stdenv.isDarwin ([ CF ] ++ optional (configd != null) configd); + ++ optional (stdenv.isDarwin && configd != null) configd; nativeBuildInputs = optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ buildPackages.stdenv.cc buildPackages.python ]; diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index e75bd0a0987..70eff43daf5 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -11,7 +11,7 @@ , tcl ? null, tk ? null, tix ? null, libX11 ? null, xorgproto ? null, x11Support ? false , zlib , self -, CF, configd +, configd , python-setup-hook , nukeReferences # For the Python package set @@ -57,10 +57,10 @@ let pythonForBuild ]; - buildInputs = filter (p: p != null) [ + buildInputs = filter (p: p != null) ([ zlib bzip2 expat lzma libffi gdbm sqlite readline ncurses openssl ] ++ optionals x11Support [ tcl tk libX11 xorgproto ] - ++ optionals stdenv.isDarwin [ CF configd ]; + ++ optionals stdenv.isDarwin [ configd ]); hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false); diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix index caf2e13bdf6..367a6194ecf 100644 --- a/pkgs/development/interpreters/python/default.nix +++ b/pkgs/development/interpreters/python/default.nix @@ -57,7 +57,7 @@ in { suffix = ""; }; sha256 = "0hds28cg226m8j8sr394nm9yc4gxhvlv109w0avsf2mxrlrz0hsd"; - inherit (darwin) CF configd; + inherit (darwin) configd; inherit passthruFun; }; @@ -70,7 +70,7 @@ in { suffix = ""; }; sha256 = "0jdh9pvx6m6lfz2liwvvhn7vks7qrysqgwn517fkpxb77b33fjn2"; - inherit (darwin) CF configd; + inherit (darwin) configd; inherit passthruFun; }; @@ -83,7 +83,7 @@ in { suffix = ""; }; sha256 = "1pj0mz1xl27khi250p29c0y99vxg662js8zp71aprkf8i8wkr0qa"; - inherit (darwin) CF configd; + inherit (darwin) configd; inherit passthruFun; }; @@ -96,7 +96,7 @@ in { suffix = ""; }; sha256 = "0gskry19ylw91p38pdq36qcgk6h3x5i4ia0ik977kw2943kwr8jm"; - inherit (darwin) CF configd; + inherit (darwin) configd; inherit passthruFun; }; @@ -109,7 +109,7 @@ in { suffix = ""; }; sha256 = "1s4lwn5vzsajlc88m6hkghsvnjw4d00l2dsgng0m2w6vyqbl32bm"; - inherit (darwin) CF configd; + inherit (darwin) configd; inherit passthruFun; }; @@ -122,7 +122,7 @@ in { suffix = "a2"; }; sha256 = "02a301bdcldin05ksdg8xw8xr6gdkpf73p0cabvn9rdl6yhkr3q8"; - inherit (darwin) CF configd; + inherit (darwin) configd; inherit passthruFun; }; @@ -136,6 +136,7 @@ in { ncurses = null; gdbm = null; sqlite = null; + configd = null; stripConfig = true; stripIdlelib = true; stripTests = true; diff --git a/pkgs/development/libraries/boxfort/default.nix b/pkgs/development/libraries/boxfort/default.nix index 95c1afd090f..fb6e735c46e 100644 --- a/pkgs/development/libraries/boxfort/default.nix +++ b/pkgs/development/libraries/boxfort/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { doCheck = true; preCheck = '' - export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=`pwd`''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH ''; outputs = [ "dev" "out" ]; diff --git a/pkgs/development/libraries/caf/default.nix b/pkgs/development/libraries/caf/default.nix index ecf991cb59c..e32ec169579 100644 --- a/pkgs/development/libraries/caf/default.nix +++ b/pkgs/development/libraries/caf/default.nix @@ -22,8 +22,8 @@ stdenv.mkDerivation rec { doCheck = true; checkTarget = "test"; preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib - export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PWD/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD/lib ''; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/criterion/default.nix b/pkgs/development/libraries/criterion/default.nix index c2721d3839a..3dc4b462404 100644 --- a/pkgs/development/libraries/criterion/default.nix +++ b/pkgs/development/libraries/criterion/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DCTESTS=ON" ]; doCheck = true; preCheck = '' - export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=`pwd`''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH ''; checkTarget = "criterion_tests test"; diff --git a/pkgs/development/libraries/cutelyst/default.nix b/pkgs/development/libraries/cutelyst/default.nix index 6cd464e5539..2cf611eed27 100644 --- a/pkgs/development/libraries/cutelyst/default.nix +++ b/pkgs/development/libraries/cutelyst/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { ]; preBuild = '' - export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pwd`/Cutelyst:`pwd`/EventLoopEPoll" + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}`pwd`/Cutelyst:`pwd`/EventLoopEPoll" ''; postBuild = '' diff --git a/pkgs/development/libraries/exiv2/default.nix b/pkgs/development/libraries/exiv2/default.nix index 21f63e07335..425346df816 100644 --- a/pkgs/development/libraries/exiv2/default.nix +++ b/pkgs/development/libraries/exiv2/default.nix @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { ''} ${stdenv.lib.optionalString stdenv.isDarwin '' - export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:`pwd`/lib + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}`pwd`/lib # Removing tests depending on charset conversion substituteInPlace ../test/Makefile --replace "conversions.sh" "" rm -f ../tests/bugfixes/redmine/test_issue_460.py diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 9c2da3c5b69..0ecbb35c167 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -1,6 +1,8 @@ { stdenv, fetchurl, nixosTests, fixDarwinDylibNames, meson, ninja, pkgconfig, gettext, python3, libxml2, libxslt, docbook_xsl , docbook_xml_dtd_43, gtk-doc, glib, libtiff, libjpeg, libpng, libX11, gnome3 -, gobject-introspection, doCheck ? false, makeWrapper }: +, gobject-introspection, doCheck ? false, makeWrapper +, fetchpatch +}: let pname = "gdk-pixbuf"; @@ -16,6 +18,12 @@ in stdenv.mkDerivation rec { patches = [ # Move installed tests to a separate output ./installed-tests-path.patch + # Temporary until the fix is released. + (fetchpatch { + name = "tests-circular-table.patch"; + url = "https://gitlab.gnome.org/GNOME/gdk-pixbuf/merge_requests/59.diff"; + sha256 = "0kaflac3mrh6031hwxk7j9fhli775hc503818h8zfl6b28zyn93f"; + }) ]; outputs = [ "out" "dev" "man" "devdoc" "installedTests" ]; diff --git a/pkgs/development/libraries/glib-networking/default.nix b/pkgs/development/libraries/glib-networking/default.nix index 63a773522a0..86f73e23d50 100644 --- a/pkgs/development/libraries/glib-networking/default.nix +++ b/pkgs/development/libraries/glib-networking/default.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { pname = "glib-networking"; - version = "2.62.2"; + version = "2.62.3"; outputs = [ "out" "installedTests" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "0i2mw75297ql72h47vyvff3hqa0kcmqybblj52fqrarb0kfbhi06"; + sha256 = "1xvzixzwwh8wk8f79qbm2gl7hp3hj1a7skv281v5qsx74dpzi8cc"; }; patches = [ diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 4a7d6cce90b..18756213230 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -160,7 +160,7 @@ stdenv.mkDerivation rec { checkInputs = [ tzdata libxml2 desktop-file-utils shared-mime-info ]; preCheck = optionalString doCheck '' - export LD_LIBRARY_PATH="$NIX_BUILD_TOP/${pname}-${version}/glib/.libs:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="$NIX_BUILD_TOP/${pname}-${version}/glib/.libs''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" export TZDIR="${tzdata}/share/zoneinfo" export XDG_CACHE_HOME="$TMP" export XDG_RUNTIME_HOME="$TMP" diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 32be2205bcc..458745694bc 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -97,6 +97,15 @@ stdenv.mkDerivation ({ ./CVE-2018-11236.patch # https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f51c8367685dc888a02f7304c729ed5277904aff ./CVE-2018-11237.patch + + # Remove after upgrading to glibc 2.28+ + # Change backported from upstream + # https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9c79cec8cd2a6996a73aa83d79b360ffd4bebde6 + ./fix-out-of-bounds-access-in-findidxwc.patch + + # Remove after upgrading to glibc 2.28+ + # https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=21526a507df8f1b2e37492193a754534d8938c0b + ./fix-out-of-bounds-access-in-ibm-1390-converter.patch ] ++ lib.optionals stdenv.isx86_64 [ ./fix-x64-abi.patch diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 1a17595a1a3..9327e0d936c 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -49,20 +49,17 @@ callPackage ./common.nix { inherit stdenv; } { ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie"; 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 (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") - ])); + (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") + (stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + # Ignore "error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location'" + # New warning as of GCC 9 + "-Wno-error=missing-attributes" + ]) + ]); # 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 diff --git a/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-findidxwc.patch b/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-findidxwc.patch new file mode 100644 index 00000000000..2d1ac0bc3af --- /dev/null +++ b/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-findidxwc.patch @@ -0,0 +1,26 @@ +diff -ur glibc-2.27/locale/weightwc.h glibc-2.27-patched/locale/weightwc.h +--- glibc-2.27/locale/weightwc.h 2018-02-02 01:17:18.000000000 +0900 ++++ glibc-2.27-patched/locale/weightwc.h 2020-01-12 04:54:16.044440602 +0900 +@@ -94,19 +94,19 @@ + if (cp[cnt] != usrc[cnt]) + break; + +- if (cnt < nhere - 1) ++ if (cnt < nhere - 1 || cnt == len) + { + cp += 2 * nhere; + continue; + } + +- if (cp[nhere - 1] > usrc[nhere -1]) ++ if (cp[nhere - 1] > usrc[nhere - 1]) + { + cp += 2 * nhere; + continue; + } + +- if (cp[2 * nhere - 1] < usrc[nhere -1]) ++ if (cp[2 * nhere - 1] < usrc[nhere - 1]) + { + cp += 2 * nhere; + continue; diff --git a/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-ibm-1390-converter.patch b/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-ibm-1390-converter.patch new file mode 100644 index 00000000000..8b560566a49 --- /dev/null +++ b/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-ibm-1390-converter.patch @@ -0,0 +1,35 @@ +From 21526a507df8f1b2e37492193a754534d8938c0b Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Tue, 24 Jul 2018 14:08:34 +0200 +Subject: [PATCH] Fix out-of-bounds access in IBM-1390 converter (bug 23448) + +The IBM-1390 converter can consume/produce two UCS4 characters in each +loop. +--- + ChangeLog | 6 ++++++ + iconvdata/ibm1364.c | 2 ++ + 2 files changed, 8 insertions(+) + +diff --git a/iconvdata/ibm1364.c b/iconvdata/ibm1364.c +index b833273..517fe60 100644 +--- a/iconvdata/ibm1364.c ++++ b/iconvdata/ibm1364.c +@@ -150,6 +150,7 @@ enum + #define MIN_NEEDED_INPUT MIN_NEEDED_FROM + #define MAX_NEEDED_INPUT MAX_NEEDED_FROM + #define MIN_NEEDED_OUTPUT MIN_NEEDED_TO ++#define MAX_NEEDED_OUTPUT MAX_NEEDED_TO + #define LOOPFCT FROM_LOOP + #define BODY \ + { \ +@@ -296,6 +297,7 @@ enum + + /* Next, define the other direction. */ + #define MIN_NEEDED_INPUT MIN_NEEDED_TO ++#define MAX_NEEDED_INPUT MAX_NEEDED_TO + #define MIN_NEEDED_OUTPUT MIN_NEEDED_FROM + #define MAX_NEEDED_OUTPUT MAX_NEEDED_FROM + #define LOOPFCT TO_LOOP +-- +2.9.3 + diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index abcd3abaf30..dfec171f1db 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { ''; preBuild = '' - export LD_LIBRARY_PATH=$(pwd):$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=$(pwd)''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH ''; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=unknown-warning-option"; diff --git a/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix b/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix index c70e898a47d..e69e584b23d 100644 --- a/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix +++ b/pkgs/development/libraries/gstreamer/legacy/gstreamer/default.nix @@ -1,5 +1,5 @@ { fetchurl, fetchpatch, stdenv, autoreconfHook -, perl, bison2, flex, pkgconfig, glib, libxml2, libintl, libunwind +, perl, bison, flex, pkgconfig, glib, libxml2, libintl, libunwind }: stdenv.mkDerivation rec { @@ -15,11 +15,15 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = [ autoreconfHook flex perl pkgconfig libintl bison2 glib ]; + nativeBuildInputs = [ autoreconfHook flex perl pkgconfig libintl bison glib ]; buildInputs = stdenv.lib.optional stdenv.isDarwin libunwind; propagatedBuildInputs = [ glib libxml2 ]; patches = [ + (fetchpatch { + url = "https://github.com/flathub/com.xnview.XnRetro/raw/fec03bbe240f45aa10d7d4eea9d6f066d9b6ac9c/gstreamer-0.10.36-bison3.patch"; + sha256 = "05aarg3yzl5jx3z5838ixv392g0r3kbsi2vfqniaxmidhnfzij2y"; + }) (fetchpatch { url = "https://github.com/GStreamer/common/commit/03a0e5736761a72d4ed880e8c485bbf9e4a8ea47.patch"; sha256 = "0rin3x01yy78ky3smmhbwlph18hhym18q4x9w6ddiqajg5lk4xhm"; diff --git a/pkgs/development/libraries/gtk/3.x.nix b/pkgs/development/libraries/gtk/3.x.nix index 60432614433..92963626709 100644 --- a/pkgs/development/libraries/gtk/3.x.nix +++ b/pkgs/development/libraries/gtk/3.x.nix @@ -48,7 +48,7 @@ with stdenv.lib; stdenv.mkDerivation rec { pname = "gtk+3"; - version = "3.24.12"; + version = "3.24.13"; outputs = [ "out" "dev" ] ++ optional withGtkDoc "devdoc"; outputBin = "dev"; @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnome/sources/gtk+/${stdenv.lib.versions.majorMinor version}/gtk+-${version}.tar.xz"; - sha256 = "10xyyhlfb0yk4hglngxh2zsv9xrxkqv343df8h01dvagc6jyp10k"; + sha256 = "1a9hi7k59q0kqx0n3xhsk1ly23w9g9ncllnay1756g0yrww5qxsc"; }; patches = [ diff --git a/pkgs/development/libraries/jsoncpp/default.nix b/pkgs/development/libraries/jsoncpp/default.nix index 72158e186ac..7b06cc8ad4e 100644 --- a/pkgs/development/libraries/jsoncpp/default.nix +++ b/pkgs/development/libraries/jsoncpp/default.nix @@ -23,9 +23,9 @@ stdenv.mkDerivation rec { # Hack to be able to run the test, broken because we use # CMAKE_SKIP_BUILD_RPATH to avoid cmake resetting rpath on install preBuild = if stdenv.isDarwin then '' - export DYLD_LIBRARY_PATH="`pwd`/src/lib_json:$DYLD_LIBRARY_PATH" + export DYLD_LIBRARY_PATH="`pwd`/src/lib_json''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH" '' else '' - export LD_LIBRARY_PATH="`pwd`/src/lib_json:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="`pwd`/src/lib_json''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" ''; nativeBuildInputs = [ cmake python ]; diff --git a/pkgs/development/libraries/libarchive/default.nix b/pkgs/development/libraries/libarchive/default.nix index e3927f34fab..04b4e409b9b 100644 --- a/pkgs/development/libraries/libarchive/default.nix +++ b/pkgs/development/libraries/libarchive/default.nix @@ -10,13 +10,13 @@ assert xarSupport -> libxml2 != null; stdenv.mkDerivation rec { pname = "libarchive"; - version = "3.4.0"; + version = "3.4.1"; src = fetchFromGitHub { owner = "libarchive"; repo = "libarchive"; rev = "v${version}"; - sha256 = "063f5bw9qmksj3iy6094qxwawx174cx00q1fg6l698wqw7xn8ihq"; + sha256 = "0g0kzfl01zy1aabr5jcrh8480mb16vh3pacdhg6mm2bdv2f5w8z1"; }; outputs = [ "out" "lib" "dev" ]; diff --git a/pkgs/development/libraries/libedit/default.nix b/pkgs/development/libraries/libedit/default.nix index 97532d61618..b83984e23c8 100644 --- a/pkgs/development/libraries/libedit/default.nix +++ b/pkgs/development/libraries/libedit/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "libedit"; - version = "20191025-3.1"; + version = "20191231-3.1"; src = fetchurl { url = "https://thrysoee.dk/editline/${pname}-${version}.tar.gz"; - sha256 = "0fdznw6fklis39xqk30ihw8dl8kdw9fzq1z42jmbyy6lc1k07zvd"; + sha256 = "0wch48nml28jj6ild889745dsg2agm7mpvrmbl1gi98nw6vjrf6v"; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/libtins/default.nix b/pkgs/development/libraries/libtins/default.nix index c90cff31677..60bb092c6fa 100644 --- a/pkgs/development/libraries/libtins/default.nix +++ b/pkgs/development/libraries/libtins/default.nix @@ -32,8 +32,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; doCheck = true; preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD${placeholder "out"}/lib - export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PWD${placeholder "out"}/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD${placeholder "out"}/lib + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD${placeholder "out"}/lib ''; checkTarget = "tests test"; diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index 57a7294c887..42515b7373c 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -32,7 +32,6 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" "man" "doc" ] ++ lib.optional pythonSupport "py" ++ lib.optional (enableStatic && enableShared) "static"; - propagatedBuildOutputs = [ "out" "bin" ] ++ lib.optional pythonSupport "py"; buildInputs = lib.optional pythonSupport python ++ lib.optional (pythonSupport && python?isPy3 && python.isPy3) ncurses diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 761d6594bd0..c041507b2ec 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -27,7 +27,7 @@ with stdenv.lib; let - version = "19.3.1"; + version = "19.3.2"; branch = versions.major version; in @@ -42,7 +42,7 @@ stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" "https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz" ]; - sha256 = "0ndfpqry08s74yw4x3ydyhim6v4ywg0b4yhaazq7zaankjv1v5fd"; + sha256 = "1hg1gvcwvayksrdh9z8rfz66h3z1ffspmm2qgyy2nd8n8qrfwfjf"; }; prePatch = "patchShebangs ."; diff --git a/pkgs/development/libraries/orcania/default.nix b/pkgs/development/libraries/orcania/default.nix index bc27011c588..2f8765f9a72 100644 --- a/pkgs/development/libraries/orcania/default.nix +++ b/pkgs/development/libraries/orcania/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { doCheck = true; preCheck = '' - export LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="$(pwd)''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" export DYLD_FALLBACK_LIBRARY_PATH="$(pwd):$DYLD_FALLBACK_LIBRARY_PATH" ''; diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 25953949eb7..379f5b3d80e 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -125,7 +125,7 @@ stdenv.mkDerivation rec { ]; preConfigure = '' - export LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="`pwd`/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" configureFlags+=" -docdir $out/share/doc/${name} -plugindir $out/lib/qt4/plugins diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index bc23d0f9caf..930c59d347b 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -164,7 +164,7 @@ stdenv.mkDerivation { setOutputFlags = false; preConfigure = '' - export LD_LIBRARY_PATH="$PWD/lib:$PWD/plugins/platforms:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="$PWD/lib:$PWD/plugins/platforms''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" ${lib.optionalString (compareVersion "5.9.0" < 0) '' # We need to set LD to CXX or otherwise we get nasty compile errors export LD=$CXX diff --git a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix index 542afdd55da..1133623483a 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebkit.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebkit.nix @@ -2,7 +2,7 @@ , qtbase, qtdeclarative, qtlocation, qtmultimedia, qtsensors, qtwebchannel , fontconfig, gtk2, libwebp, libxml2, libxslt , sqlite, systemd, glib, gst_all_1, cmake -, bison2, flex, gdb, gperf, perl, pkgconfig, python2, ruby +, bison, flex, gdb, gperf, perl, pkgconfig, python2, ruby , darwin , flashplayerFix ? false }: @@ -31,7 +31,7 @@ qtModule { ++ optionals (stdenv.isDarwin) (with darwin; with apple_sdk.frameworks; [ ICU OpenGL ]) ++ optional usingAnnulenWebkitFork hyphen; nativeBuildInputs = [ - bison2 flex gdb gperf perl pkgconfig python2 ruby + bison flex gdb gperf perl pkgconfig python2 ruby ] ++ optional usingAnnulenWebkitFork cmake; cmakeFlags = optionals usingAnnulenWebkitFork ([ "-DPORT=Qt" ] diff --git a/pkgs/development/libraries/science/math/arpack/default.nix b/pkgs/development/libraries/science/math/arpack/default.nix index 36576de0563..89f3aa94247 100644 --- a/pkgs/development/libraries/science/math/arpack/default.nix +++ b/pkgs/development/libraries/science/math/arpack/default.nix @@ -30,9 +30,9 @@ stdenv.mkDerivation { ]; preCheck = if stdenv.isDarwin then '' - export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:`pwd`/lib + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}`pwd`/lib '' else '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}`pwd`/lib '' + '' # Prevent tests from using all cores export OMP_NUM_THREADS=2 diff --git a/pkgs/development/libraries/science/math/scalapack/default.nix b/pkgs/development/libraries/science/math/scalapack/default.nix index bff0d9a85fa..fda902f320c 100644 --- a/pkgs/development/libraries/science/math/scalapack/default.nix +++ b/pkgs/development/libraries/science/math/scalapack/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { # Run single threaded export OMP_NUM_THREADS=1 - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/lib + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}`pwd`/lib ''; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/srtp/default.nix b/pkgs/development/libraries/srtp/default.nix index 129d57904d1..a906939f529 100644 --- a/pkgs/development/libraries/srtp/default.nix +++ b/pkgs/development/libraries/srtp/default.nix @@ -5,13 +5,13 @@ with stdenv.lib; stdenv.mkDerivation rec { pname = "libsrtp"; - version = "2.2.0"; + version = "2.3.0"; src = fetchFromGitHub { owner = "cisco"; repo = "libsrtp"; rev = "v${version}"; - sha256 = "1ac7xs1djb03j131f1gmqyfmrplblid9qqyxahs0shdy707r5ll6"; + sha256 = "1f7i3jdh1wzdv7zjlz7gs3xw5jqig9zw8z9awsqqcp54f94xdpvd"; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/development/libraries/x264/default.nix b/pkgs/development/libraries/x264/default.nix index 9998add0d93..2757ca7704c 100644 --- a/pkgs/development/libraries/x264/default.nix +++ b/pkgs/development/libraries/x264/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, nasm }: +{ stdenv, lib, fetchurl, nasm }: stdenv.mkDerivation rec { pname = "x264"; @@ -9,6 +9,10 @@ stdenv.mkDerivation rec { sha256 = "1xv41z04km3rf374xk3ny7v8ibr211ph0j5am0909ln63mphc48f"; }; + # Upstream ./configure greps for (-mcpu|-march|-mfpu) in CFLAGS, which in nix + # is put in the cc wrapper anyway. + patches = [ ./disable-arm-neon-default.patch ]; + postPatch = '' patchShebangs . ''; @@ -17,15 +21,16 @@ stdenv.mkDerivation rec { outputs = [ "out" "lib" "dev" ]; - preConfigure = '' + preConfigure = lib.optionalString (stdenv.buildPlatform.isx86_64 || stdenv.hostPlatform.isi686) '' # `AS' is set to the binutils assembler, but we need nasm unset AS ''; configureFlags = [ "--enable-shared" ] - ++ stdenv.lib.optional (!stdenv.isi686) "--enable-pic"; + ++ stdenv.lib.optional (!stdenv.isi686) "--enable-pic" + ++ stdenv.lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--cross-prefix=${stdenv.cc.targetPrefix}"; - nativeBuildInputs = [ nasm ]; + nativeBuildInputs = lib.optional (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isi686) nasm; meta = with stdenv.lib; { description = "Library for encoding H264/AVC video streams"; diff --git a/pkgs/development/libraries/x264/disable-arm-neon-default.patch b/pkgs/development/libraries/x264/disable-arm-neon-default.patch new file mode 100644 index 00000000000..6971944abb4 --- /dev/null +++ b/pkgs/development/libraries/x264/disable-arm-neon-default.patch @@ -0,0 +1,13 @@ +diff -Naur x264-snapshot-20190517-2245-stable-orig/configure x264-snapshot-20190517-2245-stable/configure +--- x264-snapshot-20190517-2245-stable-orig/configure 2020-01-03 19:51:03.041037657 -0500 ++++ x264-snapshot-20190517-2245-stable/configure 2020-01-03 19:52:15.075034609 -0500 +@@ -930,9 +930,6 @@ + fi + + if [ $asm = auto -a $ARCH = ARM ] ; then +- # set flags so neon is built by default +- [ $compiler == CL ] || echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon" +- + cc_check '' '' '__asm__("add r0, r1, r2");' && define HAVE_ARM_INLINE_ASM + if [ $compiler = CL ] && cpp_check '' '' 'defined(_M_ARM) && _M_ARM >= 7' ; then + define HAVE_ARMV6 diff --git a/pkgs/development/libraries/yder/default.nix b/pkgs/development/libraries/yder/default.nix index 7025fd2eb1c..5ddb1d1a131 100644 --- a/pkgs/development/libraries/yder/default.nix +++ b/pkgs/development/libraries/yder/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { doCheck = true; preCheck = '' - export LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="$(pwd)''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" export DYLD_FALLBACK_LIBRARY_PATH="$(pwd):$DYLD_FALLBACK_LIBRARY_PATH" ''; diff --git a/pkgs/development/pharo/vm/build-vm.nix b/pkgs/development/pharo/vm/build-vm.nix index 5fc747cbc8c..38516cc1914 100644 --- a/pkgs/development/pharo/vm/build-vm.nix +++ b/pkgs/development/pharo/vm/build-vm.nix @@ -117,7 +117,7 @@ stdenv.mkDerivation rec { cat > "$out/bin/${cmd}" <conversion; - #if USE_SNPRINTF --# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) -+# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || (defined __APPLE__ && defined __MACH__)) - fbp[1] = '%'; - fbp[2] = 'n'; - fbp[3] = '\0'; diff --git a/pkgs/development/tools/parsing/bison/3.x.nix b/pkgs/development/tools/parsing/bison/default.nix similarity index 100% rename from pkgs/development/tools/parsing/bison/3.x.nix rename to pkgs/development/tools/parsing/bison/default.nix diff --git a/pkgs/development/tools/phantomjs2/default.nix b/pkgs/development/tools/phantomjs2/default.nix index f50e7670b46..b18bd0104ce 100644 --- a/pkgs/development/tools/phantomjs2/default.nix +++ b/pkgs/development/tools/phantomjs2/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, fetchpatch -, bison2, flex, fontconfig, freetype, gperf, icu, openssl, libjpeg +, bison, flex, fontconfig, freetype, gperf, icu, openssl, libjpeg , libpng, perl, python, ruby, sqlite, qtwebkit, qmake, qtbase , darwin, writeScriptBin, cups, makeWrapper }: @@ -27,7 +27,7 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ qmake ]; buildInputs = [ - bison2 flex fontconfig freetype gperf icu openssl + bison flex fontconfig freetype gperf icu openssl libjpeg libpng perl python ruby sqlite qtwebkit qtbase makeWrapper ] ++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ diff --git a/pkgs/games/dwarf-fortress/dfhack/default.nix b/pkgs/games/dwarf-fortress/dfhack/default.nix index 544fa26b21c..5706337dffd 100644 --- a/pkgs/games/dwarf-fortress/dfhack/default.nix +++ b/pkgs/games/dwarf-fortress/dfhack/default.nix @@ -109,7 +109,7 @@ let ''; preBuild = '' - export LD_LIBRARY_PATH="$PWD/depends/protobuf:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="$PWD/depends/protobuf''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" ''; cmakeFlags = [ "-DDFHACK_BUILD_ARCH=${arch}" "-DDOWNLOAD_RUBY=OFF" ] diff --git a/pkgs/games/dwarf-fortress/wrapper/dfhack.in b/pkgs/games/dwarf-fortress/wrapper/dfhack.in index 4cf884ebed2..026b33ab87b 100644 --- a/pkgs/games/dwarf-fortress/wrapper/dfhack.in +++ b/pkgs/games/dwarf-fortress/wrapper/dfhack.in @@ -7,5 +7,5 @@ for i in dfhack.init-example dfhack-config/default hack/* stonesense/*; do done cd "$DF_DIR" -LD_LIBRARY_PATH="$env_dir/hack/libs:$env_dir/hack:$LD_LIBRARY_PATH" \ +LD_LIBRARY_PATH="$env_dir/hack/libs:$env_dir/hack${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \ LD_PRELOAD="$env_dir/hack/libdfhack.so:$LD_PRELOAD" exec $env_dir/libs/Dwarf_Fortress "$@" diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix index 9229f4fbc93..4245704575c 100644 --- a/pkgs/games/steam/chrootenv.nix +++ b/pkgs/games/steam/chrootenv.nix @@ -53,7 +53,7 @@ let echo "$runtime_paths" exit 0 fi - export LD_LIBRARY_PATH="$runtime_paths:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="$runtime_paths''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" exec "$@" ''; @@ -260,7 +260,7 @@ in buildFHSUserEnv rec { exit 1 fi shift - ${lib.optionalString (!nativeOnly) "export LD_LIBRARY_PATH=/lib32:/lib64:${lib.concatStringsSep ":" ldPath}:$LD_LIBRARY_PATH"} + ${lib.optionalString (!nativeOnly) "export LD_LIBRARY_PATH=/lib32:/lib64:${lib.concatStringsSep ":" ldPath}\${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"} exec -- "$run" "$@" ''; }; diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index c3914777c6d..aef7341e5e9 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, xar, cpio, pkgs, python, pbzx, lib }: +{ stdenv, fetchurl, xar, cpio, pkgs, python3, pbzx, lib }: let # sadly needs to be exported because security_tool needs it @@ -16,7 +16,7 @@ let sha256 = "13xq34sb7383b37hwy076gnhf96prpk1b4087p87xnwswxbrisih"; }; - buildInputs = [ xar cpio python pbzx ]; + nativeBuildInputs = [ xar cpio python3 pbzx ]; outputs = [ "out" "dev" "man" ]; diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix index afa5dc1c08c..da2d0c5dc7b 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix @@ -1,9 +1,11 @@ { appleDerivation, lib, bootstrap_cmds, bison, flex -, gnum4, unifdef, perl, python +, gnum4, unifdef, perl, python3 , headersOnly ? true }: appleDerivation ({ - nativeBuildInputs = [ bootstrap_cmds bison flex gnum4 unifdef perl python ]; + nativeBuildInputs = [ bootstrap_cmds bison flex gnum4 unifdef perl python3 ]; + + patches = [ ./python3.patch ]; postPatch = '' substituteInPlace Makefile \ diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/python3.patch b/pkgs/os-specific/darwin/apple-source-releases/xnu/python3.patch new file mode 100644 index 00000000000..10778406c8e --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/python3.patch @@ -0,0 +1,41 @@ +diff --git a/bsd/kern/makekdebugevents.py b/bsd/kern/makekdebugevents.py +index 73b2db4..d354ba0 100755 +--- a/bsd/kern/makekdebugevents.py ++++ b/bsd/kern/makekdebugevents.py +@@ -5,7 +5,7 @@ + # named kd_events[] or these mappings. + # Required to generate a header file used by DEVELOPMENT and DEBUG kernels. + # +- ++ + import sys + import re + +@@ -21,18 +21,18 @@ code_table = [] + # scan file to generate internal table + with open(trace_code_file, 'rt') as codes: + for line in codes: +- m = id_name_pattern.match(line) +- if m: ++ m = id_name_pattern.match(line) ++ if m: + code_table += [(int(m.group(1),base=16), m.group(2))] + + # emit typedef: +-print "typedef struct {" +-print " uint32_t id;" +-print " const char *name;" +-print "} kd_event_t;" ++print("typedef struct {") ++print(" uint32_t id;") ++print(" const char *name;") ++print("} kd_event_t;") + # emit structure declaration and sorted initialization: +-print "kd_event_t kd_events[] = {" ++print("kd_event_t kd_events[] = {") + for mapping in sorted(code_table, key=lambda x: x[0]): +- print " {0x%x, \"%s\"}," % mapping +-print "};" ++ print(" {0x%x, \"%s\"}," % mapping) ++print("};") + diff --git a/pkgs/os-specific/darwin/iproute2mac/default.nix b/pkgs/os-specific/darwin/iproute2mac/default.nix index be855498307..e82636fce1f 100644 --- a/pkgs/os-specific/darwin/iproute2mac/default.nix +++ b/pkgs/os-specific/darwin/iproute2mac/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, darwin, python }: +{ stdenv, fetchFromGitHub, darwin, python2 }: stdenv.mkDerivation rec { version = "1.2.1"; @@ -11,11 +11,11 @@ stdenv.mkDerivation rec { sha256 = "1n6la7blbxza2m79cpnywsavhzsdv4gzdxrkly4dppyidjg6jy1h"; }; - buildInputs = [ python ]; + buildInputs = [ python2 ]; postPatch = '' substituteInPlace src/ip.py \ - --replace /usr/bin/python ${python}/bin/python \ + --replace /usr/bin/python ${python2}/bin/python \ --replace /sbin/ifconfig ${darwin.network_cmds}/bin/ifconfig \ --replace /sbin/route ${darwin.network_cmds}/bin/route \ --replace /usr/sbin/netstat ${darwin.network_cmds}/bin/netstat \ diff --git a/pkgs/os-specific/darwin/libtapi/default.nix b/pkgs/os-specific/darwin/libtapi/default.nix index 2af1c5db2e3..182d1db3bfd 100644 --- a/pkgs/os-specific/darwin/libtapi/default.nix +++ b/pkgs/os-specific/darwin/libtapi/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, python, clang_6 }: +{ lib, stdenv, fetchFromGitHub, cmake, python3, clang_6 }: stdenv.mkDerivation { name = "libtapi-1000.10.8"; @@ -9,7 +9,7 @@ stdenv.mkDerivation { sha256 = "1a19h39a48agvnmal99n9j1fjadiqwib7hfzmn342wmgh9z3vk0g"; }; - nativeBuildInputs = [ cmake python ]; + nativeBuildInputs = [ cmake python3 ]; buildInputs = [ clang_6.cc ]; preConfigure = '' diff --git a/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix b/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix index 4f2f84b3c0a..059cb70bfbd 100644 --- a/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix +++ b/pkgs/os-specific/darwin/swift-corelibs/corefoundation.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fetchurl, python, ninja, libxml2, objc4, ICU, curl }: +{ stdenv, fetchFromGitHub, fetchurl, ninja, python3, curl, libxml2, objc4, ICU }: let # 10.12 adds a new sysdir.h that our version of CF in the main derivation depends on, but @@ -20,8 +20,8 @@ stdenv.mkDerivation { sha256 = "17kpql0f27xxz4jjw84vpas5f5sn4vdqwv10g151rc3rswbwln1z"; }; - nativeBuildInputs = [ ninja python ]; - buildInputs = [ libxml2 objc4 ICU curl ]; + nativeBuildInputs = [ ninja python3 ]; + buildInputs = [ curl libxml2 objc4 ICU ]; sourceRoot = "source/CoreFoundation"; diff --git a/pkgs/os-specific/linux/ati-drivers/builder.sh b/pkgs/os-specific/linux/ati-drivers/builder.sh index 09d218e8745..a9e5aaef397 100644 --- a/pkgs/os-specific/linux/ati-drivers/builder.sh +++ b/pkgs/os-specific/linux/ati-drivers/builder.sh @@ -285,7 +285,7 @@ if test -z "$libsOnly"; then for prog in $BIN/*; do cp -f $prog $out/bin && patchelf --set-interpreter $(echo $glibcDir/lib/ld-linux*.so.2) $out/bin/$(basename $prog) && - wrapProgram $out/bin/$(basename $prog) --prefix LD_LIBRARY_PATH : $out/lib/:$gcc/lib/:$out/share/ati/:$libXinerama/lib/:$libXrandr/lib/:$libfontconfig/lib/:$libfreetype/lib/:$LD_LIBRARY_PATH + wrapProgram $out/bin/$(basename $prog) --prefix LD_LIBRARY_PATH : $out/lib/:$gcc/lib/:$out/share/ati/:$libXinerama/lib/:$libXrandr/lib/:$libfontconfig/lib/:$libfreetype/lib/${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH done } diff --git a/pkgs/os-specific/linux/firejail/default.nix b/pkgs/os-specific/linux/firejail/default.nix index 8200acf62b7..5a1337b0998 100644 --- a/pkgs/os-specific/linux/firejail/default.nix +++ b/pkgs/os-specific/linux/firejail/default.nix @@ -3,10 +3,10 @@ let s = # Generated upstream information rec { baseName="firejail"; - version="0.9.60"; + version="0.9.62"; name="${baseName}-${version}"; url="mirror://sourceforge/firejail/firejail/firejail-${version}.tar.xz"; - sha256="1mw2s040wbxaj4lqfm6033wxrxlnix40mqc2bsfran5sj2gxd3sh"; + sha256="1q2silgy882fl61p5qa9f9jqkxcqnwa71jig3c729iahx4f0hs05"; }; buildInputs = [ which diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 4bd86a70267..4ce6a37e689 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -24,6 +24,13 @@ let # configuration items have to be part of a subattrs flattenKConf = nested: mapAttrs (_: head) (zipAttrs (attrValues nested)); + whenPlatformHasEBPFJit = + mkIf (stdenv.hostPlatform.isAarch32 || + stdenv.hostPlatform.isAarch64 || + stdenv.hostPlatform.isx86_64 || + (stdenv.hostPlatform.isPowerPC && stdenv.hostPlatform.is64bit) || + (stdenv.hostPlatform.isMips && stdenv.hostPlatform.is64bit)); + options = { debug = { @@ -106,7 +113,12 @@ let IP_DCCP_CCID3 = no; # experimental CLS_U32_PERF = yes; CLS_U32_MARK = yes; - BPF_JIT = mkIf (stdenv.hostPlatform.system == "x86_64-linux") yes; + BPF_JIT = whenPlatformHasEBPFJit yes; + BPF_JIT_ALWAYS_ON = whenPlatformHasEBPFJit yes; + HAVE_EBPF_JIT = whenPlatformHasEBPFJit yes; + BPF_STREAM_PARSER = whenAtLeast "4.19" yes; + XDP_SOCKETS = whenAtLeast "4.19" yes; + XDP_SOCKETS_DIAG = whenAtLeast "4.19" yes; WAN = yes; # Required by systemd per-cgroup firewalling CGROUP_BPF = option yes; diff --git a/pkgs/os-specific/linux/libselinux/default.nix b/pkgs/os-specific/linux/libselinux/default.nix index 39e97f8473c..741c51e2233 100644 --- a/pkgs/os-specific/linux/libselinux/default.nix +++ b/pkgs/os-specific/linux/libselinux/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { "MAN3DIR=$(man)/share/man/man3" "MAN5DIR=$(man)/share/man/man5" "MAN8DIR=$(man)/share/man/man8" - "PYTHON=python" + "PYTHON=${python.pythonForBuild}/bin/python" "PYTHONLIBDIR=$(py)/${python.sitePackages}" "SBINDIR=$(bin)/sbin" "SHLIBDIR=$(out)/lib" diff --git a/pkgs/os-specific/linux/pam/default.nix b/pkgs/os-specific/linux/pam/default.nix index d1a035d7448..e4429cc3bd7 100644 --- a/pkgs/os-specific/linux/pam/default.nix +++ b/pkgs/os-specific/linux/pam/default.nix @@ -44,9 +44,7 @@ stdenv.mkDerivation rec { # which is done by dlopening $out/lib/security/pam_foo.so # $out/etc was also missed: pam_env(login:session): Unable to open config file - preConfigure = '' - configureFlags="$configureFlags --includedir=$out/include/security" - '' + stdenv.lib.optionalString (stdenv.hostPlatform.libc == "musl") '' + preConfigure = stdenv.lib.optionalString (stdenv.hostPlatform.libc == "musl") '' # export ac_cv_search_crypt=no # (taken from Alpine linux, apparently insecure but also doesn't build O:)) # disable insecure modules @@ -54,6 +52,15 @@ stdenv.mkDerivation rec { sed -e 's/pam_rhosts//g' -i modules/Makefile.in ''; + configureFlags = [ + "--includedir=${placeholder "out"}/include/security" + "--enable-sconfigdir=/etc/security" + ]; + + installFlags = [ + "SCONFIGDIR=${placeholder "out"}/etc/security" + ]; + doCheck = false; # fails meta = with stdenv.lib; { diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 214c9b75cea..2f8f898ceaf 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -30,7 +30,7 @@ let gnupg-minimal = gnupg.override { bzip2 = null; }; in stdenv.mkDerivation { - version = "243.3"; + version = "243.4"; pname = "systemd"; # When updating, use https://github.com/systemd/systemd-stable tree, not the development one! diff --git a/pkgs/os-specific/linux/tiscamera/default.nix b/pkgs/os-specific/linux/tiscamera/default.nix index dfcf4c9937b..387a3bcf2c6 100644 --- a/pkgs/os-specific/linux/tiscamera/default.nix +++ b/pkgs/os-specific/linux/tiscamera/default.nix @@ -84,7 +84,7 @@ stdenv.mkDerivation rec { # dependency on `libtcam` (which itself is built as part of this build). In order to allow # that, we set the dynamic linker's path to point on the build time location of the library. preBuild = '' - export LD_LIBRARY_PATH=$PWD/src:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=$PWD/src''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH ''; meta = with lib; { diff --git a/pkgs/servers/plex/default.nix b/pkgs/servers/plex/default.nix index 267bd4c2600..3d69d219780 100644 --- a/pkgs/servers/plex/default.nix +++ b/pkgs/servers/plex/default.nix @@ -97,6 +97,6 @@ buildFHSUserEnv { # Actually run Plex, prepending LD_LIBRARY_PATH with the libraries from # the Plex package. - LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$root exec "$root/Plex Media Server" + LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$root exec "$root/Plex Media Server" ''; } diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix index f83d76a3c2b..432d715b70d 100644 --- a/pkgs/servers/x11/xorg/default.nix +++ b/pkgs/servers/x11/xorg/default.nix @@ -950,11 +950,11 @@ lib.makeScope newScope (self: with self; { }) {}; libXpm = callPackage ({ stdenv, pkgconfig, fetchurl, libX11, libXext, xorgproto, libXt, gettext }: stdenv.mkDerivation { - name = "libXpm-3.5.12"; + name = "libXpm-3.5.13"; builder = ./builder.sh; src = fetchurl { - url = mirror://xorg/individual/lib/libXpm-3.5.12.tar.bz2; - sha256 = "1v5xaiw4zlhxspvx76y3hq4wpxv7mpj6parqnwdqvpj8vbinsspx"; + url = mirror://xorg/individual/lib/libXpm-3.5.13.tar.bz2; + sha256 = "09dc6nwlb2122h02vl64k9x56mxnyqz2gwpga0abfv4bb1bxmlcw"; }; hardeningDisable = [ "bindnow" "relro" ]; nativeBuildInputs = [ pkgconfig gettext ]; diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index 84bf23a0fde..7a9ffcfc646 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -261,11 +261,6 @@ self: super: }); libXpm = super.libXpm.overrideAttrs (attrs: { - name = "libXpm-3.5.12"; - src = fetchurl { - url = mirror://xorg/individual/lib/libXpm-3.5.12.tar.bz2; - sha256 = "1v5xaiw4zlhxspvx76y3hq4wpxv7mpj6parqnwdqvpj8vbinsspx"; - }; outputs = [ "bin" "dev" "out" ]; # tiny man in $bin patchPhase = "sed -i '/USE_GETTEXT_TRUE/d' sxpm/Makefile.in cxpm/Makefile.in"; }); diff --git a/pkgs/servers/x11/xorg/tarballs.list b/pkgs/servers/x11/xorg/tarballs.list index 2fcf09cd9fb..59d446d3a31 100644 --- a/pkgs/servers/x11/xorg/tarballs.list +++ b/pkgs/servers/x11/xorg/tarballs.list @@ -195,7 +195,7 @@ mirror://xorg/individual/lib/libXinerama-1.1.4.tar.bz2 mirror://xorg/individual/lib/libxkbfile-1.1.0.tar.bz2 mirror://xorg/individual/lib/libXmu-1.1.3.tar.bz2 mirror://xorg/individual/lib/libXp-1.0.3.tar.bz2 -mirror://xorg/individual/lib/libXpm-3.5.12.tar.bz2 +mirror://xorg/individual/lib/libXpm-3.5.13.tar.bz2 mirror://xorg/individual/lib/libXpresent-1.0.0.tar.bz2 mirror://xorg/individual/lib/libXrandr-1.5.2.tar.bz2 mirror://xorg/individual/lib/libXrender-0.9.10.tar.bz2 diff --git a/pkgs/shells/bash/4.4.nix b/pkgs/shells/bash/4.4.nix index 121368abf4c..7ca57ac0156 100644 --- a/pkgs/shells/bash/4.4.nix +++ b/pkgs/shells/bash/4.4.nix @@ -41,9 +41,10 @@ stdenv.mkDerivation rec { -DSSH_SOURCE_BASHRC ''; - patchFlags = [ "-p0" ]; + patchFlags = [ "-p0" "-T" ]; patches = upstreamPatches + ++ [ ./pgrp-pipe-4.4.patch ] ++ optional stdenv.hostPlatform.isCygwin ./cygwin-bash-4.4.11-2.src.patch # https://lists.gnu.org/archive/html/bug-bash/2016-10/msg00006.html ++ optional stdenv.hostPlatform.isMusl (fetchurl { diff --git a/pkgs/shells/bash/5.0.nix b/pkgs/shells/bash/5.0.nix index a06b08a5599..05aaf39b340 100644 --- a/pkgs/shells/bash/5.0.nix +++ b/pkgs/shells/bash/5.0.nix @@ -41,9 +41,10 @@ stdenv.mkDerivation rec { -DSSH_SOURCE_BASHRC ''; - patchFlags = [ "-p0" ]; + patchFlags = [ "-p0" "-T" ]; - patches = upstreamPatches; + patches = upstreamPatches + ++ [ ./pgrp-pipe-5.0.patch ]; configureFlags = [ (if interactive then "--with-installed-readline" else "--disable-readline") diff --git a/pkgs/shells/bash/pgrp-pipe-4.4.patch b/pkgs/shells/bash/pgrp-pipe-4.4.patch new file mode 100644 index 00000000000..ea3d7bdf92b --- /dev/null +++ b/pkgs/shells/bash/pgrp-pipe-4.4.patch @@ -0,0 +1,29 @@ +diff -u ./configure ../bash-4.4-fixed/configure +--- ./configure 2016-09-07 22:57:01.000000000 +0200 ++++ ../bash-4.4-fixed/configure 2020-01-08 14:10:26.316858174 +0100 +@@ -16064,10 +16064,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 2.[456789]*|[34]*) $as_echo "#define PGRP_PIPE 1" >>confdefs.h +- ;; +- esac ;; ++ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; + *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; + powerux*) LOCAL_LIBS="-lgen" ;; +diff -u ./configure.ac ../bash-4.4-fixed/configure.ac +--- ./configure.ac 2016-09-07 22:56:28.000000000 +0200 ++++ ../bash-4.4-fixed/configure.ac 2016-09-07 22:56:28.000000000 +0200 +@@ -1092,9 +1092,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 2.[[456789]]*|[[34]]*) AC_DEFINE(PGRP_PIPE) ;; +- esac ;; ++ AC_DEFINE(PGRP_PIPE) ;; + *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; + powerux*) LOCAL_LIBS="-lgen" ;; diff --git a/pkgs/shells/bash/pgrp-pipe-5.0.patch b/pkgs/shells/bash/pgrp-pipe-5.0.patch new file mode 100644 index 00000000000..2a9fa6f33c3 --- /dev/null +++ b/pkgs/shells/bash/pgrp-pipe-5.0.patch @@ -0,0 +1,31 @@ +diff -u ./configure ../bash-5.0-fixed/configure +--- ./configure 2019-01-02 15:43:31.000000000 +0100 ++++ ../bash-5.0-fixed/configure 2020-01-08 14:18:21.017296179 +0100 +@@ -16312,11 +16312,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[0123]*) : ;; +- *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h +- ;; +- esac ;; ++ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; + netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; + *qnx[67]*) LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; +diff -u ./configure.ac ../bash-5.0-fixed/configure.ac +--- ./configure.ac 2019-01-02 15:39:11.000000000 +0100 ++++ ../bash-5.0-fixed/configure.ac 2019-01-02 15:39:11.000000000 +0100 +@@ -1108,10 +1108,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[[0123]]*) : ;; +- *) AC_DEFINE(PGRP_PIPE) ;; +- esac ;; ++ AC_DEFINE(PGRP_PIPE) ;; + netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; + *qnx[[67]]*) LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 86a6e33c942..f73fca48b7a 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -190,13 +190,10 @@ in rec { useSharedLibraries = false; }; - python = super.callPackage ../../development/interpreters/python/cpython/2.7/boot.nix { - CF = null; # use CoreFoundation from bootstrap-tools - configd = null; - }; - python2 = self.python; + python3 = super.python3Minimal; ninja = super.ninja.override { buildDocs = false; }; + darwin = super.darwin // { cctools = super.darwin.cctools.override { enableTapiSupport = false; @@ -218,11 +215,11 @@ in rec { stage2 = prevStage: let persistent = self: super: with prevStage; { inherit - zlib patchutils m4 scons flex perl bison unifdef unzip openssl python + zlib patchutils m4 scons flex perl bison unifdef unzip openssl python3 libxml2 gettext sharutils gmp libarchive ncurses pkg-config libedit groff openssh sqlite sed serf openldap db cyrus-sasl expat apr-util subversion xz findfreetype libssh curl cmake autoconf automake libtool ed cpio coreutils - libssh2 nghttp2 libkrb5 python2 ninja; + libssh2 nghttp2 libkrb5 ninja; darwin = super.darwin // { inherit (darwin) @@ -252,11 +249,11 @@ in rec { stage3 = prevStage: let persistent = self: super: with prevStage; { inherit - patchutils m4 scons flex perl bison unifdef unzip openssl python + patchutils m4 scons flex perl bison unifdef unzip openssl python3 gettext sharutils libarchive pkg-config groff bash subversion openssh sqlite sed serf openldap db cyrus-sasl expat apr-util findfreetype libssh curl cmake autoconf automake libtool cpio - libssh2 nghttp2 libkrb5 python2 ninja; + libssh2 nghttp2 libkrb5 ninja; # Avoid pulling in a full python and its extra dependencies for the llvm/clang builds. libxml2 = super.libxml2.override { pythonSupport = false; }; @@ -302,7 +299,7 @@ in rec { stage4 = prevStage: let persistent = self: super: with prevStage; { inherit - gnumake gzip gnused bzip2 gawk ed xz patch bash + gnumake gzip gnused bzip2 gawk ed xz patch bash python3 ncurses libffi zlib gmp pcre gnugrep coreutils findutils diffutils patchutils ninja; @@ -332,7 +329,7 @@ in rec { libxml2-nopython = super.libxml2.override { pythonSupport = false; }; CF = super.darwin.CF.override { libxml2 = libxml2-nopython; - python = prevStage.python; + python3 = prevStage.python3; }; }; }; @@ -365,17 +362,6 @@ in rec { }); in { inherit tools libraries; } // tools // libraries); - # N.B: the important thing here is to ensure that python == python2 - # == python27 or you get weird issues with inconsistent package sets. - # In a particularly subtle bug, I overrode python2 instead of python27 - # here, and it caused gnome-doc-utils to complain about: - # "PyThreadState_Get: no current thread". This is because Python gets - # really unhappy if you have Python A which loads a native python lib - # which was linked against Python B, which in our case was happening - # because we didn't override python "deeply enough". Anyway, this works - # and I'm just leaving this blurb here so people realize why it matters - python27 = super.python27.override { CF = prevStage.darwin.CF; }; - darwin = super.darwin // { inherit (darwin) dyld ICU Libsystem libiconv; } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { @@ -438,7 +424,8 @@ in rec { inherit cc; darwin = super.darwin // { - xnu = super.darwin.xnu.override { python = super.python.override { configd = null; }; }; + inherit (prevStage.darwin) CF; + xnu = super.darwin.xnu.override { inherit (prevStage) python3; }; }; }); }; diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index befeb450997..df2d35d541b 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -53,6 +53,7 @@ let lib = import ../../../lib; in lib.makeOverridable ( let defaultNativeBuildInputs = extraNativeBuildInputs ++ [ ../../build-support/setup-hooks/move-docs.sh + ../../build-support/setup-hooks/make-symlinks-relative.sh ../../build-support/setup-hooks/compress-man-pages.sh ../../build-support/setup-hooks/strip.sh ../../build-support/setup-hooks/patch-shebangs.sh diff --git a/pkgs/tools/X11/libstrangle/nixos.patch b/pkgs/tools/X11/libstrangle/nixos.patch index 912bdded6da..03c8c19b54c 100644 --- a/pkgs/tools/X11/libstrangle/nixos.patch +++ b/pkgs/tools/X11/libstrangle/nixos.patch @@ -26,4 +26,4 @@ index e280e86..b2dd42b 100755 -# Execute the strangled program under a clean environment # pass through the FPS and overriden LD_PRELOAD environment variables -exec env FPS="${FPS}" LD_PRELOAD="${LD_PRELOAD}:libstrangle.so" "$@" -+FPS="${FPS}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:@out@/lib/libstrangle/lib64:@out@/lib/libstrangle/lib32" LD_PRELOAD="${LD_PRELOAD}:libstrangle.so" exec "$@" ++FPS="${FPS}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}@out@/lib/libstrangle/lib64:@out@/lib/libstrangle/lib32" LD_PRELOAD="${LD_PRELOAD}:libstrangle.so" exec "$@" diff --git a/pkgs/tools/X11/primus/default.nix b/pkgs/tools/X11/primus/default.nix index a70b619a6b4..eb8aa042e7b 100644 --- a/pkgs/tools/X11/primus/default.nix +++ b/pkgs/tools/X11/primus/default.nix @@ -27,7 +27,7 @@ let in writeScriptBin "primusrun" '' #!${runtimeShell} - export LD_LIBRARY_PATH=${ldPath}:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH=${ldPath}''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH # https://bugs.launchpad.net/ubuntu/+source/bumblebee/+bug/1758243 export __GLVND_DISALLOW_PATCHING=1 exec "$@" diff --git a/pkgs/tools/filesystems/btrfs-progs/default.nix b/pkgs/tools/filesystems/btrfs-progs/default.nix index 1da8470280b..e3545315d6f 100644 --- a/pkgs/tools/filesystems/btrfs-progs/default.nix +++ b/pkgs/tools/filesystems/btrfs-progs/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "btrfs-progs"; - version = "5.4"; + version = "5.4.1"; src = fetchurl { url = "mirror://kernel/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v${version}.tar.xz"; - sha256 = "1ykhasv0jc3qi3xrm5841mzkmlbkjw6rm70gl4aww90jj6ak55qg"; + sha256 = "0scxg9p6z0wss92gmv5a8yxdmr8x449kb5v3bfnvs26n92r7zq7k"; }; nativeBuildInputs = [ diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index 9c770441025..34f8ff8f447 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -134,7 +134,7 @@ in rec { substituteInPlace src/common/module.c --replace "/sbin/modprobe" "modprobe" # for pybind/rgw to find internal dep - export LD_LIBRARY_PATH="$PWD/build/lib:$LD_LIBRARY_PATH" + export LD_LIBRARY_PATH="$PWD/build/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" # install target needs to be in PYTHONPATH for "*.pth support" check to succeed patchShebangs src/script src/spdk src/test src/tools diff --git a/pkgs/tools/misc/coreutils/coreutils-8.31-android-cross.patch b/pkgs/tools/misc/coreutils/coreutils-8.31-android-cross.patch new file mode 100644 index 00000000000..97d95d1c5b1 --- /dev/null +++ b/pkgs/tools/misc/coreutils/coreutils-8.31-android-cross.patch @@ -0,0 +1,51 @@ +From 3bd82a82cf4ba693d2c31c7b95aaec4e56dc92a4 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Mon, 11 Mar 2019 16:40:29 -0700 +Subject: [PATCH 1/1] strtod: fix clash with strtold + +Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817). +* lib/strtod.c (compute_minus_zero, minus_zero): +Simplify by remving the macro / external variable, +and having just a function. User changed. This avoids +the need for an external variable that might clash. +--- + ChangeLog | 9 +++++++++ + lib/strtod.c | 11 +++++------ + 2 files changed, 14 insertions(+), 6 deletions(-) + +diff --git a/lib/strtod.c b/lib/strtod.c +index b9eaa51..69b1564 100644 +--- a/lib/strtod.c ++++ b/lib/strtod.c +@@ -294,16 +294,15 @@ parse_number (const char *nptr, + ICC 10.0 has a bug when optimizing the expression -zero. + The expression -MIN * MIN does not work when cross-compiling + to PowerPC on Mac OS X 10.5. */ +-#if defined __hpux || defined __sgi || defined __ICC + static DOUBLE +-compute_minus_zero (void) ++minus_zero (void) + { ++#if defined __hpux || defined __sgi || defined __ICC + return -MIN * MIN; +-} +-# define minus_zero compute_minus_zero () + #else +-DOUBLE minus_zero = -0.0; ++ return -0.0; + #endif ++} + + /* Convert NPTR to a DOUBLE. If ENDPTR is not NULL, a pointer to the + character after the last one used in the number is put in *ENDPTR. */ +@@ -479,6 +478,6 @@ STRTOD (const char *nptr, char **endptr) + /* Special case -0.0, since at least ICC miscompiles negation. We + can't use copysign(), as that drags in -lm on some platforms. */ + if (!num && negative) +- return minus_zero; ++ return minus_zero (); + return negative ? -num : num; + } +-- +1.9.1 + diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index cbe97dda9e5..519a33c60d6 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -15,7 +15,7 @@ assert selinuxSupport -> libselinux != null && libsepol != null; with lib; -stdenv.mkDerivation rec { +stdenv.mkDerivation (rec { pname = "coreutils"; version = "8.31"; @@ -29,7 +29,9 @@ stdenv.mkDerivation rec { # To be removed in coreutils-8.32. ++ optional stdenv.hostPlatform.isMusl ./avoid-false-positive-in-date-debug-test.patch # Fix compilation in musl-cross environments. To be removed in coreutils-8.32. - ++ optional stdenv.hostPlatform.isMusl ./coreutils-8.31-musl-cross.patch; + ++ optional stdenv.hostPlatform.isMusl ./coreutils-8.31-musl-cross.patch + # Fix compilation in android-cross environments. To be removed in coreutils-8.32. + ++ [ ./coreutils-8.31-android-cross.patch ]; postPatch = '' # The test tends to fail on btrfs,f2fs and maybe other unusual filesystems. @@ -143,8 +145,9 @@ stdenv.mkDerivation rec { maintainers = [ maintainers.eelco ]; }; - } // optionalAttrs stdenv.hostPlatform.isMusl { # Work around a bogus warning in conjunction with musl. NIX_CFLAGS_COMPILE = "-Wno-error"; -} +} // stdenv.lib.optionalAttrs stdenv.hostPlatform.isAndroid { + NIX_CFLAGS_COMPILE = "-D__USE_FORTIFY_LEVEL=0"; +}) diff --git a/pkgs/tools/misc/ethtool/default.nix b/pkgs/tools/misc/ethtool/default.nix index bffc8a01f92..ec1e2c48e64 100644 --- a/pkgs/tools/misc/ethtool/default.nix +++ b/pkgs/tools/misc/ethtool/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "ethtool"; - version = "5.3"; + version = "5.4"; src = fetchurl { - url = "mirror://kernel/software/network/ethtool/${pname}-${version}.tar.xz"; - sha256 = "1i14zrg4a84zjpwvqi8an0zx0hm06g614a79zc2syrkhrvdw1npk"; + url = "mirror://kernel/software/network/${pname}/${pname}-${version}.tar.xz"; + sha256 = "0srbqp4a3x9ryrbm5q854375y04ni8j0bmsrl89nmsyn4x4ixy12"; }; meta = with stdenv.lib; { diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix index 33293860190..59055e4114a 100644 --- a/pkgs/tools/misc/hdf5/default.nix +++ b/pkgs/tools/misc/hdf5/default.nix @@ -16,11 +16,11 @@ assert !cpp || mpi == null; let inherit (stdenv.lib) optional optionals; in stdenv.mkDerivation rec { - version = "1.10.5"; + version = "1.10.6"; pname = "hdf5"; src = fetchurl { url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/${pname}-${version}/src/${pname}-${version}.tar.bz2"; - sha256 = "0i3g6v521vigzbx8wpd32ibsiiw92r65ca3qdbn0d8fj8f4fmmk8"; + sha256 = "1gf38x51128hn00744358w27xgzjk0ff4wra4yxh2lk804ck1mh9"; }; passthru = { diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 051271e9788..a732ddcb89e 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -28,14 +28,14 @@ assert brotliSupport -> brotli != null; assert gssSupport -> libkrb5 != null; stdenv.mkDerivation rec { - name = "curl-7.67.0"; + name = "curl-7.68.0"; src = fetchurl { urls = [ "https://curl.haxx.se/download/${name}.tar.bz2" "https://github.com/curl/curl/releases/download/${lib.replaceStrings ["."] ["_"] name}/${name}.tar.bz2" ]; - sha256 = "0v2qb1c82m3qzkiyglsg1745qi791i9pl1jgnks8nm0sh9b6jpyx"; + sha256 = "1fgf4f33wj25jk6lkpxmrvmfnnxvc66z3k3561rxr8nngn8m8zr0"; }; outputs = [ "bin" "dev" "out" "man" "devdoc" ]; diff --git a/pkgs/tools/networking/maxscale/default.nix b/pkgs/tools/networking/maxscale/default.nix index d047646fa71..4288395cdac 100644 --- a/pkgs/tools/networking/maxscale/default.nix +++ b/pkgs/tools/networking/maxscale/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, cmake, pkgconfig, glibc -, bison2, curl, flex, gperftools, jansson, jemalloc, kerberos, lua, libmysqlclient +, bison, curl, flex, gperftools, jansson, jemalloc, kerberos, lua, libmysqlclient , ncurses, openssl, pcre, pcre2, perl, rabbitmq-c, sqlite, tcl , libaio, libedit, libtool, libui, libuuid, zlib }: @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ - bison2 curl flex gperftools jansson jemalloc kerberos lua libmysqlclient + bison curl flex gperftools jansson jemalloc kerberos lua libmysqlclient ncurses openssl pcre pcre2 perl rabbitmq-c sqlite tcl libaio libedit libtool libui libuuid zlib ]; diff --git a/pkgs/tools/networking/modem-manager/default.nix b/pkgs/tools/networking/modem-manager/default.nix index 221e873387f..8d173997d71 100644 --- a/pkgs/tools/networking/modem-manager/default.nix +++ b/pkgs/tools/networking/modem-manager/default.nix @@ -3,12 +3,12 @@ stdenv.mkDerivation rec { pname = "modem-manager"; - version = "1.10.6"; + version = "1.12.2"; package = "ModemManager"; src = fetchurl { url = "https://www.freedesktop.org/software/${package}/${package}-${version}.tar.xz"; - sha256 = "15n9sd6ymxvw7hidc9pw81j89acwi5cjfhj220a68mi1h8vsfb1w"; + sha256 = "1si5bnm0d3b5ccpgj7xakl7pgy9mypm8ds6xgj1q0rzds2yx4xjg"; }; nativeBuildInputs = [ vala gobject-introspection gettext pkgconfig ]; diff --git a/pkgs/tools/networking/network-manager/default.nix b/pkgs/tools/networking/network-manager/default.nix index e762ac73844..1a33a735cfe 100644 --- a/pkgs/tools/networking/network-manager/default.nix +++ b/pkgs/tools/networking/network-manager/default.nix @@ -4,17 +4,17 @@ , gobject-introspection, modemmanager, openresolv, libndp, newt, libsoup , ethtool, gnused, iputils, kmod, jansson, gtk-doc, libxslt , docbook_xsl, docbook_xml_dtd_412, docbook_xml_dtd_42, docbook_xml_dtd_43 -, openconnect, curl, meson, ninja, libpsl }: +, openconnect, curl, meson, ninja, libpsl, mobile-broadband-provider-info, runtimeShell }: let pythonForDocs = python3.withPackages (pkgs: with pkgs; [ pygobject3 ]); in stdenv.mkDerivation rec { pname = "network-manager"; - version = "1.20.8"; + version = "1.22.4"; src = fetchurl { url = "mirror://gnome/sources/NetworkManager/${stdenv.lib.versions.majorMinor version}/NetworkManager-${version}.tar.xz"; - sha256 = "1ijpnx25wy5bcvp4mc49va942q56d0pncpj4jpknpdzwilmf455d"; + sha256 = "0682hm5l3ix8cq35yl5pxidri4kxbdnvj9llf8vg9mcg5abdaslv"; }; outputs = [ "out" "dev" "devdoc" "man" "doc" ]; @@ -54,8 +54,8 @@ in stdenv.mkDerivation rec { patches = [ (substituteAll { src = ./fix-paths.patch; - inherit iputils kmod openconnect ethtool gnused dbus; - inherit (stdenv) shell; + inherit iputils kmod openconnect ethtool gnused systemd; + inherit runtimeShell; }) # Meson does not support using different directories during build and @@ -64,7 +64,7 @@ in stdenv.mkDerivation rec { ]; buildInputs = [ - systemd libselinux audit libpsl libuuid polkit ppp libndp curl + systemd libselinux audit libpsl libuuid polkit ppp libndp curl mobile-broadband-provider-info bluez5 dnsmasq gobject-introspection modemmanager readline newt libsoup jansson ]; diff --git a/pkgs/tools/networking/network-manager/fix-install-paths.patch b/pkgs/tools/networking/network-manager/fix-install-paths.patch index 5798c1edfb6..02a006c1c3d 100644 --- a/pkgs/tools/networking/network-manager/fix-install-paths.patch +++ b/pkgs/tools/networking/network-manager/fix-install-paths.patch @@ -1,8 +1,8 @@ diff --git a/meson.build b/meson.build -index 4105a9c80..3d912557f 100644 +index 0af69f35d..9ab239c8a 100644 --- a/meson.build +++ b/meson.build -@@ -884,9 +884,9 @@ meson.add_install_script( +@@ -912,9 +912,9 @@ meson.add_install_script( join_paths('tools', 'meson-post-install.sh'), nm_datadir, nm_bindir, @@ -11,19 +11,6 @@ index 4105a9c80..3d912557f 100644 nm_pkglibdir, - nm_pkgstatedir, + nm_prefix + nm_pkgstatedir, - enable_docs ? 'install_docs' : '', nm_mandir, - ) -diff --git a/src/settings/plugins/ifcfg-rh/meson.build b/src/settings/plugins/ifcfg-rh/meson.build -index 58acdcfcb..e3a16d597 100644 ---- a/src/settings/plugins/ifcfg-rh/meson.build -+++ b/src/settings/plugins/ifcfg-rh/meson.build -@@ -69,7 +69,7 @@ install_data( - ) - - meson.add_install_script('sh', '-c', -- 'mkdir -p $DESTDIR/@0@/sysconfig/network-scripts'.format(nm_sysconfdir)) -+ 'mkdir -p $DESTDIR/@0@/sysconfig/network-scripts'.format(nm_prefix + nm_sysconfdir)) - - if enable_tests - subdir('tests') + nm_sysconfdir, + enable_docs ? '1' : '0', diff --git a/pkgs/tools/networking/network-manager/fix-paths.patch b/pkgs/tools/networking/network-manager/fix-paths.patch index c45dc174a0d..af35fc0a36b 100644 --- a/pkgs/tools/networking/network-manager/fix-paths.patch +++ b/pkgs/tools/networking/network-manager/fix-paths.patch @@ -1,8 +1,8 @@ diff --git a/clients/common/nm-vpn-helpers.c b/clients/common/nm-vpn-helpers.c -index 204b7c286..8bdb734c2 100644 +index ffae5f553..ba1093e4d 100644 --- a/clients/common/nm-vpn-helpers.c +++ b/clients/common/nm-vpn-helpers.c -@@ -215,10 +215,7 @@ nm_vpn_openconnect_authenticate_helper (const char *host, +@@ -203,10 +203,7 @@ nm_vpn_openconnect_authenticate_helper (const char *host, NULL, }; @@ -15,7 +15,7 @@ index 204b7c286..8bdb734c2 100644 if (!g_spawn_sync (NULL, (char **) NM_MAKE_STRV (path, "--authenticate", host), diff --git a/data/84-nm-drivers.rules b/data/84-nm-drivers.rules -index e398cb9f2..31c56596a 100644 +index e398cb9f2..a43d61864 100644 --- a/data/84-nm-drivers.rules +++ b/data/84-nm-drivers.rules @@ -7,6 +7,6 @@ ACTION!="add|change", GOTO="nm_drivers_end" @@ -23,27 +23,27 @@ index e398cb9f2..31c56596a 100644 ENV{ID_NET_DRIVER}=="?*", GOTO="nm_drivers_end" DRIVERS=="?*", GOTO="nm_drivers_end" -PROGRAM="/bin/sh -c '/usr/sbin/ethtool -i $$1 |/usr/bin/sed -n s/^driver:\ //p' -- $env{INTERFACE}", ENV{ID_NET_DRIVER}="%c" -+PROGRAM="@shell@ -c '@ethtool@/bin/ethtool -i $$1 |@gnused@/bin/sed -n s/^driver:\ //p' -- $env{INTERFACE}", ENV{ID_NET_DRIVER}="%c" ++PROGRAM="@runtimeShell@ -c '@ethtool@/bin/ethtool -i $$1 |@gnused@/bin/sed -n s/^driver:\ //p' -- $env{INTERFACE}", ENV{ID_NET_DRIVER}="%c" LABEL="nm_drivers_end" diff --git a/data/NetworkManager.service.in b/data/NetworkManager.service.in -index 2f442bf23..c3e797bf4 100644 +index 91ebd9a36..5201a56c3 100644 --- a/data/NetworkManager.service.in +++ b/data/NetworkManager.service.in @@ -8,7 +8,7 @@ Before=network.target @DISTRO_NETWORK_SERVICE@ [Service] Type=dbus BusName=org.freedesktop.NetworkManager --ExecReload=/usr/bin/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.Reload uint32:0 -+ExecReload=@dbus@/bin/dbus-send --print-reply --system --type=method_call --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.Reload uint32:0 +-ExecReload=/usr/bin/busctl call org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager Reload u 0 ++ExecReload=@systemd@/bin/busctl call org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager Reload u 0 #ExecReload=/bin/kill -HUP $MAINPID ExecStart=@sbindir@/NetworkManager --no-daemon Restart=on-failure diff --git a/libnm/meson.build b/libnm/meson.build -index 710ef181d..3aa182dd4 100644 +index 51ca46d2b..0c04cc216 100644 --- a/libnm/meson.build +++ b/libnm/meson.build -@@ -280,7 +280,7 @@ if enable_introspection +@@ -261,7 +261,7 @@ if enable_introspection name, input: libnm_gir[0], output: name, @@ -52,20 +52,20 @@ index 710ef181d..3aa182dd4 100644 depends: libnm_gir, ) -@@ -289,7 +289,7 @@ if enable_introspection +@@ -270,7 +270,7 @@ if enable_introspection name, - input: libnm_gir[0], + input: [libnm_gir[0], nm_settings_docs_overrides], output: name, -- command: [generate_setting_docs_env, python.path(), generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--overrides', nm_settings_docs_overrides, '--output', '@OUTPUT@'], -+ command: [generate_setting_docs_env, generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT@', '--overrides', nm_settings_docs_overrides, '--output', '@OUTPUT@'], +- command: [generate_setting_docs_env, python.path(), generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT0@', '--overrides', '@INPUT1@', '--output', '@OUTPUT@'], ++ command: [generate_setting_docs_env, generate_setting_docs, '--lib-path', meson.current_build_dir(), '--gir', '@INPUT0@', '--overrides', '@INPUT1@', '--output', '@OUTPUT@'], depends: libnm_gir, ) endif diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c -index 67e23b8f9..b0ce52711 100644 +index e7a4a059a..0a8f8b7c6 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c -@@ -12840,14 +12840,14 @@ nm_device_start_ip_check (NMDevice *self) +@@ -13179,14 +13179,14 @@ nm_device_start_ip_check (NMDevice *self) gw = nm_ip4_config_best_default_route_get (priv->ip_config_4); if (gw) { nm_utils_inet4_ntop (NMP_OBJECT_CAST_IP4_ROUTE (gw)->gateway, buf); @@ -83,10 +83,10 @@ index 67e23b8f9..b0ce52711 100644 } } diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c -index d896d4d33..4cacb5cb6 100644 +index fb92289f0..c91b27b09 100644 --- a/src/nm-core-utils.c +++ b/src/nm-core-utils.c -@@ -446,7 +446,7 @@ nm_utils_modprobe (GError **error, gboolean suppress_error_logging, const char * +@@ -336,7 +336,7 @@ nm_utils_modprobe (GError **error, gboolean suppress_error_logging, const char * /* construct the argument list */ argv = g_ptr_array_sized_new (4); diff --git a/pkgs/tools/security/neopg/default.nix b/pkgs/tools/security/neopg/default.nix index 5e26bcf6759..c58772346ee 100644 --- a/pkgs/tools/security/neopg/default.nix +++ b/pkgs/tools/security/neopg/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { dontUseCmakeBuildDir = true; preCheck = '' - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/3rdparty/googletest/googletest:$(pwd)/neopg + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$(pwd)/3rdparty/googletest/googletest:$(pwd)/neopg ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/security/pcsclite/default.nix b/pkgs/tools/security/pcsclite/default.nix index 263c308fc3d..2141f12151f 100644 --- a/pkgs/tools/security/pcsclite/default.nix +++ b/pkgs/tools/security/pcsclite/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "pcsclite"; - version = "1.8.25"; + version = "1.8.26"; outputs = [ "bin" "out" "dev" "doc" "man" ]; src = fetchurl { url = "https://pcsclite.apdu.fr/files/pcsc-lite-${version}.tar.bz2"; - sha256 = "14l7irs1nsh8b036ag4cfy8wryyysch78scz5dw6xxqwqgnpjvfp"; + sha256 = "1ndvvz0fgqwz70pijymsxmx25mzryb0zav1i8jjc067ndryvxdry"; }; patches = [ ./no-dropdir-literals.patch ]; diff --git a/pkgs/tools/text/opencc/default.nix b/pkgs/tools/text/opencc/default.nix index a2a02049d26..01b16908fb7 100644 --- a/pkgs/tools/text/opencc/default.nix +++ b/pkgs/tools/text/opencc/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation { makeFlags = [ # let intermediate tools find intermediate library - "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(CURDIR)/src" + "LD_LIBRARY_PATH=$LD_LIBRARY_PATH\${LD_LIBRARY_PATH:+:}$(CURDIR)/src" ]; # Parallel building occasionaly fails with: Error copying file "/tmp/nix-build-opencc-1.0.5.drv-0/OpenCC-ver.1.0.5/build/src/libopencc.so.1.0.0" to "/tmp/nix-build-opencc-1.0.5.drv-0/OpenCC-ver.1.0.5/build/src/tools". diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 245abf731dd..c8e9d44d75d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1708,9 +1708,7 @@ in fdroidserver = python3Packages.callPackage ../development/tools/fdroidserver { }; - filebench = callPackage ../tools/misc/filebench { - bison = bison2; - }; + filebench = callPackage ../tools/misc/filebench { }; fileshare = callPackage ../servers/fileshare {}; @@ -9721,9 +9719,7 @@ in }; }); - bison2 = callPackage ../development/tools/parsing/bison/2.x.nix { }; - bison3 = callPackage ../development/tools/parsing/bison/3.x.nix { }; - bison = bison3; + bison = callPackage ../development/tools/parsing/bison { }; yacc = bison; # TODO: move to aliases.nix blackmagic = callPackage ../development/tools/misc/blackmagic { }; @@ -13116,7 +13112,7 @@ in libxmi = callPackage ../development/libraries/libxmi { }; libxml2 = callPackage ../development/libraries/libxml2 { - python = if stdenv.isDarwin then python2 else python3; + python = python3; }; libxml2Python = let @@ -13742,7 +13738,7 @@ in (import ../development/libraries/qt-5/5.12) { inherit newScope; inherit stdenv fetchurl fetchpatch fetchFromGitHub makeSetupHook makeWrapper; - bison = bison2; # error: too few arguments to function 'int yylex(... + inherit bison; inherit cups; inherit dconf; inherit harfbuzz; @@ -16683,7 +16679,7 @@ in keyutils = callPackage ../os-specific/linux/keyutils { }; libselinux = callPackage ../os-specific/linux/libselinux { - python = python3; + python = python37; }; libsemanage = callPackage ../os-specific/linux/libsemanage { @@ -19565,7 +19561,7 @@ in stdenv = gccStdenv; }; - ike = callPackage ../applications/networking/ike { bison = bison2; }; + ike = callPackage ../applications/networking/ike { }; ikiwiki = callPackage ../applications/misc/ikiwiki { inherit (perlPackages.override { pkgs = pkgs // { imagemagick = imagemagickBig;}; }) PerlMagick; @@ -21435,9 +21431,7 @@ in inherit (ocamlPackages) stog; - stp = callPackage ../applications/science/logic/stp { - bison = bison2; - }; + stp = callPackage ../applications/science/logic/stp { }; stretchly = callPackage ../applications/misc/stretchly { inherit (gnome2) GConf; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e8e15384c83..369707d39c5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2785,6 +2785,7 @@ in { (p: p.overrideAttrs (super: { meta = super.meta // { outputsToInstall = [ "py" ]; + broken = (super.meta.broken or false) || pythonAtLeast "3.8"; }; }))