From ddc60bec557a59e7350bef74891a4d7b586e6cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 23 May 2021 08:17:05 +0200 Subject: [PATCH 01/10] Merge #123133: curlftpfs: fix sandboxed builds on darwin (cherry picked from commit 29f57e475266edbb57d995c044aba3adf7f71298) --- pkgs/tools/filesystems/curlftpfs/default.nix | 18 ++++++++++++++---- .../filesystems/curlftpfs/fix-rpl_malloc.patch | 13 +++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 pkgs/tools/filesystems/curlftpfs/fix-rpl_malloc.patch diff --git a/pkgs/tools/filesystems/curlftpfs/default.nix b/pkgs/tools/filesystems/curlftpfs/default.nix index 2c5d886c14d..8c8fe31624f 100644 --- a/pkgs/tools/filesystems/curlftpfs/default.nix +++ b/pkgs/tools/filesystems/curlftpfs/default.nix @@ -1,11 +1,21 @@ { lib, stdenv, fetchurl, autoreconfHook, fuse, curl, pkg-config, glib, zlib }: -stdenv.mkDerivation { - name = "curlftpfs-0.9.2"; +stdenv.mkDerivation rec { + pname = "curlftpfs"; + version = "0.9.2"; + src = fetchurl { - url = "mirror://sourceforge/curlftpfs/curlftpfs-0.9.2.tar.gz"; + url = "mirror://sourceforge/curlftpfs/curlftpfs-${version}.tar.gz"; sha256 = "0n397hmv21jsr1j7zx3m21i7ryscdhkdsyqpvvns12q7qwwlgd2f"; }; + + patches = [ + # This removes AC_FUNC_MALLOC and AC_FUNC_REALLOC from configure.ac because + # it is known to cause problems. Search online for "rpl_malloc" and + # "rpl_realloc" to find out more. + ./fix-rpl_malloc.patch + ]; + nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ fuse curl glib zlib ]; @@ -24,7 +34,7 @@ stdenv.mkDerivation { meta = with lib; { description = "Filesystem for accessing FTP hosts based on FUSE and libcurl"; homepage = "http://curlftpfs.sourceforge.net"; - license = licenses.gpl2; + license = licenses.gpl2Only; platforms = platforms.unix; }; } diff --git a/pkgs/tools/filesystems/curlftpfs/fix-rpl_malloc.patch b/pkgs/tools/filesystems/curlftpfs/fix-rpl_malloc.patch new file mode 100644 index 00000000000..0265e1d8289 --- /dev/null +++ b/pkgs/tools/filesystems/curlftpfs/fix-rpl_malloc.patch @@ -0,0 +1,13 @@ +diff -Naur a/configure.ac b/configure.ac +--- a/configure.ac 2008-04-23 20:37:42.000000000 +0900 ++++ b/configure.ac 2021-05-16 01:28:24.000000000 +0900 +@@ -46,9 +46,7 @@ + + # Checks for library functions. + AC_FUNC_CHOWN +-AC_FUNC_MALLOC + AC_FUNC_MKTIME +-AC_FUNC_REALLOC + AC_FUNC_SELECT_ARGTYPES + AC_FUNC_STRFTIME + AC_FUNC_UTIME_NULL From 771d69953d44ea9486d68ec67ab2e6610ec129b8 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 17 May 2021 17:12:39 +0200 Subject: [PATCH 02/10] pkg-config-wrapper: mangle PKG_CONFIG_PATH{,_FOR_BUILD} correctly Previously, mangleVarList would be used which would concatenate the variables using a space as a separator. Paths are however separated by `:` in PKG_CONFIG_PATH leading to entries being broken. This is fixed by introducing mangleVarListGeneric which allows us to specify the desired separator. Reproducer for the issue prior to this change: $ nix-shell -A pkgsLLVM.wayland [nix-shell] $ pkg-config --libs expat Package expat was not found in the pkg-config search path. Perhaps you should add the directory containing `expat.pc' to the PKG_CONFIG_PATH environment variable No package 'expat' found $ printf 'Host: %s\nBuild: %s' $PKG_CONFIG_PATH $PKG_CONFIG_PATH_FOR_BUILD Host: /nix/store/5h308a4ab8w7prcp8iflh5pnl78mayi2-expat-2.2.10-x86_64-unknown-linux-gnu-dev/lib/pkgconfig:/nix/store/z3y9ska2h4l1map25m195iq577g7g3gz-libxml2-x86_64-unknown-linux-gnu-2.9.12-dev/lib/pkgconfig:/nix/store/lbz5m1s0r7zn0cxvl21czfspli6ribzb-zlib-1.2.11-x86_64-unknown-linux-gnu-dev/lib/pkgconfig:/nix/store/rfhvp8r8n3ygpzh8j0l34lk8hwwi3z0h-libffi-3.3-x86_64-unknown-linux-gnu-dev/lib/pkgconfig Build: /nix/store/dw11ywy7qwfz53qisz0dggbgix88jah2-wayland-1.19.0-bin/lib/pkgconfig strace reveals the issue: stat("/nix/store/dw11ywy7qwfz53qisz0dggbgix88jah2-wayland-1.19.0-bin/lib/pkgconfig /nix/store/5h308a4ab8w7prcp8iflh5pnl78mayi2-expat-2.2.10-x86_64-unknown-linux-gnu-dev/lib/pkgconfig/expat-uninstalled.pc", 0x7fff49829fa0) = -1 ENOENT (No such file or directory) In the pkg-config wrapper $PKG_CONFIG_PATH_FOR_BUILD and $PKG_CONFIG_PATH are concatenated with a space which leads to two paths being messed up. This issue likely only affects native cross compilation. (cherry picked from commit b11d65c8508542efbd161c5922d51b55b431fe90) --- pkgs/build-support/pkg-config-wrapper/add-flags.sh | 2 +- pkgs/build-support/wrapper-common/utils.bash | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/pkg-config-wrapper/add-flags.sh b/pkgs/build-support/pkg-config-wrapper/add-flags.sh index 35ecf62ca23..90aee712be6 100644 --- a/pkgs/build-support/pkg-config-wrapper/add-flags.sh +++ b/pkgs/build-support/pkg-config-wrapper/add-flags.sh @@ -6,7 +6,7 @@ var_templates_list=( accumulateRoles for var in "${var_templates_list[@]}"; do - mangleVarList "$var" ${role_suffixes[@]+"${role_suffixes[@]}"} + mangleVarListGeneric ":" "$var" ${role_suffixes[@]+"${role_suffixes[@]}"} done export NIX_PKG_CONFIG_WRAPPER_FLAGS_SET_@suffixSalt@=1 diff --git a/pkgs/build-support/wrapper-common/utils.bash b/pkgs/build-support/wrapper-common/utils.bash index 66b7c3f3e83..f773270f7de 100644 --- a/pkgs/build-support/wrapper-common/utils.bash +++ b/pkgs/build-support/wrapper-common/utils.bash @@ -13,7 +13,9 @@ accumulateRoles() { fi } -mangleVarList() { +mangleVarListGeneric() { + local sep="$1" + shift local var="$1" shift local -a role_suffixes=("$@") @@ -25,11 +27,15 @@ mangleVarList() { for suffix in "${role_suffixes[@]}"; do local inputVar="${var}${suffix}" if [ -v "$inputVar" ]; then - export ${outputVar}+="${!outputVar:+ }${!inputVar}" + export ${outputVar}+="${!outputVar:+$sep}${!inputVar}" fi done } +mangleVarList() { + mangleVarListGeneric " " "$@" +} + mangleVarBool() { local var="$1" shift From 3a165fda9255921116f813e855b554f67ce06d67 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 18 May 2021 16:15:03 +0200 Subject: [PATCH 03/10] llvmPackages*.clang: fix linker invocation with LLVMgold plugin When using GNU binutils, clang passes the LLVMgold.so plugin to the linker for certain operations that require special support in the linker like doing link time optimization (LTO). When passing the plugin to the linker's command line, clang assumes that llvm and itself are installed in the same prefix and thus `/path/to/clang/bin/../lib/LLVMgold.so` is the plugin. Since we install clang and llvm to separate store paths, this assumption does not hold. When clang-unwrapped only had a single output, we worked around this issue by symlinking `$out/lib/LLVMgold.so` to `${llvm}/lib/LLVMgold.so`. However since we split all llvm packages into multiple outputs clang's `$out` no longer has a lib directory and clang can't discover clangs lib output on its own. As a result LTO was broken. Instead of introducing yet another hack and having a symlink to LLVMgold.so in `$out/lib` (despite having `$lib/lib` as well), we patch clang to use a hard coded path to `${libllvm.lib}/lib` for discovering `LLVMgold.so`. Resolves #123361. (cherry picked from commit 3530837417da13076a2c8412de2c0c385dfbd648) --- .../compilers/llvm/10/clang/default.nix | 11 +++++------ .../compilers/llvm/11/clang/default.nix | 11 +++++------ .../compilers/llvm/12/clang/default.nix | 11 +++++------ .../compilers/llvm/5/clang/LLVMgold-path.patch | 14 ++++++++++++++ .../compilers/llvm/5/clang/default.nix | 11 +++++------ .../compilers/llvm/6/clang/default.nix | 11 +++++------ .../compilers/llvm/7/clang/default.nix | 11 +++++------ .../compilers/llvm/8/clang/default.nix | 11 +++++------ .../compilers/llvm/9/clang/default.nix | 11 +++++------ .../llvm/clang-11-12-LLVMgold-path.patch | 13 +++++++++++++ .../compilers/llvm/clang-6-10-LLVMgold-path.patch | 15 +++++++++++++++ 11 files changed, 82 insertions(+), 48 deletions(-) create mode 100644 pkgs/development/compilers/llvm/5/clang/LLVMgold-path.patch create mode 100644 pkgs/development/compilers/llvm/clang-11-12-LLVMgold-path.patch create mode 100644 pkgs/development/compilers/llvm/clang-6-10-LLVMgold-path.patch diff --git a/pkgs/development/compilers/llvm/10/clang/default.nix b/pkgs/development/compilers/llvm/10/clang/default.nix index e0c52651cad..b42f40b9694 100644 --- a/pkgs/development/compilers/llvm/10/clang/default.nix +++ b/pkgs/development/compilers/llvm/10/clang/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 +{ lib, stdenv, llvm_meta, fetch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 , buildLlvmTools , fixDarwinDylibNames , enableManpages ? false @@ -46,6 +46,10 @@ let # https://reviews.llvm.org/D51899 ./compiler-rt-baremetal.patch ./gnu-install-dirs.patch + (substituteAll { + src = ../../clang-6-10-LLVMgold-path.patch; + libllvmLibdir = "${libllvm.lib}/lib"; + }) ]; postPatch = '' @@ -64,12 +68,7 @@ let outputs = [ "out" "lib" "dev" "python" ]; - # Clang expects to find LLVMgold in its own prefix postInstall = '' - if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then - ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib - fi - ln -sv $out/bin/clang $out/bin/cpp # Move libclang to 'lib' output diff --git a/pkgs/development/compilers/llvm/11/clang/default.nix b/pkgs/development/compilers/llvm/11/clang/default.nix index f23394a8b75..07e5326128a 100644 --- a/pkgs/development/compilers/llvm/11/clang/default.nix +++ b/pkgs/development/compilers/llvm/11/clang/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, fetch, fetchpatch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 +{ lib, stdenv, llvm_meta, fetch, fetchpatch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 , buildLlvmTools , fixDarwinDylibNames , enableManpages ? false @@ -57,6 +57,10 @@ let excludes = [ "docs/*" "test/*" ]; sha256 = "0gxgmi0qbm89mq911dahallhi8m6wa9vpklklqmxafx4rplrr8ph"; }) + (substituteAll { + src = ../../clang-11-12-LLVMgold-path.patch; + libllvmLibdir = "${libllvm.lib}/lib"; + }) ]; postPatch = '' @@ -75,12 +79,7 @@ let outputs = [ "out" "lib" "dev" "python" ]; - # Clang expects to find LLVMgold in its own prefix postInstall = '' - if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then - ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib - fi - ln -sv $out/bin/clang $out/bin/cpp # Move libclang to 'lib' output diff --git a/pkgs/development/compilers/llvm/12/clang/default.nix b/pkgs/development/compilers/llvm/12/clang/default.nix index 3d1106dbc52..dbd6ea1e1ac 100644 --- a/pkgs/development/compilers/llvm/12/clang/default.nix +++ b/pkgs/development/compilers/llvm/12/clang/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 +{ lib, stdenv, llvm_meta, fetch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 , buildLlvmTools , fixDarwinDylibNames , enableManpages ? false @@ -44,6 +44,10 @@ let ./purity.patch # https://reviews.llvm.org/D51899 ./gnu-install-dirs.patch + (substituteAll { + src = ../../clang-11-12-LLVMgold-path.patch; + libllvmLibdir = "${libllvm.lib}/lib"; + }) ]; postPatch = '' @@ -59,12 +63,7 @@ let outputs = [ "out" "lib" "dev" "python" ]; - # Clang expects to find LLVMgold in its own prefix postInstall = '' - if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then - ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib - fi - ln -sv $out/bin/clang $out/bin/cpp # Move libclang to 'lib' output diff --git a/pkgs/development/compilers/llvm/5/clang/LLVMgold-path.patch b/pkgs/development/compilers/llvm/5/clang/LLVMgold-path.patch new file mode 100644 index 00000000000..6a09c91b513 --- /dev/null +++ b/pkgs/development/compilers/llvm/5/clang/LLVMgold-path.patch @@ -0,0 +1,14 @@ +diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp +index 00bd60bc24bb..17416b0bd3c0 100644 +--- a/lib/Driver/ToolChains/CommonArgs.cpp ++++ b/lib/Driver/ToolChains/CommonArgs.cpp +@@ -376,8 +376,7 @@ void tools::AddGoldPlugin(const ToolChain &ToolChain, const ArgList &Args, + // as gold requires -plugin to come before any -plugin-opt that -Wl might + // forward. + CmdArgs.push_back("-plugin"); +- std::string Plugin = +- ToolChain.getDriver().Dir + "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold.so"; ++ std::string Plugin = "@libllvmLibdir@" "/LLVMgold.so"; + CmdArgs.push_back(Args.MakeArgString(Plugin)); + + // Try to pass driver level flags relevant to LTO code generation down to diff --git a/pkgs/development/compilers/llvm/5/clang/default.nix b/pkgs/development/compilers/llvm/5/clang/default.nix index b5887a23c65..df3d2613986 100644 --- a/pkgs/development/compilers/llvm/5/clang/default.nix +++ b/pkgs/development/compilers/llvm/5/clang/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 +{ lib, stdenv, llvm_meta, fetch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 , buildLlvmTools , fixDarwinDylibNames , enableManpages ? false @@ -43,6 +43,10 @@ let patches = [ ./purity.patch ./gnu-install-dirs.patch + (substituteAll { + src = ./LLVMgold-path.patch; + libllvmLibdir = "${libllvm.lib}/lib"; + }) ]; postPatch = '' @@ -58,12 +62,7 @@ let outputs = [ "out" "lib" "dev" "python" ]; - # Clang expects to find LLVMgold in its own prefix postInstall = '' - if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then - ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib - fi - ln -sv $out/bin/clang $out/bin/cpp # Move libclang to 'lib' output diff --git a/pkgs/development/compilers/llvm/6/clang/default.nix b/pkgs/development/compilers/llvm/6/clang/default.nix index eba9111d9d3..ee8859c159a 100644 --- a/pkgs/development/compilers/llvm/6/clang/default.nix +++ b/pkgs/development/compilers/llvm/6/clang/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 +{ lib, stdenv, llvm_meta, fetch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 , buildLlvmTools , fixDarwinDylibNames , enableManpages ? false @@ -43,6 +43,10 @@ let patches = [ ./purity.patch ./gnu-install-dirs.patch + (substituteAll { + src = ../../clang-6-10-LLVMgold-path.patch; + libllvmLibdir = "${libllvm.lib}/lib"; + }) ]; postPatch = '' @@ -58,12 +62,7 @@ let outputs = [ "out" "lib" "dev" "python" ]; - # Clang expects to find LLVMgold in its own prefix postInstall = '' - if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then - ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib - fi - ln -sv $out/bin/clang $out/bin/cpp # Move libclang to 'lib' output diff --git a/pkgs/development/compilers/llvm/7/clang/default.nix b/pkgs/development/compilers/llvm/7/clang/default.nix index e1b031ad352..afa1669ace6 100644 --- a/pkgs/development/compilers/llvm/7/clang/default.nix +++ b/pkgs/development/compilers/llvm/7/clang/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 +{ lib, stdenv, llvm_meta, fetch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 , buildLlvmTools , fixDarwinDylibNames , enableManpages ? false @@ -52,6 +52,10 @@ let # needed for our bootstrapping to not interfere with C. ./unwindlib.patch ./gnu-install-dirs.patch + (substituteAll { + src = ../../clang-6-10-LLVMgold-path.patch; + libllvmLibdir = "${libllvm.lib}/lib"; + }) ]; postPatch = '' @@ -70,12 +74,7 @@ let outputs = [ "out" "lib" "dev" "python" ]; - # Clang expects to find LLVMgold in its own prefix postInstall = '' - if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then - ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib - fi - ln -sv $out/bin/clang $out/bin/cpp # Move libclang to 'lib' output diff --git a/pkgs/development/compilers/llvm/8/clang/default.nix b/pkgs/development/compilers/llvm/8/clang/default.nix index c3399dccd1d..5cb7720d026 100644 --- a/pkgs/development/compilers/llvm/8/clang/default.nix +++ b/pkgs/development/compilers/llvm/8/clang/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 +{ lib, stdenv, llvm_meta, fetch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 , buildLlvmTools , fixDarwinDylibNames , enableManpages ? false @@ -59,6 +59,10 @@ let # make clang -xhip use $PATH to find executables ./HIP-use-PATH-8.patch ./gnu-install-dirs.patch + (substituteAll { + src = ../../clang-6-10-LLVMgold-path.patch; + libllvmLibdir = "${libllvm.lib}/lib"; + }) ]; postPatch = '' @@ -77,12 +81,7 @@ let outputs = [ "out" "lib" "dev" "python" ]; - # Clang expects to find LLVMgold in its own prefix postInstall = '' - if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then - ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib - fi - ln -sv $out/bin/clang $out/bin/cpp # Move libclang to 'lib' output diff --git a/pkgs/development/compilers/llvm/9/clang/default.nix b/pkgs/development/compilers/llvm/9/clang/default.nix index 700fcb414fc..c98b4a830c4 100644 --- a/pkgs/development/compilers/llvm/9/clang/default.nix +++ b/pkgs/development/compilers/llvm/9/clang/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 +{ lib, stdenv, llvm_meta, fetch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3 , buildLlvmTools , fixDarwinDylibNames , enableManpages ? false @@ -52,6 +52,10 @@ let # make clang -xhip use $PATH to find executables ./HIP-use-PATH-9.patch ./gnu-install-dirs.patch + (substituteAll { + src = ../../clang-6-10-LLVMgold-path.patch; + libllvmLibdir = "${libllvm.lib}/lib"; + }) ]; postPatch = '' @@ -70,12 +74,7 @@ let outputs = [ "out" "lib" "dev" "python" ]; - # Clang expects to find LLVMgold in its own prefix postInstall = '' - if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then - ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib - fi - ln -sv $out/bin/clang $out/bin/cpp # Move libclang to 'lib' output diff --git a/pkgs/development/compilers/llvm/clang-11-12-LLVMgold-path.patch b/pkgs/development/compilers/llvm/clang-11-12-LLVMgold-path.patch new file mode 100644 index 00000000000..8f8991976f3 --- /dev/null +++ b/pkgs/development/compilers/llvm/clang-11-12-LLVMgold-path.patch @@ -0,0 +1,13 @@ +diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp +index 6b6e276b8ce7..7896542a1202 100644 +--- a/lib/Driver/ToolChains/CommonArgs.cpp ++++ b/lib/Driver/ToolChains/CommonArgs.cpp +@@ -409,7 +409,7 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, + + SmallString<1024> Plugin; + llvm::sys::path::native( +- Twine(D.Dir) + "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold" + Suffix, ++ Twine("@libllvmLibdir@" "/LLVMgold") + Suffix, + Plugin); + CmdArgs.push_back(Args.MakeArgString(Plugin)); + } diff --git a/pkgs/development/compilers/llvm/clang-6-10-LLVMgold-path.patch b/pkgs/development/compilers/llvm/clang-6-10-LLVMgold-path.patch new file mode 100644 index 00000000000..93504316edf --- /dev/null +++ b/pkgs/development/compilers/llvm/clang-6-10-LLVMgold-path.patch @@ -0,0 +1,15 @@ +diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp +index 37ec73468570..b73e75aa6e59 100644 +--- a/lib/Driver/ToolChains/CommonArgs.cpp ++++ b/lib/Driver/ToolChains/CommonArgs.cpp +@@ -370,8 +370,8 @@ void tools::AddGoldPlugin(const ToolChain &ToolChain, const ArgList &Args, + #endif + + SmallString<1024> Plugin; +- llvm::sys::path::native(Twine(ToolChain.getDriver().Dir) + +- "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold" + ++ llvm::sys::path::native(Twine("@libllvmLibdir@" ++ "/LLVMgold") + + Suffix, + Plugin); + CmdArgs.push_back(Args.MakeArgString(Plugin)); From b0eb9dfebbc938551cf5d7e632c2d309e7c285dd Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Sun, 16 May 2021 13:16:15 +0200 Subject: [PATCH 04/10] imagemagick: 7.0.11-9 -> 7.0.11-12 (cherry picked from commit 1738b9877a761e249a4836df59143f7209b55bb5) --- pkgs/applications/graphics/ImageMagick/7.0.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix index ed1e580cb16..64c5a31a756 100644 --- a/pkgs/applications/graphics/ImageMagick/7.0.nix +++ b/pkgs/applications/graphics/ImageMagick/7.0.nix @@ -18,13 +18,13 @@ in stdenv.mkDerivation rec { pname = "imagemagick"; - version = "7.0.11-9"; + version = "7.0.11-12"; src = fetchFromGitHub { owner = "ImageMagick"; repo = "ImageMagick"; rev = version; - sha256 = "sha256-eL9zFrgkLb3pS8/UlQB5+p50UG8j3Q7TNDwcO/3BuXo="; + sha256 = "sha256-vTCfpHcja0z/aplcunUDlg/90EbfrR/xQ9bzdG0n2RY="; }; outputs = [ "out" "dev" "doc" ]; # bin/ isn't really big From ecff4216d5c0985082a23cae1b0dca31f2bce6c9 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Tue, 18 May 2021 22:40:33 +0200 Subject: [PATCH 05/10] imagemagick: 7.0.11-12 -> 7.0.11.13 (cherry picked from commit c2521a6b3604dfab0acc19cf630050079a0e9abd) --- pkgs/applications/graphics/ImageMagick/7.0.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix index 64c5a31a756..1eb2e4320d6 100644 --- a/pkgs/applications/graphics/ImageMagick/7.0.nix +++ b/pkgs/applications/graphics/ImageMagick/7.0.nix @@ -18,13 +18,13 @@ in stdenv.mkDerivation rec { pname = "imagemagick"; - version = "7.0.11-12"; + version = "7.0.11-13"; src = fetchFromGitHub { owner = "ImageMagick"; repo = "ImageMagick"; rev = version; - sha256 = "sha256-vTCfpHcja0z/aplcunUDlg/90EbfrR/xQ9bzdG0n2RY="; + sha256 = "sha256-6dYc636m1OeRqIPv5NFz/K8OUvl6sgEQKjfvTngR2Ms="; }; outputs = [ "out" "dev" "doc" ]; # bin/ isn't really big From 036b557bd9fd44073a68e722164ec89d327f3afb Mon Sep 17 00:00:00 2001 From: Atemu Date: Tue, 18 May 2021 13:12:28 +0200 Subject: [PATCH 06/10] libndctl: build docs with asciidoc instead of asciidoctor Removes dependency on ruby 2.7 and isn't much slower (cherry picked from commit 786579c0b8ee5311af04feb036d04b78efd4b5b2) --- pkgs/development/libraries/libndctl/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libndctl/default.nix b/pkgs/development/libraries/libndctl/default.nix index 91a2c378c03..6e82191e755 100644 --- a/pkgs/development/libraries/libndctl/default.nix +++ b/pkgs/development/libraries/libndctl/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchFromGitHub, autoreconfHook -, asciidoctor, pkg-config, xmlto, docbook_xsl, docbook_xml_dtd_45, libxslt +, asciidoc, pkg-config, xmlto, docbook_xsl, docbook_xml_dtd_45, libxslt , json_c, kmod, which, util-linux, udev, keyutils }: @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "lib" "man" "dev" ]; nativeBuildInputs = - [ autoreconfHook asciidoctor pkg-config xmlto docbook_xml_dtd_45 docbook_xsl libxslt + [ autoreconfHook asciidoc pkg-config xmlto docbook_xml_dtd_45 docbook_xsl libxslt which ]; @@ -28,6 +28,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--without-bash" "--without-systemd" + "--disable-asciidoctor" # depends on ruby 2.7, use asciidoc instead ]; patchPhase = '' From d77ece7e2739f59ffe4f5be418e1eb43ff4a7e62 Mon Sep 17 00:00:00 2001 From: Atemu Date: Wed, 19 May 2021 16:18:21 +0200 Subject: [PATCH 07/10] Revert "git: Use asciidoctor instead of asciidoc for manpages" This reverts commit bbf96d898b96ea2d1ff19a09e545499e4f32d8d0. Removes dependency on ruby 2.7 and isn't much slower. See https://github.com/NixOS/nixpkgs/pull/123502 for more info (cherry picked from commit 88c2c543bf01063adf57ca2f4ff200cf8fbbd18b) --- .../version-management/git-and-tools/git/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 8ad150f1306..53ac8a0d1a0 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -2,7 +2,7 @@ , curl, openssl, zlib, expat, perlPackages, python3, gettext, cpio , gnugrep, gnused, gawk, coreutils # needed at runtime by git-filter-branch etc , openssh, pcre2 -, asciidoctor, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xsl_ns, docbook_xml_dtd_45 +, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_45 , libxslt, tcl, tk, makeWrapper, libiconv , svnSupport, subversionClient, perlLibs, smtpPerlLibs , perlSupport ? stdenv.buildPlatform == stdenv.hostPlatform @@ -68,8 +68,8 @@ stdenv.mkDerivation { ''; nativeBuildInputs = [ gettext perlPackages.perl makeWrapper ] - ++ lib.optionals withManual [ asciidoctor texinfo xmlto docbook2x - docbook_xsl docbook_xsl_ns docbook_xml_dtd_45 libxslt ]; + ++ lib.optionals withManual [ asciidoc texinfo xmlto docbook2x + docbook_xsl docbook_xml_dtd_45 libxslt ]; buildInputs = [curl openssl zlib expat cpio libiconv] ++ lib.optionals perlSupport [ perlPackages.perl ] ++ lib.optionals guiSupport [tcl tk] @@ -148,7 +148,7 @@ stdenv.mkDerivation { } # Install git-subtree. - make -C contrib/subtree install ${lib.optionalString withManual "USE_ASCIIDOCTOR=1 install-doc"} + make -C contrib/subtree install ${lib.optionalString withManual "install-doc"} rm -rf contrib/subtree # Install contrib stuff. @@ -233,7 +233,7 @@ stdenv.mkDerivation { '') + lib.optionalString withManual ''# Install man pages - make -j $NIX_BUILD_CORES -l $NIX_BUILD_CORES USE_ASCIIDOCTOR=1 PERL_PATH="${buildPackages.perl}/bin/perl" cmd-list.made install install-html \ + make -j $NIX_BUILD_CORES -l $NIX_BUILD_CORES PERL_PATH="${buildPackages.perl}/bin/perl" cmd-list.made install install-html \ -C Documentation '' + (if guiSupport then '' From 76e136bb5eeb79de8a00a43f8c8dc6eef11934df Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Sat, 15 May 2021 07:58:22 +0000 Subject: [PATCH 08/10] rustc: 1_52, use correct llvm version --- pkgs/development/compilers/rust/1_52.nix | 13 +++++++------ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/development/compilers/rust/1_52.nix b/pkgs/development/compilers/rust/1_52.nix index 775792d06f6..822708741bd 100644 --- a/pkgs/development/compilers/rust/1_52.nix +++ b/pkgs/development/compilers/rust/1_52.nix @@ -15,21 +15,22 @@ , CoreFoundation, Security , pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost , makeRustPlatform -, llvmPackages_11, llvm_11 +, llvmPackages_11 +, llvmPackages_12, llvm_12 } @ args: import ./default.nix { rustcVersion = "1.52.1"; rustcSha256 = "sha256-Om8jom0Oj4erv78yxc19qgwLcdCYar78Vrml+/vQv5g="; - llvmSharedForBuild = pkgsBuildBuild.llvmPackages_11.libllvm.override { enableSharedLibraries = true; }; - llvmSharedForHost = pkgsBuildHost.llvmPackages_11.libllvm.override { enableSharedLibraries = true; }; - llvmSharedForTarget = pkgsBuildTarget.llvmPackages_11.libllvm.override { enableSharedLibraries = true; }; + llvmSharedForBuild = pkgsBuildBuild.llvmPackages_12.libllvm.override { enableSharedLibraries = true; }; + llvmSharedForHost = pkgsBuildHost.llvmPackages_12.libllvm.override { enableSharedLibraries = true; }; + llvmSharedForTarget = pkgsBuildTarget.llvmPackages_12.libllvm.override { enableSharedLibraries = true; }; llvmBootstrapForDarwin = llvmPackages_11; # For use at runtime - llvmShared = llvm_11.override { enableSharedLibraries = true; }; + llvmShared = llvm_12.override { enableSharedLibraries = true; }; # Note: the version MUST be one version prior to the version we're # building @@ -55,4 +56,4 @@ import ./default.nix { ]; } -(builtins.removeAttrs args [ "fetchpatch" "pkgsBuildHost" "llvmPackages_11" "llvm_11"]) +(builtins.removeAttrs args [ "fetchpatch" "pkgsBuildHost" "llvmPackages_11" "llvmPackages_12" "llvm_12"]) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d428aa67201..42abd70c9ac 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11597,7 +11597,7 @@ in }; rust_1_52 = callPackage ../development/compilers/rust/1_52.nix { inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; - llvm_11 = llvmPackages_11.libllvm; + llvm_12 = llvmPackages_12.libllvm; }; rust = rust_1_52; From 1b1608a7b8a7f17afc2273c285dae67e6d85385c Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 21 May 2021 13:13:47 +0200 Subject: [PATCH 09/10] libxml2: Work around lxml API misuse (cherry picked from commit 7099f24c4a1788e074c4851d68fc7d56d7c8e3a7) --- pkgs/development/libraries/libxml2/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index ca3cbc4a188..1b58b4539e4 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl +{ stdenv, lib, fetchurl, fetchpatch , zlib, xz, libintl, python, gettext, ncurses, findXMLCatalogs , pythonSupport ? enableShared && stdenv.buildPlatform == stdenv.hostPlatform , icuSupport ? false, icu ? null @@ -27,6 +27,13 @@ stdenv.mkDerivation rec { # https://github.com/NixOS/nixpkgs/pull/63174 # https://github.com/NixOS/nixpkgs/pull/72342 ./utf8-xmlErrorFuncHandler.patch + + # Work around lxml API misuse. + # https://gitlab.gnome.org/GNOME/libxml2/issues/255 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/libxml2/commit/85b1792e37b131e7a51af98a37f92472e8de5f3f.patch"; + sha256 = "epqlNs2S0Zczox3KyCB6R2aJKh87lXydlZ0x6tLHweE="; + }) ]; outputs = [ "bin" "dev" "out" "man" "doc" ] From 813b3b2a0c7ce01f6bd91751055e5d667acdf366 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 26 May 2021 04:56:46 +0200 Subject: [PATCH 10/10] Revert "python3Packages.pywemo: disable failing test" This reverts commit 60c98baf17095794a5bf9219b3de843ae595ebca. The original issue was a result of a libxml2 regression that has since been fixed. --- pkgs/development/python-modules/pywemo/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/development/python-modules/pywemo/default.nix b/pkgs/development/python-modules/pywemo/default.nix index 7448f1f7f2c..ceb190fe753 100644 --- a/pkgs/development/python-modules/pywemo/default.nix +++ b/pkgs/development/python-modules/pywemo/default.nix @@ -47,11 +47,6 @@ buildPythonPackage rec { pytestCheckHook ]; - disabledTests = [ - # https://github.com/NixOS/nixpkgs/issues/124165 - "test_bridge_getdevicestatus" - ]; - pythonImportsCheck = [ "pywemo" ]; meta = with lib; {