From 3e880bad79d2cef9afc02db6d635e30479f18418 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 20 Apr 2020 19:51:49 -0400 Subject: [PATCH 01/72] darwin.cctools: split man output --- pkgs/os-specific/darwin/cctools/port.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index 368f2938064..e73d185fc41 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -28,7 +28,7 @@ let sha256 = "0h8b1my0wf1jyjq63wbiqkl2clgxsf87f6i4fjhqs431fzlq8sac"; }; - outputs = [ "out" "dev" ]; + outputs = [ "out" "dev" "man" ]; nativeBuildInputs = [ autoconf automake libtool autoreconfHook ]; buildInputs = [ libuuid ] From c450617f99ede98b7641eb77e60b17ca1812dbb8 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 20 Apr 2020 23:47:17 -0400 Subject: [PATCH 02/72] bintools-wrapper: only propagate .info output if it exists in the original --- pkgs/build-support/bintools-wrapper/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 84020505a63..5cc99c6412a 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -85,7 +85,7 @@ stdenv.mkDerivation { inherit targetPrefix infixSalt; - outputs = [ "out" ] ++ optionals propagateDoc [ "man" "info" ]; + outputs = [ "out" ] ++ optionals propagateDoc ([ "man" ] ++ optional (bintools ? info) "info"); passthru = { inherit bintools libc nativeTools nativeLibc nativePrefix; @@ -259,14 +259,15 @@ stdenv.mkDerivation { printWords ${bintools_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages '' - + optionalString propagateDoc '' + + optionalString propagateDoc ('' ## ## Man page and info support ## ln -s ${bintools.man} $man + '' + optionalString (bintools ? info) '' ln -s ${bintools.info} $info - '' + '') + '' ## From 125c469d3ee8ee6d4aea285e0aff456031435572 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 20 Apr 2020 20:05:35 -0400 Subject: [PATCH 03/72] darwin.binutils.bintools: propagate man pages from cctools --- pkgs/os-specific/darwin/binutils/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/os-specific/darwin/binutils/default.nix b/pkgs/os-specific/darwin/binutils/default.nix index e31f9b91f97..fad33b21d04 100644 --- a/pkgs/os-specific/darwin/binutils/default.nix +++ b/pkgs/os-specific/darwin/binutils/default.nix @@ -16,7 +16,7 @@ in stdenv.mkDerivation { pname = "${targetPrefix}cctools-binutils-darwin"; inherit (cctools) version; - outputs = [ "out" "info" "man" ]; + outputs = [ "out" "man" ]; buildCommand = '' mkdir -p $out/bin $out/include @@ -42,12 +42,13 @@ stdenv.mkDerivation { ln -s ${cctools}/libexec $out/libexec - mkdir -p "$info/nix-support" "$man/nix-support" - printWords ${binutils-unwrapped.info} \ - >> $info/nix-support/propagated-build-inputs - # FIXME: cctools missing man pages - printWords ${binutils-unwrapped.man} \ - >> $man/nix-support/propagated-build-inputs + mkdir -p "$man"/share/man/man{1,5} + for i in ${builtins.concatStringsSep " " cmds}; do + for path in "${cctools.man}"/share/man/man?/$i.*; do + dest_path="$man''${path#${cctools.man}}" + ln -sv "$path" "$dest_path" + done + done ''; passthru = { From c00ad799a084ec2896ebfefff3ae6b31eade49d5 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 20 Apr 2020 23:52:24 -0400 Subject: [PATCH 04/72] darwin.cctools: install ar man pages In the distribution they are located in a separate directory from the others and the standard installation doesn't process them. --- pkgs/os-specific/darwin/cctools/port.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index e73d185fc41..0c25f225291 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -1,4 +1,5 @@ { stdenv, fetchFromGitHub, autoconf, automake, libtool, autoreconfHook +, installShellFiles , libcxxabi, libuuid , libobjc ? null, maloader ? null , enableTapiSupport ? true, libtapi @@ -30,7 +31,7 @@ let outputs = [ "out" "dev" "man" ]; - nativeBuildInputs = [ autoconf automake libtool autoreconfHook ]; + nativeBuildInputs = [ autoconf automake libtool autoreconfHook installShellFiles ]; buildInputs = [ libuuid ] ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ] ++ stdenv.lib.optional enableTapiSupport libtapi; @@ -88,6 +89,8 @@ let pushd include make DSTROOT=$out/include RC_OS=common install popd + + installManPage ar/ar.{1,5} ''; passthru = { From 3ec47a7bb0b297bb6159a17c34f6f4945a7f765b Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Fri, 24 Apr 2020 14:15:44 +0200 Subject: [PATCH 05/72] libcbor: Fix pkgconfig being placed correctly Fixes #85932 --- pkgs/development/libraries/libcbor/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/libcbor/default.nix b/pkgs/development/libraries/libcbor/default.nix index 7067caa42c0..9b6a54d92f9 100644 --- a/pkgs/development/libraries/libcbor/default.nix +++ b/pkgs/development/libraries/libcbor/default.nix @@ -16,6 +16,8 @@ stdenv.mkDerivation rec { doCheck = false; # needs "-DWITH_TESTS=ON", but fails w/compilation error + cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ]; + NIX_CFLAGS_COMPILE = "-fno-lto"; meta = with stdenv.lib; { From ff642c5694881f5009232f85e956edeeb89e0f97 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Fri, 24 Apr 2020 10:22:21 -0500 Subject: [PATCH 06/72] llvm/compiler-rt.nix: add i{4,5,6}86 to X86 architecture Fixes #85622 --- pkgs/development/compilers/llvm/10/compiler-rt.nix | 5 ++++- pkgs/development/compilers/llvm/6/compiler-rt.nix | 5 ++++- pkgs/development/compilers/llvm/7/compiler-rt.nix | 5 ++++- pkgs/development/compilers/llvm/8/compiler-rt.nix | 5 ++++- pkgs/development/compilers/llvm/9/compiler-rt.nix | 5 ++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/pkgs/development/compilers/llvm/10/compiler-rt.nix b/pkgs/development/compilers/llvm/10/compiler-rt.nix index 4d31229d64c..c0ea436ae27 100644 --- a/pkgs/development/compilers/llvm/10/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/10/compiler-rt.nix @@ -55,7 +55,10 @@ stdenv.mkDerivation rec { # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by # a flag and turn the flag off during the stdenv build. - postPatch = stdenv.lib.optionalString stdenv.isDarwin '' + postPatch = '' + substituteInPlace cmake/builtin-config-ix.cmake \ + --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' + '' + stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' '' + stdenv.lib.optionalString (useLLVM) '' diff --git a/pkgs/development/compilers/llvm/6/compiler-rt.nix b/pkgs/development/compilers/llvm/6/compiler-rt.nix index 1bdba107d7d..abb6796e3c7 100644 --- a/pkgs/development/compilers/llvm/6/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/6/compiler-rt.nix @@ -54,7 +54,10 @@ stdenv.mkDerivation { # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by # a flag and turn the flag off during the stdenv build. - postPatch = stdenv.lib.optionalString stdenv.isDarwin '' + postPatch = '' + substituteInPlace cmake/builtin-config-ix.cmake \ + --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' + '' + stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' '' + stdenv.lib.optionalString (useLLVM) '' diff --git a/pkgs/development/compilers/llvm/7/compiler-rt.nix b/pkgs/development/compilers/llvm/7/compiler-rt.nix index 055fb01215f..e83a4a3c26f 100644 --- a/pkgs/development/compilers/llvm/7/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/7/compiler-rt.nix @@ -55,7 +55,10 @@ stdenv.mkDerivation { # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by # a flag and turn the flag off during the stdenv build. - postPatch = stdenv.lib.optionalString stdenv.isDarwin '' + postPatch = '' + substituteInPlace cmake/builtin-config-ix.cmake \ + --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' + '' + stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' '' + stdenv.lib.optionalString (useLLVM) '' diff --git a/pkgs/development/compilers/llvm/8/compiler-rt.nix b/pkgs/development/compilers/llvm/8/compiler-rt.nix index 573c198d6da..b11659a78cc 100644 --- a/pkgs/development/compilers/llvm/8/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/8/compiler-rt.nix @@ -55,7 +55,10 @@ stdenv.mkDerivation { # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by # a flag and turn the flag off during the stdenv build. - postPatch = stdenv.lib.optionalString stdenv.isDarwin '' + postPatch = '' + substituteInPlace cmake/builtin-config-ix.cmake \ + --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' + '' + stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' '' + stdenv.lib.optionalString (useLLVM) '' diff --git a/pkgs/development/compilers/llvm/9/compiler-rt.nix b/pkgs/development/compilers/llvm/9/compiler-rt.nix index c7723a98291..7d712017eae 100644 --- a/pkgs/development/compilers/llvm/9/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/9/compiler-rt.nix @@ -54,7 +54,10 @@ stdenv.mkDerivation rec { # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by # a flag and turn the flag off during the stdenv build. - postPatch = stdenv.lib.optionalString stdenv.isDarwin '' + postPatch = '' + substituteInPlace cmake/builtin-config-ix.cmake \ + --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' + '' + stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace cmake/config-ix.cmake \ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)' '' + stdenv.lib.optionalString (useLLVM) '' From 3c00ca03a251693e58eb4e3c247ee1f640215783 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 26 Apr 2020 16:31:49 -0400 Subject: [PATCH 07/72] meson: Don't set CC and CXX I've since convinced upstream to not use such vars for the build platform during cross. Finally! --- pkgs/development/tools/build-managers/meson/default.nix | 2 -- pkgs/development/tools/build-managers/meson/setup-hook.sh | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index 15b0a5ffcd0..977ffe837ec 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -90,8 +90,6 @@ python3Packages.buildPythonApplication rec { # checkInputs = [ ninja pkgconfig ]; # checkPhase = "python ./run_project_tests.py"; - inherit (stdenv) cc; - isCross = stdenv.targetPlatform != stdenv.hostPlatform; meta = with lib; { diff --git a/pkgs/development/tools/build-managers/meson/setup-hook.sh b/pkgs/development/tools/build-managers/meson/setup-hook.sh index 8d76ecdaf32..aef18e65ea1 100644 --- a/pkgs/development/tools/build-managers/meson/setup-hook.sh +++ b/pkgs/development/tools/build-managers/meson/setup-hook.sh @@ -25,7 +25,7 @@ mesonConfigurePhase() { echo "meson flags: $mesonFlags ${mesonFlagsArray[@]}" - CC=@cc@/bin/cc CXX=@cc@/bin/c++ meson build $mesonFlags "${mesonFlagsArray[@]}" + meson build $mesonFlags "${mesonFlagsArray[@]}" cd build if ! [[ -v enableParallelBuilding ]]; then From 080c064d1da6c7292d99d9dd0b8468352754aff1 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Thu, 23 Apr 2020 10:23:32 -0700 Subject: [PATCH 08/72] opencv4: 4.1.2 -> 4.3.0 --- pkgs/development/libraries/opencv/4.x.nix | 14 +++-- .../cmake-don-t-use-OpenCVFindOpenEXR.patch | 55 +++++++++++++++++++ 2 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 pkgs/development/libraries/opencv/cmake-don-t-use-OpenCVFindOpenEXR.patch diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index abec6e1ace5..9dcb9956838 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -38,20 +38,20 @@ assert blas.implementation == "openblas" && lapack.implementation == "openblas"; let - version = "4.1.2"; + version = "4.3.0"; src = fetchFromGitHub { owner = "opencv"; repo = "opencv"; rev = version; - sha256 = "0c98ziwvfrzdzwn52a36d37n5rac8zmxq2jn479bzfaii1bib8xx"; + sha256 = "1r9bq9p1x99g2y8jvj9428sgqvljz75dm5vrfsma7hh5wjhz9775"; }; contribSrc = fetchFromGitHub { owner = "opencv"; repo = "opencv_contrib"; rev = version; - sha256 = "10ryyxhggin5dk5glf4ycyrfryqf50f4bs10biv6nxlrrinm2di4"; + sha256 = "068b4f95rlryab3mffxs2w6dnbmbhrnpsdgl007rxk4bwnz29y49"; }; # Contrib must be built in order to enable Tesseract support: @@ -62,8 +62,8 @@ let src = fetchFromGitHub { owner = "opencv"; repo = "opencv_3rdparty"; - rev = "32e315a5b106a7b89dbed51c28f8120a48b368b4"; - sha256 = "19w9f0r16072s59diqxsr5q6nmwyz9gnxjs49nglzhd66p3ddbkp"; + rev = "a56b6ac6f030c312b2dce17430eef13aed9af274"; + sha256 = "1msbkc3zixx61rcg6a04i1bcfhw1phgsrh93glq1n80hgsk3nbjq"; } + "/ippicv"; files = let name = platform : "ippicv_2019_${platform}_general_20180723.tgz"; in if stdenv.hostPlatform.system == "x86_64-linux" then @@ -168,7 +168,9 @@ stdenv.mkDerivation { # Also, work around https://github.com/NixOS/nixpkgs/issues/26304 with # what appears to be some stray headers in dnn/misc/tensorflow # in contrib when generating the Python bindings: - patches = lib.optional enableCuda ./cuda_opt_flow.patch; + patches = [ + ./cmake-don-t-use-OpenCVFindOpenEXR.patch + ] ++ lib.optional enableCuda ./cuda_opt_flow.patch; postPatch = '' sed -i '/Add these standard paths to the search paths for FIND_LIBRARY/,/^\s*$/{d}' CMakeLists.txt sed -i -e 's|if len(decls) == 0:|if len(decls) == 0 or "opencv2/" not in hdr:|' ./modules/python/src2/gen2.py diff --git a/pkgs/development/libraries/opencv/cmake-don-t-use-OpenCVFindOpenEXR.patch b/pkgs/development/libraries/opencv/cmake-don-t-use-OpenCVFindOpenEXR.patch new file mode 100644 index 00000000000..dc80b09b646 --- /dev/null +++ b/pkgs/development/libraries/opencv/cmake-don-t-use-OpenCVFindOpenEXR.patch @@ -0,0 +1,55 @@ +From 6d988c08e852379a163ecd20df8639196d84d014 Mon Sep 17 00:00:00 2001 +From: Bernardo Meurer +Date: Sun, 26 Apr 2020 14:50:25 -0700 +Subject: [PATCH] cmake: don't use OpenCVFindOpenEXR + +Use find_package for this. +--- + CMakeLists.txt | 2 ++ + cmake/OpenCVFindLibsGrfmt.cmake | 15 +++------------ + 2 files changed, 5 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4c0b3880fc..0360469350 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,6 +14,8 @@ FATAL: In-source builds are not allowed. + ") + endif() + ++# the future! ++include(FindPkgConfig) + + include(cmake/OpenCVMinDepVersions.cmake) + +diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake +index 0beaf19317..4c5e46e615 100644 +--- a/cmake/OpenCVFindLibsGrfmt.cmake ++++ b/cmake/OpenCVFindLibsGrfmt.cmake +@@ -227,20 +227,11 @@ endif() + # --- OpenEXR (optional) --- + if(WITH_OPENEXR) + ocv_clear_vars(HAVE_OPENEXR) +- if(NOT BUILD_OPENEXR) +- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake") +- endif() +- ++ pkg_check_modules(OPENEXR OpenEXR) + if(OPENEXR_FOUND) + set(HAVE_OPENEXR YES) +- else() +- ocv_clear_vars(OPENEXR_INCLUDE_PATHS OPENEXR_LIBRARIES OPENEXR_ILMIMF_LIBRARY OPENEXR_VERSION) +- +- set(OPENEXR_LIBRARIES IlmImf) +- add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/openexr") +- if(OPENEXR_VERSION) # check via TARGET doesn't work +- set(HAVE_OPENEXR YES) +- endif() ++ set(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_DIRS}) ++ set(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES}) + endif() + endif() + +-- +2.26.1 + From c5e3472e2072ed0998571ce3961b8df65e2862cc Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Sun, 26 Apr 2020 13:11:24 -0700 Subject: [PATCH 09/72] coreutils: set ac_cv_func_lchmod=no Bumping binutils to 2.32 broke coreutils for unknown reasons[1]. Upon further investigation we found that there was some issue with mknod inside a chroot[2][3], which setting ac_cv_func_lchmod to "no" _somehow_ fixes. We apply this fix and hope to never have to debug this again. Thanks to @flokli and @lnl7 who helped me chase after this and @pbogdan who found the fix in the fedora build. [1]: https://github.com/NixOS/nixpkgs/pull/85951 [2]: https://github.com/NixOS/nixpkgs/pull/85951#issuecomment-619601978 [3]: https://bugzilla.redhat.com/show_bug.cgi?id=1811038 --- pkgs/tools/misc/coreutils/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index 49edc002bec..b39bef7cb2d 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -79,6 +79,7 @@ stdenv.mkDerivation (rec { ++ optional (singleBinary != false) ("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}") ++ optional withOpenssl "--with-openssl" + ++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no" ++ optional stdenv.hostPlatform.isSunOS "ac_cv_func_inotify_init=no" ++ optional withPrefix "--program-prefix=g" ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc == "glibc") [ From efdb29597a76c526dc0d9a55f8adf2ec5c33b0ee Mon Sep 17 00:00:00 2001 From: Guillaume Bouchard Date: Tue, 21 Jan 2020 20:09:13 +0100 Subject: [PATCH 10/72] binutils: 2.31.1 -> 2.33.1 - I've removed the stack of patch linked to https://sourceware.org/bugzilla/show_bug.cgi?id=23428 . The associated issue says it is closed and targeted for 2.32. - I've ugraded the "no_plugin" patch. The logic changed in https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=41f37a6fb71f2a3de388108f5cdfca9cbe6e9d51 and I tried to keep the same logic by disabling everything. It closes https://github.com/NixOS/nixpkgs/issues/78197 --- .../tools/misc/binutils/default.nix | 10 ++----- .../tools/misc/binutils/no-plugins.patch | 26 ++++++++++--------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index cd05ea354ca..e1ff92d00f4 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -16,7 +16,7 @@ let # Remove gold-symbol-visibility patch when updating, the proper fix # is now upstream. # https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=330b90b5ffbbc20c5de6ae6c7f60c40fab2e7a4f;hp=99181ccac0fc7d82e7dabb05dc7466e91f1645d3 - version = "2.31.1"; + version = "2.33.1"; basename = "binutils"; # The targetPrefix prepended to binary names to allow multiple binuntils on the # PATH to both be usable. @@ -31,7 +31,7 @@ let # HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM normal-src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl { url = "mirror://gnu/binutils/${basename}-${version}.tar.bz2"; - sha256 = "1l34hn1zkmhr1wcrgf0d4z7r3najxnw3cx2y2fk7v55zjlk3ik7z"; + sha256 = "1cmd0riv37bqy9mwbg6n3523qgr8b3bbm5kwj19sjrasl4yq9d0c"; }); in @@ -68,12 +68,6 @@ stdenv.mkDerivation { [ # https://sourceware.org/bugzilla/show_bug.cgi?id=22868 ./gold-symbol-visibility.patch - - # https://sourceware.org/bugzilla/show_bug.cgi?id=23428 - # un-break features so linking against musl doesn't produce crash-only binaries - ./0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch - ./0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch - ./0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch ] ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch; outputs = [ "out" "info" "man" ]; diff --git a/pkgs/development/tools/misc/binutils/no-plugins.patch b/pkgs/development/tools/misc/binutils/no-plugins.patch index 9624b7976b7..68cf51b7dd3 100644 --- a/pkgs/development/tools/misc/binutils/no-plugins.patch +++ b/pkgs/development/tools/misc/binutils/no-plugins.patch @@ -1,19 +1,21 @@ -diff -ru binutils-2.27-orig/bfd/plugin.c binutils-2.27/bfd/plugin.c ---- binutils-2.27-orig/bfd/plugin.c 2016-10-14 17:46:30.791315555 +0200 -+++ binutils-2.27/bfd/plugin.c 2016-10-14 17:46:38.583298765 +0200 -@@ -333,6 +333,7 @@ +diff --git a/bfd/plugin.c b/bfd/plugin.c +index 537ab60311..bfe7957f96 100644 +--- a/bfd/plugin.c ++++ b/bfd/plugin.c +@@ -386,6 +386,7 @@ load_plugin (bfd *abfd) if (plugin_program_name == NULL) return found; +#if 0 - plugin_dir = concat (BINDIR, "/../lib/bfd-plugins", NULL); - p = make_relative_prefix (plugin_program_name, - BINDIR, -@@ -364,6 +365,7 @@ - free (p); - if (d) - closedir (d); + /* Try not to search the same dir twice, by looking at st_dev and + st_ino for the dir. If we are on a file system that always sets + st_ino to zero or the actual st_ino is zero we might waste some +@@ -437,7 +438,7 @@ load_plugin (bfd *abfd) + if (found) + break; + } +- +#endif - return found; } + From c5f602f5b764ac6ee8e1e0c1b1b3ead88c381da7 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Fri, 24 Apr 2020 11:22:33 -0700 Subject: [PATCH 11/72] binutils: 2.33.1 -> 2.34 --- ...OPERTY_X86_ISA_1_USED-note-if-needed.patch | 517 ---------------- ...operly-add-X86_ISA_1_NEEDED-property.patch | 137 ---- ...ly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch | 583 ------------------ .../tools/misc/binutils/default.nix | 16 +- .../binutils/gold-symbol-visibility.patch | 79 --- 5 files changed, 6 insertions(+), 1326 deletions(-) delete mode 100644 pkgs/development/tools/misc/binutils/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch delete mode 100644 pkgs/development/tools/misc/binutils/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch delete mode 100644 pkgs/development/tools/misc/binutils/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch delete mode 100644 pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch diff --git a/pkgs/development/tools/misc/binutils/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch b/pkgs/development/tools/misc/binutils/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch deleted file mode 100644 index 5a047b0f070..00000000000 --- a/pkgs/development/tools/misc/binutils/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch +++ /dev/null @@ -1,517 +0,0 @@ -From 6737a6b34f4823deb7142f27b4074831a37ac1e1 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" -Date: Fri, 20 Jul 2018 09:18:47 -0700 -Subject: [PATCH] x86: Add a GNU_PROPERTY_X86_ISA_1_USED note if needed - -When -z separate-code, which is enabled by default for Linux/x86, is -used to create executable, ld won't place any data in the code-only -PT_LOAD segment. If there are no data sections placed before the -code-only PT_LOAD segment, the program headers won't be mapped into -any PT_LOAD segment. When the executable tries to access it (based -on the program header address passed in AT_PHDR), it will lead to -segfault. This patch inserts a GNU_PROPERTY_X86_ISA_1_USED note if -there may be no data sections before the text section so that the -first PT_LOAD segment won't be code-only and will contain the program -header. - -Testcases are adjusted to either pass "-z noseparate-code" to ld or -discard the .note.gnu.property section. A Linux/x86 run-time test is -added. - -bfd/ - - PR ld/23428 - * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the - separate code program header is needed, make sure that the first - read-only PT_LOAD segment has no code by adding a - GNU_PROPERTY_X86_ISA_1_USED note. - -ld/ - - PR ld/23428 - * testsuite/ld-elf/linux-x86.S: New file. - * testsuite/ld-elf/linux-x86.exp: Likewise. - * testsuite/ld-elf/pr23428.c: Likewise. - * testsuite/ld-elf/sec64k.exp: Pass "-z noseparate-code" to ld - for Linux/x86 targets. - * testsuite/ld-i386/abs-iamcu.d: Likewise. - * testsuite/ld-i386/abs.d: Likewise. - * testsuite/ld-i386/pr12718.d: Likewise. - * testsuite/ld-i386/pr12921.d: Likewise. - * testsuite/ld-x86-64/abs-k1om.d: Likewise. - * testsuite/ld-x86-64/abs-l1om.d: Likewise. - * testsuite/ld-x86-64/abs.d: Likewise. - * testsuite/ld-x86-64/pr12718.d: Likewise. - * testsuite/ld-x86-64/pr12921.d: Likewise. - * testsuite/ld-linkonce/zeroeh.ld: Discard .note.gnu.property - section. - * testsuite/ld-scripts/print-memory-usage.t: Likewise. - * testsuite/ld-scripts/size-2.t: Likewise. - * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Use ld - to create executable if language is "asm". - -(cherry picked from commit 241e64e3b42cd9eba514b8e0ad2ef39a337f10a5) ---- - bfd/elfxx-x86.c | 60 ++++++++++++++----- - ld/testsuite/ld-elf/linux-x86.S | 63 ++++++++++++++++++++ - ld/testsuite/ld-elf/linux-x86.exp | 46 ++++++++++++++ - ld/testsuite/ld-elf/pr23428.c | 43 +++++++++++++ - ld/testsuite/ld-elf/sec64k.exp | 2 + - ld/testsuite/ld-i386/abs-iamcu.d | 2 +- - ld/testsuite/ld-i386/abs.d | 2 +- - ld/testsuite/ld-i386/pr12718.d | 2 +- - ld/testsuite/ld-i386/pr12921.d | 2 +- - ld/testsuite/ld-linkonce/zeroeh.ld | 1 + - ld/testsuite/ld-scripts/print-memory-usage.t | 2 + - ld/testsuite/ld-scripts/size-2.t | 1 + - ld/testsuite/ld-x86-64/abs-k1om.d | 2 +- - ld/testsuite/ld-x86-64/abs-l1om.d | 2 +- - ld/testsuite/ld-x86-64/abs.d | 2 +- - ld/testsuite/ld-x86-64/pr12718.d | 2 +- - ld/testsuite/ld-x86-64/pr12921.d | 2 +- - ld/testsuite/lib/ld-lib.exp | 5 +- - 20 files changed, 248 insertions(+), 25 deletions(-) - create mode 100644 ld/testsuite/ld-elf/linux-x86.S - create mode 100644 ld/testsuite/ld-elf/linux-x86.exp - create mode 100644 ld/testsuite/ld-elf/pr23428.c - -diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c -index a2497aab86..2e4ff88f1f 100644 ---- a/bfd/elfxx-x86.c -+++ b/bfd/elfxx-x86.c -@@ -2524,6 +2524,7 @@ _bfd_x86_elf_link_setup_gnu_properties - const struct elf_backend_data *bed; - unsigned int class_align = ABI_64_P (info->output_bfd) ? 3 : 2; - unsigned int got_align; -+ bfd_boolean has_text = FALSE; - - features = 0; - if (info->ibt) -@@ -2538,24 +2539,59 @@ _bfd_x86_elf_link_setup_gnu_properties - if (bfd_get_flavour (pbfd) == bfd_target_elf_flavour - && bfd_count_sections (pbfd) != 0) - { -+ if (!has_text) -+ { -+ /* Check if there is no non-empty text section. */ -+ sec = bfd_get_section_by_name (pbfd, ".text"); -+ if (sec != NULL && sec->size != 0) -+ has_text = TRUE; -+ } -+ - ebfd = pbfd; - - if (elf_properties (pbfd) != NULL) - break; - } - -- if (ebfd != NULL && features) -+ bed = get_elf_backend_data (info->output_bfd); -+ -+ htab = elf_x86_hash_table (info, bed->target_id); -+ if (htab == NULL) -+ return pbfd; -+ -+ if (ebfd != NULL) - { -- /* If features is set, add GNU_PROPERTY_X86_FEATURE_1_IBT and -- GNU_PROPERTY_X86_FEATURE_1_SHSTK. */ -- prop = _bfd_elf_get_property (ebfd, -- GNU_PROPERTY_X86_FEATURE_1_AND, -- 4); -- prop->u.number |= features; -- prop->pr_kind = property_number; -+ prop = NULL; -+ if (features) -+ { -+ /* If features is set, add GNU_PROPERTY_X86_FEATURE_1_IBT and -+ GNU_PROPERTY_X86_FEATURE_1_SHSTK. */ -+ prop = _bfd_elf_get_property (ebfd, -+ GNU_PROPERTY_X86_FEATURE_1_AND, -+ 4); -+ prop->u.number |= features; -+ prop->pr_kind = property_number; -+ } -+ else if (has_text -+ && elf_properties (ebfd) == NULL -+ && elf_tdata (info->output_bfd)->o->build_id.sec == NULL -+ && !htab->elf.dynamic_sections_created -+ && !info->traditional_format -+ && (info->output_bfd->flags & D_PAGED) != 0 -+ && info->separate_code) -+ { -+ /* If the separate code program header is needed, make sure -+ that the first read-only PT_LOAD segment has no code by -+ adding a GNU_PROPERTY_X86_ISA_1_USED note. */ -+ prop = _bfd_elf_get_property (ebfd, -+ GNU_PROPERTY_X86_ISA_1_USED, -+ 4); -+ prop->u.number = GNU_PROPERTY_X86_ISA_1_486; -+ prop->pr_kind = property_number; -+ } - - /* Create the GNU property note section if needed. */ -- if (pbfd == NULL) -+ if (prop != NULL && pbfd == NULL) - { - sec = bfd_make_section_with_flags (ebfd, - NOTE_GNU_PROPERTY_SECTION_NAME, -@@ -2581,12 +2617,6 @@ error_alignment: - - pbfd = _bfd_elf_link_setup_gnu_properties (info); - -- bed = get_elf_backend_data (info->output_bfd); -- -- htab = elf_x86_hash_table (info, bed->target_id); -- if (htab == NULL) -- return pbfd; -- - htab->r_info = init_table->r_info; - htab->r_sym = init_table->r_sym; - -diff --git a/ld/testsuite/ld-elf/linux-x86.S b/ld/testsuite/ld-elf/linux-x86.S -new file mode 100644 -index 0000000000..bdf40c6e01 ---- /dev/null -+++ b/ld/testsuite/ld-elf/linux-x86.S -@@ -0,0 +1,63 @@ -+ .text -+ .globl _start -+ .type _start,@function -+ .p2align 4 -+_start: -+ xorl %ebp, %ebp -+#ifdef __LP64__ -+ popq %rdi -+ movq %rsp, %rsi -+ andq $~15, %rsp -+#elif defined __x86_64__ -+ mov (%rsp),%edi -+ addl $4,%esp -+ movl %esp, %esi -+ andl $~15, %esp -+#else -+ popl %esi -+ movl %esp, %ecx -+ andl $~15, %esp -+ -+ subl $8,%esp -+ pushl %ecx -+ pushl %esi -+#endif -+ -+ call main -+ -+ hlt -+ -+ .type syscall, @function -+ .globl syscall -+ .p2align 4 -+syscall: -+#ifdef __x86_64__ -+ movq %rdi, %rax /* Syscall number -> rax. */ -+ movq %rsi, %rdi /* shift arg1 - arg5. */ -+ movq %rdx, %rsi -+ movq %rcx, %rdx -+ movq %r8, %r10 -+ movq %r9, %r8 -+ movq 8(%rsp),%r9 /* arg6 is on the stack. */ -+ syscall /* Do the system call. */ -+#else -+ push %ebp -+ push %edi -+ push %esi -+ push %ebx -+ mov 0x2c(%esp),%ebp -+ mov 0x28(%esp),%edi -+ mov 0x24(%esp),%esi -+ mov 0x20(%esp),%edx -+ mov 0x1c(%esp),%ecx -+ mov 0x18(%esp),%ebx -+ mov 0x14(%esp),%eax -+ int $0x80 -+ pop %ebx -+ pop %esi -+ pop %edi -+ pop %ebp -+#endif -+ ret /* Return to caller. */ -+ .size syscall, .-syscall -+ .section .note.GNU-stack,"",@progbits -diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp -new file mode 100644 -index 0000000000..36217c6fb4 ---- /dev/null -+++ b/ld/testsuite/ld-elf/linux-x86.exp -@@ -0,0 +1,46 @@ -+# Expect script for simple native Linux/x86 tests. -+# Copyright (C) 2018 Free Software Foundation, Inc. -+# -+# This file is part of the GNU Binutils. -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, -+# MA 02110-1301, USA. -+# -+ -+# Test very simple native Linux/x86 programs with linux-x86.S. -+if { ![isnative] || [which $CC] == 0 \ -+ || (![istarget "i?86-*-linux*"] \ -+ && ![istarget "x86_64-*-linux*"] \ -+ && ![istarget "amd64-*-linux*"]) } { -+ return -+} -+ -+# Add $PLT_CFLAGS if PLT is expected. -+global PLT_CFLAGS -+# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required. -+global NOPIE_CFLAGS NOPIE_LDFLAGS -+ -+run_ld_link_exec_tests [list \ -+ [list \ -+ "Run PR ld/23428 test" \ -+ "--no-dynamic-linker -z separate-code" \ -+ "" \ -+ { linux-x86.S pr23428.c } \ -+ "pr23428" \ -+ "pass.out" \ -+ "$NOPIE_CFLAGS -fno-asynchronous-unwind-tables" \ -+ "asm" \ -+ ] \ -+] -diff --git a/ld/testsuite/ld-elf/pr23428.c b/ld/testsuite/ld-elf/pr23428.c -new file mode 100644 -index 0000000000..3631ed7926 ---- /dev/null -+++ b/ld/testsuite/ld-elf/pr23428.c -@@ -0,0 +1,43 @@ -+#include -+#include -+#include -+ -+#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1) -+ -+int -+main (int argc, char **argv) -+{ -+ char **ev = &argv[argc + 1]; -+ char **evp = ev; -+ ElfW(auxv_t) *av; -+ const ElfW(Phdr) *phdr = NULL; -+ size_t phnum = 0; -+ size_t loadnum = 0; -+ int fd = STDOUT_FILENO; -+ size_t i; -+ -+ while (*evp++ != NULL) -+ ; -+ -+ av = (ElfW(auxv_t) *) evp; -+ -+ for (; av->a_type != AT_NULL; ++av) -+ switch (av->a_type) -+ { -+ case AT_PHDR: -+ phdr = (const void *) av->a_un.a_val; -+ break; -+ case AT_PHNUM: -+ phnum = av->a_un.a_val; -+ break; -+ } -+ -+ for (i = 0; i < phnum; i++, phdr++) -+ if (phdr->p_type == PT_LOAD) -+ loadnum++; -+ -+ syscall (SYS_write, fd, STRING_COMMA_LEN ("PASS\n")); -+ -+ syscall (SYS_exit, !loadnum); -+ return 0; -+} -diff --git a/ld/testsuite/ld-elf/sec64k.exp b/ld/testsuite/ld-elf/sec64k.exp -index b58139e9dd..3909c0eaa1 100644 ---- a/ld/testsuite/ld-elf/sec64k.exp -+++ b/ld/testsuite/ld-elf/sec64k.exp -@@ -177,6 +177,8 @@ if { ![istarget "d10v-*-*"] - foreach sfile $sfiles { puts $ofd "#source: $sfile" } - if { [istarget spu*-*-*] } { - puts $ofd "#ld: --local-store 0:0" -+ } elseif { [istarget "i?86-*-linux*"] || [istarget "x86_64-*-linux*"] } { -+ puts $ofd "#ld: -z noseparate-code" - } else { - puts $ofd "#ld:" - } -diff --git a/ld/testsuite/ld-i386/abs-iamcu.d b/ld/testsuite/ld-i386/abs-iamcu.d -index ac9beff2e5..aba7d6b03f 100644 ---- a/ld/testsuite/ld-i386/abs-iamcu.d -+++ b/ld/testsuite/ld-i386/abs-iamcu.d -@@ -2,7 +2,7 @@ - #source: abs.s - #source: zero.s - #as: --32 -march=iamcu --#ld: -m elf_iamcu -+#ld: -m elf_iamcu -z noseparate-code - #objdump: -rs -j .text - - .*: file format .* -diff --git a/ld/testsuite/ld-i386/abs.d b/ld/testsuite/ld-i386/abs.d -index e660aca524..191ee4456a 100644 ---- a/ld/testsuite/ld-i386/abs.d -+++ b/ld/testsuite/ld-i386/abs.d -@@ -2,7 +2,7 @@ - #as: --32 - #source: abs.s - #source: zero.s --#ld: -melf_i386 -+#ld: -melf_i386 -z noseparate-code - #objdump: -rs - - .*: file format .* -diff --git a/ld/testsuite/ld-i386/pr12718.d b/ld/testsuite/ld-i386/pr12718.d -index ec51540a42..7eba52d95e 100644 ---- a/ld/testsuite/ld-i386/pr12718.d -+++ b/ld/testsuite/ld-i386/pr12718.d -@@ -1,6 +1,6 @@ - #name: PR ld/12718 - #as: --32 --#ld: -melf_i386 -+#ld: -melf_i386 -z noseparate-code - #readelf: -S - - There are 5 section headers, starting at offset 0x[0-9a-f]+: -diff --git a/ld/testsuite/ld-i386/pr12921.d b/ld/testsuite/ld-i386/pr12921.d -index e49079b3c8..ea2da3eb51 100644 ---- a/ld/testsuite/ld-i386/pr12921.d -+++ b/ld/testsuite/ld-i386/pr12921.d -@@ -1,6 +1,6 @@ - #name: PR ld/12921 - #as: --32 --#ld: -melf_i386 -+#ld: -melf_i386 -z noseparate-code - #readelf: -S --wide - - There are 7 section headers, starting at offset 0x[0-9a-f]+: -diff --git a/ld/testsuite/ld-linkonce/zeroeh.ld b/ld/testsuite/ld-linkonce/zeroeh.ld -index b22eaa12c9..f89855a08f 100644 ---- a/ld/testsuite/ld-linkonce/zeroeh.ld -+++ b/ld/testsuite/ld-linkonce/zeroeh.ld -@@ -2,4 +2,5 @@ SECTIONS { - .text 0xa00 : { *(.text); *(.gnu.linkonce.t.*) } - .gcc_except_table 0x2000 : { *(.gcc_except_table) } - .eh_frame 0x4000 : { *(.eh_frame) } -+ /DISCARD/ : { *(.note.gnu.property) } - } -diff --git a/ld/testsuite/ld-scripts/print-memory-usage.t b/ld/testsuite/ld-scripts/print-memory-usage.t -index 5ff057a5e3..6eda1d2dc4 100644 ---- a/ld/testsuite/ld-scripts/print-memory-usage.t -+++ b/ld/testsuite/ld-scripts/print-memory-usage.t -@@ -11,4 +11,6 @@ SECTIONS - *(.data) - *(.rw) - } -+ -+ /DISCARD/ : { *(.note.gnu.property) } - } -diff --git a/ld/testsuite/ld-scripts/size-2.t b/ld/testsuite/ld-scripts/size-2.t -index 723863995e..c3c4eddab4 100644 ---- a/ld/testsuite/ld-scripts/size-2.t -+++ b/ld/testsuite/ld-scripts/size-2.t -@@ -18,4 +18,5 @@ SECTIONS - LONG (SIZEOF (.tdata)) - LONG (SIZEOF (.tbss)) - } :image -+ /DISCARD/ : { *(.note.gnu.property) } - } -diff --git a/ld/testsuite/ld-x86-64/abs-k1om.d b/ld/testsuite/ld-x86-64/abs-k1om.d -index 2c26639fc0..6b0fde0eed 100644 ---- a/ld/testsuite/ld-x86-64/abs-k1om.d -+++ b/ld/testsuite/ld-x86-64/abs-k1om.d -@@ -2,7 +2,7 @@ - #source: ../ld-i386/abs.s - #source: ../ld-i386/zero.s - #as: --64 -march=k1om --#ld: -m elf_k1om -+#ld: -m elf_k1om -z noseparate-code - #objdump: -rs -j .text - - .*: file format .* -diff --git a/ld/testsuite/ld-x86-64/abs-l1om.d b/ld/testsuite/ld-x86-64/abs-l1om.d -index 1fb96d44b7..f87869f9d0 100644 ---- a/ld/testsuite/ld-x86-64/abs-l1om.d -+++ b/ld/testsuite/ld-x86-64/abs-l1om.d -@@ -2,7 +2,7 @@ - #source: ../ld-i386/abs.s - #source: ../ld-i386/zero.s - #as: --64 -march=l1om --#ld: -m elf_l1om -+#ld: -m elf_l1om -z noseparate-code - #objdump: -rs -j .text - #target: x86_64-*-linux* - -diff --git a/ld/testsuite/ld-x86-64/abs.d b/ld/testsuite/ld-x86-64/abs.d -index b24b018639..d99ab4685d 100644 ---- a/ld/testsuite/ld-x86-64/abs.d -+++ b/ld/testsuite/ld-x86-64/abs.d -@@ -1,7 +1,7 @@ - #name: Absolute non-overflowing relocs - #source: ../ld-i386/abs.s - #source: ../ld-i386/zero.s --#ld: -+#ld: -z noseparate-code - #objdump: -rs - - .*: file format .* -diff --git a/ld/testsuite/ld-x86-64/pr12718.d b/ld/testsuite/ld-x86-64/pr12718.d -index 07d17325d0..2c503ffbaa 100644 ---- a/ld/testsuite/ld-x86-64/pr12718.d -+++ b/ld/testsuite/ld-x86-64/pr12718.d -@@ -1,6 +1,6 @@ - #name: PR ld/12718 - #as: --64 --#ld: -melf_x86_64 -+#ld: -melf_x86_64 -z noseparate-code - #readelf: -S --wide - - There are 5 section headers, starting at offset 0x[0-9a-f]+: -diff --git a/ld/testsuite/ld-x86-64/pr12921.d b/ld/testsuite/ld-x86-64/pr12921.d -index 6fe6abee09..1162d55818 100644 ---- a/ld/testsuite/ld-x86-64/pr12921.d -+++ b/ld/testsuite/ld-x86-64/pr12921.d -@@ -1,6 +1,6 @@ - #name: PR ld/12921 - #as: --64 --#ld: -melf_x86_64 -+#ld: -melf_x86_64 -z noseparate-code - #readelf: -S --wide - - There are 7 section headers, starting at offset 0x[0-9a-f]+: -diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp -index cfbefe9028..1095091882 100644 ---- a/ld/testsuite/lib/ld-lib.exp -+++ b/ld/testsuite/lib/ld-lib.exp -@@ -1482,7 +1482,10 @@ proc run_ld_link_exec_tests { ldtests args } { - continue - } - -- if { [ string match "c++" $lang ] } { -+ if { [ string match "asm" $lang ] } { -+ set link_proc ld_link -+ set link_cmd $ld -+ } elseif { [ string match "c++" $lang ] } { - set link_proc ld_link - set link_cmd $CXX - } else { --- -2.20.1 - diff --git a/pkgs/development/tools/misc/binutils/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch b/pkgs/development/tools/misc/binutils/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch deleted file mode 100644 index ca50d9a57cd..00000000000 --- a/pkgs/development/tools/misc/binutils/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch +++ /dev/null @@ -1,137 +0,0 @@ -From 28a27bdbb9500797e6767f80c8128b09112aeed5 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" -Date: Sat, 11 Aug 2018 06:41:33 -0700 -Subject: [PATCH] x86: Properly add X86_ISA_1_NEEDED property - -Existing properties may be removed during property merging. We avoid -adding X86_ISA_1_NEEDED property only if existing properties won't be -removed. - -bfd/ - - PR ld/23428 - * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't - add X86_ISA_1_NEEDED property only if existing properties won't - be removed. - -ld/ - - PR ld/23428 - * testsuite/ld-elf/dummy.s: New file. - * testsuite/ld-elf/linux-x86.S: Add X86_FEATURE_1_AND property. - * testsuite/ld-elf/linux-x86.exp: Add dummy.s to pr23428. - -(cherry picked from commit ab9e342807d132182892de1be1a92d6e91a5c1da) ---- - bfd/elfxx-x86.c | 28 ++++++++++++++++++++++------ - ld/testsuite/ld-elf/dummy.s | 1 + - ld/testsuite/ld-elf/linux-x86.S | 28 ++++++++++++++++++++++++++++ - ld/testsuite/ld-elf/linux-x86.exp | 2 +- - 6 files changed, 66 insertions(+), 7 deletions(-) - create mode 100644 ld/testsuite/ld-elf/dummy.s - -diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c -index 7ccfd25815..2d8f7b640b 100644 ---- a/bfd/elfxx-x86.c -+++ b/bfd/elfxx-x86.c -@@ -2588,7 +2588,6 @@ _bfd_x86_elf_link_setup_gnu_properties - prop->pr_kind = property_number; - } - else if (has_text -- && elf_properties (ebfd) == NULL - && elf_tdata (info->output_bfd)->o->build_id.sec == NULL - && !htab->elf.dynamic_sections_created - && !info->traditional_format -@@ -2598,11 +2597,28 @@ _bfd_x86_elf_link_setup_gnu_properties - /* If the separate code program header is needed, make sure - that the first read-only PT_LOAD segment has no code by - adding a GNU_PROPERTY_X86_ISA_1_NEEDED note. */ -- prop = _bfd_elf_get_property (ebfd, -- GNU_PROPERTY_X86_ISA_1_NEEDED, -- 4); -- prop->u.number = GNU_PROPERTY_X86_ISA_1_486; -- prop->pr_kind = property_number; -+ elf_property_list *list; -+ bfd_boolean need_property = TRUE; -+ -+ for (list = elf_properties (ebfd); list; list = list->next) -+ switch (list->property.pr_type) -+ { -+ case GNU_PROPERTY_STACK_SIZE: -+ case GNU_PROPERTY_NO_COPY_ON_PROTECTED: -+ case GNU_PROPERTY_X86_ISA_1_NEEDED: -+ /* These properties won't be removed during merging. */ -+ need_property = FALSE; -+ break; -+ } -+ -+ if (need_property) -+ { -+ prop = _bfd_elf_get_property (ebfd, -+ GNU_PROPERTY_X86_ISA_1_NEEDED, -+ 4); -+ prop->u.number = GNU_PROPERTY_X86_ISA_1_486; -+ prop->pr_kind = property_number; -+ } - } - - /* Create the GNU property note section if needed. */ -diff --git a/ld/testsuite/ld-elf/dummy.s b/ld/testsuite/ld-elf/dummy.s -new file mode 100644 -index 0000000000..403f98000d ---- /dev/null -+++ b/ld/testsuite/ld-elf/dummy.s -@@ -0,0 +1 @@ -+# Dummy -diff --git a/ld/testsuite/ld-elf/linux-x86.S b/ld/testsuite/ld-elf/linux-x86.S -index bdf40c6e01..d94abc1106 100644 ---- a/ld/testsuite/ld-elf/linux-x86.S -+++ b/ld/testsuite/ld-elf/linux-x86.S -@@ -61,3 +61,31 @@ syscall: - ret /* Return to caller. */ - .size syscall, .-syscall - .section .note.GNU-stack,"",@progbits -+ -+ .section ".note.gnu.property", "a" -+#ifdef __LP64__ -+ .p2align 3 -+#else -+ .p2align 2 -+#endif -+ .long 1f - 0f /* name length */ -+ .long 5f - 2f /* data length */ -+ .long 5 /* note type */ -+0: .asciz "GNU" /* vendor name */ -+1: -+#ifdef __LP64__ -+ .p2align 3 -+#else -+ .p2align 2 -+#endif -+2: .long 0xc0000002 /* pr_type. */ -+ .long 4f - 3f /* pr_datasz. */ -+3: -+ .long 0x2 -+4: -+#ifdef __LP64__ -+ .p2align 3 -+#else -+ .p2align 2 -+#endif -+5: -diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp -index 36217c6fb4..f6f5a80853 100644 ---- a/ld/testsuite/ld-elf/linux-x86.exp -+++ b/ld/testsuite/ld-elf/linux-x86.exp -@@ -37,7 +37,7 @@ run_ld_link_exec_tests [list \ - "Run PR ld/23428 test" \ - "--no-dynamic-linker -z separate-code" \ - "" \ -- { linux-x86.S pr23428.c } \ -+ { linux-x86.S pr23428.c dummy.s } \ - "pr23428" \ - "pass.out" \ - "$NOPIE_CFLAGS -fno-asynchronous-unwind-tables" \ --- -2.20.1 - diff --git a/pkgs/development/tools/misc/binutils/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch b/pkgs/development/tools/misc/binutils/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch deleted file mode 100644 index 866d6db8ce2..00000000000 --- a/pkgs/development/tools/misc/binutils/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch +++ /dev/null @@ -1,583 +0,0 @@ -From d55c3e36094f06bb1fb02f5eac19fdccf1d91f7e Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" -Date: Wed, 8 Aug 2018 06:09:15 -0700 -Subject: [PATCH] x86: Properly merge GNU_PROPERTY_X86_ISA_1_USED -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Without the GNU_PROPERTY_X86_ISA_1_USED property, all ISAs may be used. -If a bit in the GNU_PROPERTY_X86_ISA_1_USED property is unset, the -corresponding x86 instruction set isn’t used. When merging properties -from 2 input files and one input file doesn't have the -GNU_PROPERTY_X86_ISA_1_USED property, the output file shouldn't have -it neither. This patch removes the GNU_PROPERTY_X86_ISA_1_USED -property if an input file doesn't have it. - -This patch replaces the GNU_PROPERTY_X86_ISA_1_USED property with the -GNU_PROPERTY_X86_ISA_1_NEEDED property which is the minimum ISA -requirement. - -bfd/ - - PR ld/23486 - * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove - GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it. - (_bfd_x86_elf_link_setup_gnu_properties): Adding the - GNU_PROPERTY_X86_ISA_1_NEEDED, instead of - GNU_PROPERTY_X86_ISA_1_USED, property. - -ld/ - - PR ld/23486 - * testsuite/ld-i386/i386.exp: Run PR ld/23486 tests. - * testsuite/ld-x86-64/x86-64.exp: Likewise. - * testsuite/ld-i386/pr23486a.d: New file. - * testsuite/ld-i386/pr23486b.d: Likewise. - * testsuite/ld-x86-64/pr23486a-x32.d: Likewise. - * testsuite/ld-x86-64/pr23486a.d: Likewise. - * testsuite/ld-x86-64/pr23486a.s: Likewise. - * testsuite/ld-x86-64/pr23486b-x32.d: Likewise. - * testsuite/ld-x86-64/pr23486b.d: Likewise. - * testsuite/ld-x86-64/pr23486b.s: Likewise. - * testsuite/ld-i386/property-3.r: Remove "x86 ISA used". - * testsuite/ld-i386/property-4.r: Likewise. - * testsuite/ld-i386/property-5.r: Likewise. - * testsuite/ld-i386/property-x86-ibt3a.d: Likewise. - * testsuite/ld-i386/property-x86-ibt3b.d: Likewise. - * testsuite/ld-i386/property-x86-shstk3a.d: Likewise. - * testsuite/ld-i386/property-x86-shstk3b.d: Likewise. - * testsuite/ld-x86-64/property-3.r: Likewise. - * testsuite/ld-x86-64/property-4.r: Likewise. - * testsuite/ld-x86-64/property-5.r: Likewise. - * testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise. - * testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise. - * testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise. - * testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise. - * testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise. - * testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise. - * testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise. - * testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise. - -(cherry picked from commit f7309df20c4e787041cedc4a6aced89c15259e54) ---- - bfd/elfxx-x86.c | 25 ++++++++++++--- - ld/testsuite/ld-i386/i386.exp | 2 ++ - ld/testsuite/ld-i386/pr23486a.d | 10 ++++++ - ld/testsuite/ld-i386/pr23486b.d | 10 ++++++ - ld/testsuite/ld-i386/property-3.r | 1 - - ld/testsuite/ld-i386/property-4.r | 1 - - ld/testsuite/ld-i386/property-5.r | 1 - - ld/testsuite/ld-i386/property-x86-ibt3a.d | 5 ++- - ld/testsuite/ld-i386/property-x86-ibt3b.d | 5 ++- - ld/testsuite/ld-i386/property-x86-shstk3a.d | 5 ++- - ld/testsuite/ld-i386/property-x86-shstk3b.d | 5 ++- - ld/testsuite/ld-x86-64/pr23486a-x32.d | 10 ++++++ - ld/testsuite/ld-x86-64/pr23486a.d | 10 ++++++ - ld/testsuite/ld-x86-64/pr23486a.s | 30 +++++++++++++++++ - ld/testsuite/ld-x86-64/pr23486b-x32.d | 10 ++++++ - ld/testsuite/ld-x86-64/pr23486b.d | 10 ++++++ - ld/testsuite/ld-x86-64/pr23486b.s | 30 +++++++++++++++++ - ld/testsuite/ld-x86-64/property-3.r | 1 - - ld/testsuite/ld-x86-64/property-4.r | 1 - - ld/testsuite/ld-x86-64/property-5.r | 1 - - .../ld-x86-64/property-x86-ibt3a-x32.d | 5 ++- - ld/testsuite/ld-x86-64/property-x86-ibt3a.d | 5 ++- - .../ld-x86-64/property-x86-ibt3b-x32.d | 5 ++- - ld/testsuite/ld-x86-64/property-x86-ibt3b.d | 5 ++- - .../ld-x86-64/property-x86-shstk3a-x32.d | 5 ++- - ld/testsuite/ld-x86-64/property-x86-shstk3a.d | 5 ++- - .../ld-x86-64/property-x86-shstk3b-x32.d | 5 ++- - ld/testsuite/ld-x86-64/property-x86-shstk3b.d | 5 ++- - ld/testsuite/ld-x86-64/x86-64.exp | 4 +++ - 31 files changed, 211 insertions(+), 47 deletions(-) - create mode 100644 ld/testsuite/ld-i386/pr23486a.d - create mode 100644 ld/testsuite/ld-i386/pr23486b.d - create mode 100644 ld/testsuite/ld-x86-64/pr23486a-x32.d - create mode 100644 ld/testsuite/ld-x86-64/pr23486a.d - create mode 100644 ld/testsuite/ld-x86-64/pr23486a.s - create mode 100644 ld/testsuite/ld-x86-64/pr23486b-x32.d - create mode 100644 ld/testsuite/ld-x86-64/pr23486b.d - create mode 100644 ld/testsuite/ld-x86-64/pr23486b.s - ---- a/bfd/elfxx-x86.c -+++ b/bfd/elfxx-x86.c -@@ -2407,12 +2407,27 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info, - switch (pr_type) - { - case GNU_PROPERTY_X86_ISA_1_USED: -+ if (aprop == NULL || bprop == NULL) -+ { -+ /* Only one of APROP and BPROP can be NULL. */ -+ if (aprop != NULL) -+ { -+ /* Remove this property since the other input file doesn't -+ have it. */ -+ aprop->pr_kind = property_remove; -+ updated = TRUE; -+ } -+ break; -+ } -+ goto or_property; -+ - case GNU_PROPERTY_X86_ISA_1_NEEDED: - if (aprop != NULL && bprop != NULL) - { -+or_property: - number = aprop->u.number; - aprop->u.number = number | bprop->u.number; -- /* Remove the property if ISA bits are empty. */ -+ /* Remove the property if all bits are empty. */ - if (aprop->u.number == 0) - { - aprop->pr_kind = property_remove; -@@ -2428,14 +2443,14 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info, - { - if (aprop->u.number == 0) - { -- /* Remove APROP if ISA bits are empty. */ -+ /* Remove APROP if all bits are empty. */ - aprop->pr_kind = property_remove; - updated = TRUE; - } - } - else - { -- /* Return TRUE if APROP is NULL and ISA bits of BPROP -+ /* Return TRUE if APROP is NULL and all bits of BPROP - aren't empty to indicate that BPROP should be added - to ABFD. */ - updated = bprop->u.number != 0; -@@ -2582,9 +2597,9 @@ _bfd_x86_elf_link_setup_gnu_properties - { - /* If the separate code program header is needed, make sure - that the first read-only PT_LOAD segment has no code by -- adding a GNU_PROPERTY_X86_ISA_1_USED note. */ -+ adding a GNU_PROPERTY_X86_ISA_1_NEEDED note. */ - prop = _bfd_elf_get_property (ebfd, -- GNU_PROPERTY_X86_ISA_1_USED, -+ GNU_PROPERTY_X86_ISA_1_NEEDED, - 4); - prop->u.number = GNU_PROPERTY_X86_ISA_1_486; - prop->pr_kind = property_number; -diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp -index 6d794fe653..78dad02579 100644 ---- a/ld/testsuite/ld-i386/i386.exp -+++ b/ld/testsuite/ld-i386/i386.exp -@@ -462,6 +462,8 @@ run_dump_test "pr23189" - run_dump_test "pr23194" - run_dump_test "pr23372a" - run_dump_test "pr23372b" -+run_dump_test "pr23486a" -+run_dump_test "pr23486b" - - if { !([istarget "i?86-*-linux*"] - || [istarget "i?86-*-gnu*"] -diff --git a/ld/testsuite/ld-i386/pr23486a.d b/ld/testsuite/ld-i386/pr23486a.d -new file mode 100644 -index 0000000000..41a6dcf7d5 ---- /dev/null -+++ b/ld/testsuite/ld-i386/pr23486a.d -@@ -0,0 +1,10 @@ -+#source: ../ld-x86-64/pr23486a.s -+#source: ../ld-x86-64/pr23486b.s -+#as: --32 -+#ld: -r -m elf_i386 -+#readelf: -n -+ -+Displaying notes found in: .note.gnu.property -+ Owner Data size Description -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586 -diff --git a/ld/testsuite/ld-i386/pr23486b.d b/ld/testsuite/ld-i386/pr23486b.d -new file mode 100644 -index 0000000000..08019b7274 ---- /dev/null -+++ b/ld/testsuite/ld-i386/pr23486b.d -@@ -0,0 +1,10 @@ -+#source: ../ld-x86-64/pr23486b.s -+#source: ../ld-x86-64/pr23486a.s -+#as: --32 -+#ld: -r -m elf_i386 -+#readelf: -n -+ -+Displaying notes found in: .note.gnu.property -+ Owner Data size Description -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586 -diff --git a/ld/testsuite/ld-i386/property-3.r b/ld/testsuite/ld-i386/property-3.r -index 0ed91f5922..d03203c1e5 100644 ---- a/ld/testsuite/ld-i386/property-3.r -+++ b/ld/testsuite/ld-i386/property-3.r -@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property - Owner Data size Description - GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 - Properties: stack size: 0x800000 -- x86 ISA used: 586, SSE - x86 ISA needed: i486, 586 - #pass -diff --git a/ld/testsuite/ld-i386/property-4.r b/ld/testsuite/ld-i386/property-4.r -index cb2bc15d9a..da295eb6c7 100644 ---- a/ld/testsuite/ld-i386/property-4.r -+++ b/ld/testsuite/ld-i386/property-4.r -@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property - Owner Data size Description - GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 - Properties: stack size: 0x800000 -- x86 ISA used: i486, 586, SSE - x86 ISA needed: i486, 586, SSE - #pass -diff --git a/ld/testsuite/ld-i386/property-5.r b/ld/testsuite/ld-i386/property-5.r -index 552965058c..e4141594b3 100644 ---- a/ld/testsuite/ld-i386/property-5.r -+++ b/ld/testsuite/ld-i386/property-5.r -@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property - Owner Data size Description - GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 - Properties: stack size: 0x900000 -- x86 ISA used: i486, 586, SSE - x86 ISA needed: i486, 586, SSE - #pass -diff --git a/ld/testsuite/ld-i386/property-x86-ibt3a.d b/ld/testsuite/ld-i386/property-x86-ibt3a.d -index 4bb35b00fb..0aedea1614 100644 ---- a/ld/testsuite/ld-i386/property-x86-ibt3a.d -+++ b/ld/testsuite/ld-i386/property-x86-ibt3a.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: i486, 586, SSE2, SSE3 -- x86 ISA needed: 586, SSE, SSE3, SSE4_1 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1 -diff --git a/ld/testsuite/ld-i386/property-x86-ibt3b.d b/ld/testsuite/ld-i386/property-x86-ibt3b.d -index 418d58a8f7..bd69ac6478 100644 ---- a/ld/testsuite/ld-i386/property-x86-ibt3b.d -+++ b/ld/testsuite/ld-i386/property-x86-ibt3b.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: i486, 586, SSE2, SSE3 -- x86 ISA needed: 586, SSE, SSE3, SSE4_1 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1 -diff --git a/ld/testsuite/ld-i386/property-x86-shstk3a.d b/ld/testsuite/ld-i386/property-x86-shstk3a.d -index e261038f60..76d2a39f2c 100644 ---- a/ld/testsuite/ld-i386/property-x86-shstk3a.d -+++ b/ld/testsuite/ld-i386/property-x86-shstk3a.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: i486, 586, SSE2, SSE3 -- x86 ISA needed: 586, SSE, SSE3, SSE4_1 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1 -diff --git a/ld/testsuite/ld-i386/property-x86-shstk3b.d b/ld/testsuite/ld-i386/property-x86-shstk3b.d -index 25f3d2361e..e770ecffa5 100644 ---- a/ld/testsuite/ld-i386/property-x86-shstk3b.d -+++ b/ld/testsuite/ld-i386/property-x86-shstk3b.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: i486, 586, SSE2, SSE3 -- x86 ISA needed: 586, SSE, SSE3, SSE4_1 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1 -diff --git a/ld/testsuite/ld-x86-64/pr23486a-x32.d b/ld/testsuite/ld-x86-64/pr23486a-x32.d -new file mode 100644 -index 0000000000..6d9fa68cdb ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr23486a-x32.d -@@ -0,0 +1,10 @@ -+#source: pr23486a.s -+#source: pr23486b.s -+#as: --x32 -+#ld: -r -m elf32_x86_64 -+#readelf: -n -+ -+Displaying notes found in: .note.gnu.property -+ Owner Data size Description -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586 -diff --git a/ld/testsuite/ld-x86-64/pr23486a.d b/ld/testsuite/ld-x86-64/pr23486a.d -new file mode 100644 -index 0000000000..dc2b7bf760 ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr23486a.d -@@ -0,0 +1,10 @@ -+#source: pr23486a.s -+#source: pr23486b.s -+#as: --64 -defsym __64_bit__=1 -+#ld: -r -m elf_x86_64 -+#readelf: -n -+ -+Displaying notes found in: .note.gnu.property -+ Owner Data size Description -+ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586 -diff --git a/ld/testsuite/ld-x86-64/pr23486a.s b/ld/testsuite/ld-x86-64/pr23486a.s -new file mode 100644 -index 0000000000..a07d0c7ced ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr23486a.s -@@ -0,0 +1,30 @@ -+ .section ".note.gnu.property", "a" -+.ifdef __64_bit__ -+ .p2align 3 -+.else -+ .p2align 2 -+.endif -+ .long 1f - 0f /* name length. */ -+ .long 4f - 1f /* data length. */ -+ /* NT_GNU_PROPERTY_TYPE_0 */ -+ .long 5 /* note type. */ -+0: -+ .asciz "GNU" /* vendor name. */ -+1: -+.ifdef __64_bit__ -+ .p2align 3 -+.else -+ .p2align 2 -+.endif -+ /* GNU_PROPERTY_X86_ISA_1_USED */ -+ .long 0xc0000000 /* pr_type. */ -+ .long 3f - 2f /* pr_datasz. */ -+2: -+ .long 0xa -+3: -+.ifdef __64_bit__ -+ .p2align 3 -+.else -+ .p2align 2 -+.endif -+4: -diff --git a/ld/testsuite/ld-x86-64/pr23486b-x32.d b/ld/testsuite/ld-x86-64/pr23486b-x32.d -new file mode 100644 -index 0000000000..0445e69d82 ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr23486b-x32.d -@@ -0,0 +1,10 @@ -+#source: pr23486b.s -+#source: pr23486a.s -+#as: --x32 -+#ld: -r -m elf32_x86_64 -+#readelf: -n -+ -+Displaying notes found in: .note.gnu.property -+ Owner Data size Description -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586 -diff --git a/ld/testsuite/ld-x86-64/pr23486b.d b/ld/testsuite/ld-x86-64/pr23486b.d -new file mode 100644 -index 0000000000..dc2b7bf760 ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr23486b.d -@@ -0,0 +1,10 @@ -+#source: pr23486a.s -+#source: pr23486b.s -+#as: --64 -defsym __64_bit__=1 -+#ld: -r -m elf_x86_64 -+#readelf: -n -+ -+Displaying notes found in: .note.gnu.property -+ Owner Data size Description -+ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586 -diff --git a/ld/testsuite/ld-x86-64/pr23486b.s b/ld/testsuite/ld-x86-64/pr23486b.s -new file mode 100644 -index 0000000000..c5167eeb65 ---- /dev/null -+++ b/ld/testsuite/ld-x86-64/pr23486b.s -@@ -0,0 +1,30 @@ -+ .section ".note.gnu.property", "a" -+.ifdef __64_bit__ -+ .p2align 3 -+.else -+ .p2align 2 -+.endif -+ .long 1f - 0f /* name length. */ -+ .long 4f - 1f /* data length. */ -+ /* NT_GNU_PROPERTY_TYPE_0 */ -+ .long 5 /* note type. */ -+0: -+ .asciz "GNU" /* vendor name. */ -+1: -+.ifdef __64_bit__ -+ .p2align 3 -+.else -+ .p2align 2 -+.endif -+ /* GNU_PROPERTY_X86_ISA_1_NEEDED */ -+ .long 0xc0000001 /* pr_type. */ -+ .long 3f - 2f /* pr_datasz. */ -+2: -+ .long 0x3 -+3: -+.ifdef __64_bit__ -+ .p2align 3 -+.else -+ .p2align 2 -+.endif -+4: -diff --git a/ld/testsuite/ld-x86-64/property-3.r b/ld/testsuite/ld-x86-64/property-3.r -index 0ed91f5922..d03203c1e5 100644 ---- a/ld/testsuite/ld-x86-64/property-3.r -+++ b/ld/testsuite/ld-x86-64/property-3.r -@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property - Owner Data size Description - GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 - Properties: stack size: 0x800000 -- x86 ISA used: 586, SSE - x86 ISA needed: i486, 586 - #pass -diff --git a/ld/testsuite/ld-x86-64/property-4.r b/ld/testsuite/ld-x86-64/property-4.r -index cb2bc15d9a..da295eb6c7 100644 ---- a/ld/testsuite/ld-x86-64/property-4.r -+++ b/ld/testsuite/ld-x86-64/property-4.r -@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property - Owner Data size Description - GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 - Properties: stack size: 0x800000 -- x86 ISA used: i486, 586, SSE - x86 ISA needed: i486, 586, SSE - #pass -diff --git a/ld/testsuite/ld-x86-64/property-5.r b/ld/testsuite/ld-x86-64/property-5.r -index 552965058c..e4141594b3 100644 ---- a/ld/testsuite/ld-x86-64/property-5.r -+++ b/ld/testsuite/ld-x86-64/property-5.r -@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property - Owner Data size Description - GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 - Properties: stack size: 0x900000 -- x86 ISA used: i486, 586, SSE - x86 ISA needed: i486, 586, SSE - #pass -diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d b/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d -index 011426f5a4..4cec728dc7 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d -+++ b/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3a.d b/ld/testsuite/ld-x86-64/property-x86-ibt3a.d -index 1b4229a037..a8df49a351 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-ibt3a.d -+++ b/ld/testsuite/ld-x86-64/property-x86-ibt3a.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d b/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d -index 290ed6abf1..c112626711 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d -+++ b/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3b.d b/ld/testsuite/ld-x86-64/property-x86-ibt3b.d -index 1142e03272..f10dffdc2c 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-ibt3b.d -+++ b/ld/testsuite/ld-x86-64/property-x86-ibt3b.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d b/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d -index 819542d181..0147a3c7b6 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d -+++ b/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3a.d b/ld/testsuite/ld-x86-64/property-x86-shstk3a.d -index 4c5d0e0a18..1f8c2dc929 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-shstk3a.d -+++ b/ld/testsuite/ld-x86-64/property-x86-shstk3a.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d b/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d -index ba181e0bc5..7ca2539ca5 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d -+++ b/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3b.d b/ld/testsuite/ld-x86-64/property-x86-shstk3b.d -index 5216f385dd..f66a40e449 100644 ---- a/ld/testsuite/ld-x86-64/property-x86-shstk3b.d -+++ b/ld/testsuite/ld-x86-64/property-x86-shstk3b.d -@@ -6,6 +6,5 @@ - - Displaying notes found in: .note.gnu.property - Owner Data size Description -- GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 -- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 -- x86 ISA needed: i486, 586, SSE2, SSE3 -+ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 -+ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 -diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp -index 6edb9e86f4..ae21e554ad 100644 ---- a/ld/testsuite/ld-x86-64/x86-64.exp -+++ b/ld/testsuite/ld-x86-64/x86-64.exp -@@ -403,6 +403,10 @@ run_dump_test "pr23372a" - run_dump_test "pr23372a-x32" - run_dump_test "pr23372b" - run_dump_test "pr23372b-x32" -+run_dump_test "pr23486a" -+run_dump_test "pr23486a-x32" -+run_dump_test "pr23486b" -+run_dump_test "pr23486b-x32" - - if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} { - return --- -2.20.1 - diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index e1ff92d00f4..ebbddbb2190 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -8,15 +8,13 @@ , bison ? null , flex , texinfo +, perl }: let reuseLibs = enableShared && withAllTargets; - # Remove gold-symbol-visibility patch when updating, the proper fix - # is now upstream. - # https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=330b90b5ffbbc20c5de6ae6c7f60c40fab2e7a4f;hp=99181ccac0fc7d82e7dabb05dc7466e91f1645d3 - version = "2.33.1"; + version = "2.34"; basename = "binutils"; # The targetPrefix prepended to binary names to allow multiple binuntils on the # PATH to both be usable. @@ -31,7 +29,7 @@ let # HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM normal-src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl { url = "mirror://gnu/binutils/${basename}-${version}.tar.bz2"; - sha256 = "1cmd0riv37bqy9mwbg6n3523qgr8b3bbm5kwj19sjrasl4yq9d0c"; + sha256 = "1rin1f5c7wm4n3piky6xilcrpf2s0n3dd5vqq8irrxkcic3i1w49"; }); in @@ -64,10 +62,6 @@ stdenv.mkDerivation { # cross-compiling. ./always-search-rpath.patch - ] ++ lib.optionals (!stdenv.targetPlatform.isVc4) - [ - # https://sourceware.org/bugzilla/show_bug.cgi?id=22868 - ./gold-symbol-visibility.patch ] ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch; outputs = [ "out" "info" "man" ]; @@ -75,9 +69,11 @@ stdenv.mkDerivation { depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ bison + perl + texinfo ] ++ (lib.optionals stdenv.targetPlatform.isiOS [ autoreconfHook - ]) ++ lib.optionals stdenv.targetPlatform.isVc4 [ texinfo flex ]; + ]) ++ lib.optionals stdenv.targetPlatform.isVc4 [ flex ]; buildInputs = [ zlib gettext ]; inherit noSysDirs; diff --git a/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch b/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch deleted file mode 100644 index 0fb05a482d1..00000000000 --- a/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch +++ /dev/null @@ -1,79 +0,0 @@ -commit 8564af037f5c4c6d2744a89497691359205b2bbc -Author: Shea Levy -Date: Mon Mar 19 10:52:40 2018 -0400 - - Revert "Allow multiply-defined absolute symbols when they have the same value." - - This reverts commit 5dc824ed42cd173c1525f5abc76f4091f11a4dbc. - -diff --git a/gold/ChangeLog-2017 b/gold/ChangeLog-2017 -index b2a47710b5..d7ca1b48c0 100644 ---- a/gold/ChangeLog-2017 -+++ b/gold/ChangeLog-2017 -@@ -114,11 +114,6 @@ - (localedir): Define as @localedir@. - (gnulocaledir, gettextsrcdir): Use @datarootdir@. - --2017-11-28 Cary Coutant -- -- * resolve.cc (Symbol_table::resolve): Allow multiply-defined absolute -- symbols when they have the same value. -- - 2017-11-28 Cary Coutant - - * object.h (class Sized_relobj_file): Remove discarded_eh_frame_shndx_. -diff --git a/gold/resolve.cc b/gold/resolve.cc -index 4a5784cf8b..803576bfed 100644 ---- a/gold/resolve.cc -+++ b/gold/resolve.cc -@@ -247,28 +247,18 @@ Symbol_table::resolve(Sized_symbol* to, - Object* object, const char* version, - bool is_default_version) - { -- bool to_is_ordinary; -- const unsigned int to_shndx = to->shndx(&to_is_ordinary); -- - // It's possible for a symbol to be defined in an object file - // using .symver to give it a version, and for there to also be - // a linker script giving that symbol the same version. We - // don't want to give a multiple-definition error for this - // harmless redefinition. -+ bool to_is_ordinary; - if (to->source() == Symbol::FROM_OBJECT - && to->object() == object -- && to->is_defined() - && is_ordinary -+ && to->is_defined() -+ && to->shndx(&to_is_ordinary) == st_shndx - && to_is_ordinary -- && to_shndx == st_shndx -- && to->value() == sym.get_st_value()) -- return; -- -- // Likewise for an absolute symbol defined twice with the same value. -- if (!is_ordinary -- && st_shndx == elfcpp::SHN_ABS -- && !to_is_ordinary -- && to_shndx == elfcpp::SHN_ABS - && to->value() == sym.get_st_value()) - return; - -@@ -360,8 +350,8 @@ Symbol_table::resolve(Sized_symbol* to, - && (sym.get_st_bind() == elfcpp::STB_WEAK - || to->binding() == elfcpp::STB_WEAK) - && orig_st_shndx != elfcpp::SHN_UNDEF -+ && to->shndx(&to_is_ordinary) != elfcpp::SHN_UNDEF - && to_is_ordinary -- && to_shndx != elfcpp::SHN_UNDEF - && sym.get_st_size() != 0 // Ignore weird 0-sized symbols. - && to->symsize() != 0 - && (sym.get_st_type() != to->type() -@@ -372,7 +362,7 @@ Symbol_table::resolve(Sized_symbol* to, - { - Symbol_location fromloc - = { object, orig_st_shndx, static_cast(sym.get_st_value()) }; -- Symbol_location toloc = { to->object(), to_shndx, -+ Symbol_location toloc = { to->object(), to->shndx(&to_is_ordinary), - static_cast(to->value()) }; - this->candidate_odr_violations_[to->name()].insert(fromloc); - this->candidate_odr_violations_[to->name()].insert(toloc); From ce6e0abd506edc20a937be172d1941cae71d7b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 27 Apr 2020 11:35:27 +0100 Subject: [PATCH 12/72] iana_etc: 20190731 -> 20200407 --- pkgs/data/misc/iana-etc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/misc/iana-etc/default.nix b/pkgs/data/misc/iana-etc/default.nix index d7d6c062e0c..2b2d2d19065 100644 --- a/pkgs/data/misc/iana-etc/default.nix +++ b/pkgs/data/misc/iana-etc/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchzip }: let - version = "20190731"; + version = "20200407"; in fetchzip { name = "iana-etc-${version}"; url = "https://github.com/Mic92/iana-etc/releases/download/${version}/iana-etc-${version}.tar.gz"; - sha256 = "0vqr4zm53zn7z75ynmf59xfrlhpyk8f41xd6i4v8j0f7k6hfdvpi"; + sha256 = "1zmqim0l4lz5xbq7w2wi48fzsvg2msyw6c80dzw4vxll31frpy18"; postFetch = '' tar -xzvf $downloadedFile --strip-components=1 From 1672f4ead1d65263e70fd4ce7d595a82b2c43158 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:39 +0200 Subject: [PATCH 13/72] python3Packages.ipython: 7.12.0 -> 7.13.0 --- pkgs/development/python-modules/ipython/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/ipython/default.nix b/pkgs/development/python-modules/ipython/default.nix index fe89691431c..9d6624a7df4 100644 --- a/pkgs/development/python-modules/ipython/default.nix +++ b/pkgs/development/python-modules/ipython/default.nix @@ -22,12 +22,12 @@ buildPythonPackage rec { pname = "ipython"; - version = "7.12.0"; + version = "7.13.0"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "d9459e7237e2e5858738ff9c3e26504b79899b58a6d49e574d352493d80684c6"; + sha256 = "ca478e52ae1f88da0102360e57e528b92f3ae4316aabac80a2cd7f7ab2efb48a"; }; prePatch = lib.optionalString stdenv.isDarwin '' From e19e5ac7f00faba7bbfee0d6ba30d24ccb62e584 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:39 +0200 Subject: [PATCH 14/72] python3Packages.jupyter_client: 5.3.4 -> 6.1.2 --- pkgs/development/python-modules/jupyter_client/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/jupyter_client/default.nix b/pkgs/development/python-modules/jupyter_client/default.nix index 4855663ebc7..b26fa8d8ba9 100644 --- a/pkgs/development/python-modules/jupyter_client/default.nix +++ b/pkgs/development/python-modules/jupyter_client/default.nix @@ -12,11 +12,11 @@ buildPythonPackage rec { pname = "jupyter_client"; - version = "5.3.4"; + version = "6.1.2"; src = fetchPypi { inherit pname version; - sha256 = "60e6faec1031d63df57f1cc671ed673dced0ed420f4377ea33db37b1c188b910"; + sha256 = "5724827aedb1948ed6ed15131372bc304a8d3ad9ac67ac19da7c95120d6b17e0"; }; propagatedBuildInputs = [ From cca7143293c06000e5cbf689c49c1b9060f0757e Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:39 +0200 Subject: [PATCH 15/72] python3Packages.jupyter_core: 4.6.1 -> 4.6.3 --- pkgs/development/python-modules/jupyter_core/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/jupyter_core/default.nix b/pkgs/development/python-modules/jupyter_core/default.nix index c10f3026876..fe40a3f09c4 100644 --- a/pkgs/development/python-modules/jupyter_core/default.nix +++ b/pkgs/development/python-modules/jupyter_core/default.nix @@ -11,11 +11,11 @@ buildPythonPackage rec { pname = "jupyter_core"; - version = "4.6.1"; + version = "4.6.3"; src = fetchPypi { inherit pname version; - sha256 = "a183e0ec2e8f6adddf62b0a3fc6a2237e3e0056d381e536d3e7c7ecc3067e244"; + sha256 = "394fd5dd787e7c8861741880bdf8a00ce39f95de5d18e579c74b882522219e7e"; }; checkInputs = [ pytest mock glibcLocales nose ]; From 8311b59577f9aa683e262bc8c24b0923f878233d Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:39 +0200 Subject: [PATCH 16/72] python3Packages.line_profiler: 2.1.2 -> 3.0.2 --- pkgs/development/python-modules/line_profiler/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/line_profiler/default.nix b/pkgs/development/python-modules/line_profiler/default.nix index a60b023acd7..027e6b0d134 100644 --- a/pkgs/development/python-modules/line_profiler/default.nix +++ b/pkgs/development/python-modules/line_profiler/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "line_profiler"; - version = "2.1.2"; + version = "3.0.2"; src = fetchPypi { inherit pname version; - sha256 = "efa66e9e3045aa7cb1dd4bf0106e07dec9f80bc781a993fbaf8162a36c20af5c"; + sha256 = "7218ad6bd81f8649b211974bf108933910f016d66b49651effe7bbf63667d141"; }; patches = [ ./python37.patch ]; From 7ba0848eec7fc6b0faf16ba981764db9d71ce99d Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:39 +0200 Subject: [PATCH 17/72] python3Packages.nbformat: 4.4.0 -> 5.0.4 --- pkgs/development/python-modules/nbformat/2.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/nbformat/2.nix b/pkgs/development/python-modules/nbformat/2.nix index faf2cee2b00..35ee52b11ec 100644 --- a/pkgs/development/python-modules/nbformat/2.nix +++ b/pkgs/development/python-modules/nbformat/2.nix @@ -12,11 +12,11 @@ buildPythonPackage rec { pname = "nbformat"; - version = "4.4.0"; + version = "5.0.4"; src = fetchPypi { inherit pname version; - sha256 = "f7494ef0df60766b7cabe0a3651556345a963b74dbc16bc7c18479041170d402"; + sha256 = "562de41fc7f4f481b79ab5d683279bf3a168858268d4387b489b7b02be0b324a"; }; LC_ALL="en_US.utf8"; From 62425ee576fd1f2a21c848d42812721b1c5349dc Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:39 +0200 Subject: [PATCH 18/72] python3Packages.notebook: 5.7.8 -> 6.0.3 --- pkgs/development/python-modules/notebook/2.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/notebook/2.nix b/pkgs/development/python-modules/notebook/2.nix index 8b8cce2f824..6b891353679 100644 --- a/pkgs/development/python-modules/notebook/2.nix +++ b/pkgs/development/python-modules/notebook/2.nix @@ -25,11 +25,11 @@ buildPythonPackage rec { pname = "notebook"; - version = "5.7.8"; + version = "6.0.3"; src = fetchPypi { inherit pname version; - sha256 = "573e0ae650c5d76b18b6e564ba6d21bf321d00847de1d215b418acb64f056eb8"; + sha256 = "47a9092975c9e7965ada00b9a20f0cf637d001db60d241d479f53c0be117ad48"; }; LC_ALL = "en_US.utf8"; From f72c25454594dcd2aa0cb0f853fc756c60659fdd Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:39 +0200 Subject: [PATCH 19/72] python3Packages.numpy: 1.18.1 -> 1.18.2 --- pkgs/development/python-modules/numpy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/numpy/default.nix b/pkgs/development/python-modules/numpy/default.nix index 4a062ca7b97..15d285e20fd 100644 --- a/pkgs/development/python-modules/numpy/default.nix +++ b/pkgs/development/python-modules/numpy/default.nix @@ -27,13 +27,13 @@ let }; in buildPythonPackage rec { pname = "numpy"; - version = "1.18.1"; + version = "1.18.2"; format = "pyproject.toml"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "b6ff59cee96b454516e47e7721098e6ceebef435e3e21ac2d6c3b8b02628eb77"; + sha256 = "e7894793e6e8540dbeac77c87b489e331947813511108ae097f1715c018b8f3d"; }; nativeBuildInputs = [ gfortran pytest cython setuptoolsBuildHook ]; From 5cfd19274b7e9c66d1c3a5524cb46edf70e03586 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:39 +0200 Subject: [PATCH 20/72] python3Packages.qtconsole: 4.6.0 -> 4.7.2 --- pkgs/development/python-modules/qtconsole/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/qtconsole/default.nix b/pkgs/development/python-modules/qtconsole/default.nix index abf5509056d..0305b7c3be5 100644 --- a/pkgs/development/python-modules/qtconsole/default.nix +++ b/pkgs/development/python-modules/qtconsole/default.nix @@ -14,11 +14,11 @@ buildPythonPackage rec { pname = "qtconsole"; - version = "4.6.0"; + version = "4.7.2"; src = fetchPypi { inherit pname version; - sha256 = "654f423662e7dfe6a9b26fac8ec76aedcf742c339909ac49f1f0c1a1b744bcd1"; + sha256 = "d7834598825169fc322390fdfd96bf791833ded21bf22803f083662edbbf3d75"; }; checkInputs = [ nose ] ++ lib.optionals isPy27 [mock]; From d2e945428ddfed461dd25ee4026d0aa54f21e34d Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:39 +0200 Subject: [PATCH 21/72] python3Packages.reikna: 0.7.4 -> 0.7.5 --- pkgs/development/python-modules/reikna/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/reikna/default.nix b/pkgs/development/python-modules/reikna/default.nix index 611bdd66901..ebe3dc772d7 100644 --- a/pkgs/development/python-modules/reikna/default.nix +++ b/pkgs/development/python-modules/reikna/default.nix @@ -13,11 +13,11 @@ buildPythonPackage rec { pname = "reikna"; - version = "0.7.4"; + version = "0.7.5"; src = fetchPypi { inherit pname version; - sha256 = "52bbce24fa1fd7bb950d38ce9b60f497dd00ac6b26688d80ab9bce709f063e71"; + sha256 = "d01f4264c8379ef2962a93aacb002d491b92ef9b5b22b45f77e7821dfa87bef7"; }; checkInputs = [ sphinx pytestcov pytest ]; From 04ccf59c50116b1d8ab55330c537446a1d6bec47 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:40 +0200 Subject: [PATCH 22/72] python3Packages.sounddevice: 0.3.14 -> 0.3.15 --- pkgs/development/python-modules/sounddevice/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sounddevice/default.nix b/pkgs/development/python-modules/sounddevice/default.nix index 614f0881ff8..9a6baf80f04 100644 --- a/pkgs/development/python-modules/sounddevice/default.nix +++ b/pkgs/development/python-modules/sounddevice/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "sounddevice"; - version = "0.3.14"; + version = "0.3.15"; src = fetchPypi { inherit pname version; - sha256 = "c7b0f7ad86550668da55404eabcb63d4212ec622fcce86510092306b77d2e80a"; + sha256 = "028f6e5df83027f4bfba5d6d61e6d46eb8689f9e647825e09f539920dee17d2c"; }; propagatedBuildInputs = [ cffi numpy portaudio ]; From a034c1862769427e0365bea3ba784f753af1dc80 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:40 +0200 Subject: [PATCH 23/72] python3Packages.statsmodels: 0.11.0 -> 0.11.1 --- pkgs/development/python-modules/statsmodels/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/statsmodels/default.nix b/pkgs/development/python-modules/statsmodels/default.nix index e2c7142c979..c65fb0990f0 100644 --- a/pkgs/development/python-modules/statsmodels/default.nix +++ b/pkgs/development/python-modules/statsmodels/default.nix @@ -13,11 +13,11 @@ buildPythonPackage rec { pname = "statsmodels"; - version = "0.11.0"; + version = "0.11.1"; src = fetchPypi { inherit pname version; - sha256 = "0wcc7xbwlf8r2diw9fnzf4bg9h5cg406w7phd3dz37hx17yfi3ha"; + sha256 = "5bde3fa0a35a91b45dba7cbc28270b5b649ff1d721c89290883f6e831672d5f0"; }; checkInputs = with self; [ nose ]; From 10462514f7ff59c14befb62affd644812f6f3b6b Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:40 +0200 Subject: [PATCH 24/72] python3Packages.tabulate: 0.8.6 -> 0.8.7 --- pkgs/development/python-modules/tabulate/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tabulate/default.nix b/pkgs/development/python-modules/tabulate/default.nix index c482c517989..4686d02486f 100644 --- a/pkgs/development/python-modules/tabulate/default.nix +++ b/pkgs/development/python-modules/tabulate/default.nix @@ -5,12 +5,12 @@ }: buildPythonPackage rec { - version = "0.8.6"; + version = "0.8.7"; pname = "tabulate"; src = fetchPypi { inherit pname version; - sha256 = "5470cc6687a091c7042cee89b2946d9235fe9f6d49c193a4ae2ac7bf386737c8"; + sha256 = "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007"; }; checkInputs = [ nose ]; From d2a2b7674b4872173e6e169d9bd28483ff79889b Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:40 +0200 Subject: [PATCH 25/72] python3Packages.tqdm: 4.42.1 -> 4.44.0 --- pkgs/development/python-modules/tqdm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tqdm/default.nix b/pkgs/development/python-modules/tqdm/default.nix index a6549ee07c9..5a24c4ec24f 100644 --- a/pkgs/development/python-modules/tqdm/default.nix +++ b/pkgs/development/python-modules/tqdm/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "tqdm"; - version = "4.42.1"; + version = "4.44.0"; src = fetchPypi { inherit pname version; - sha256 = "251ee8440dbda126b8dfa8a7c028eb3f13704898caaef7caa699b35e119301e2"; + sha256 = "4f882b23c492e7060f50d83af86f163b67e4cfbe35dfe12077e748c56282f438"; }; checkInputs = [ nose coverage glibcLocales flake8 ]; From 6eb61b5d923003371056eefd5393777109f9e380 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 29 Mar 2020 13:56:40 +0200 Subject: [PATCH 26/72] python3Packages.xarray: 0.15.0 -> 0.15.1 --- pkgs/development/python-modules/xarray/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/xarray/default.nix b/pkgs/development/python-modules/xarray/default.nix index a950076a261..abce8ac12fe 100644 --- a/pkgs/development/python-modules/xarray/default.nix +++ b/pkgs/development/python-modules/xarray/default.nix @@ -10,11 +10,11 @@ buildPythonPackage rec { pname = "xarray"; - version = "0.15.0"; + version = "0.15.1"; src = fetchPypi { inherit pname version; - sha256 = "c72d160c970725201f769e80fb91cbad68d6ebf21d68fcc371385a6c950459c3"; + sha256 = "64e3138d87b641e22fe7a003c94abc685896b247b63e434505c1e6b38c91a8fb"; }; checkInputs = [ pytest ]; From 6db84432b1f27083f393d184c8b29101586ff10f Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 21 Apr 2020 11:25:19 +0200 Subject: [PATCH 27/72] python: jupyter_client: 6.1.2 -> 6.1.3 --- pkgs/development/python-modules/jupyter_client/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/jupyter_client/default.nix b/pkgs/development/python-modules/jupyter_client/default.nix index b26fa8d8ba9..008a74dfb3e 100644 --- a/pkgs/development/python-modules/jupyter_client/default.nix +++ b/pkgs/development/python-modules/jupyter_client/default.nix @@ -12,11 +12,11 @@ buildPythonPackage rec { pname = "jupyter_client"; - version = "6.1.2"; + version = "6.1.3"; src = fetchPypi { inherit pname version; - sha256 = "5724827aedb1948ed6ed15131372bc304a8d3ad9ac67ac19da7c95120d6b17e0"; + sha256 = "3a32fa4d0b16d1c626b30c3002a62dfd86d6863ed39eaba3f537fade197bb756"; }; propagatedBuildInputs = [ From 67c4087ffb1bef22d4ca00399cda915ff4362459 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 21 Apr 2020 11:25:46 +0200 Subject: [PATCH 28/72] python: nbformat: 5.0.4 -> 5.0.6 --- pkgs/development/python-modules/nbformat/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/nbformat/default.nix b/pkgs/development/python-modules/nbformat/default.nix index 35ee52b11ec..2f8c57e0033 100644 --- a/pkgs/development/python-modules/nbformat/default.nix +++ b/pkgs/development/python-modules/nbformat/default.nix @@ -12,11 +12,11 @@ buildPythonPackage rec { pname = "nbformat"; - version = "5.0.4"; + version = "5.0.6"; src = fetchPypi { inherit pname version; - sha256 = "562de41fc7f4f481b79ab5d683279bf3a168858268d4387b489b7b02be0b324a"; + sha256 = "049af048ed76b95c3c44043620c17e56bc001329e07f83fec4f177f0e3d7b757"; }; LC_ALL="en_US.utf8"; From 5ca64bb0433bc6c49c2241c2f3b902a538bfb2b3 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 21 Apr 2020 11:26:16 +0200 Subject: [PATCH 29/72] python: numpy: 1.18.2 -> 1.18.3 --- pkgs/development/python-modules/numpy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/numpy/default.nix b/pkgs/development/python-modules/numpy/default.nix index 15d285e20fd..0838509a849 100644 --- a/pkgs/development/python-modules/numpy/default.nix +++ b/pkgs/development/python-modules/numpy/default.nix @@ -27,13 +27,13 @@ let }; in buildPythonPackage rec { pname = "numpy"; - version = "1.18.2"; + version = "1.18.3"; format = "pyproject.toml"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "e7894793e6e8540dbeac77c87b489e331947813511108ae097f1715c018b8f3d"; + sha256 = "e46e2384209c91996d5ec16744234d1c906ab79a701ce1a26155c9ec890b8dc8"; }; nativeBuildInputs = [ gfortran pytest cython setuptoolsBuildHook ]; From 697473975f9256adf717622ee6aea40358a9b260 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 21 Apr 2020 11:26:29 +0200 Subject: [PATCH 30/72] python: qtconsole: 4.7.2 -> 4.7.3 --- pkgs/development/python-modules/qtconsole/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/qtconsole/default.nix b/pkgs/development/python-modules/qtconsole/default.nix index 0305b7c3be5..6d3899e32e7 100644 --- a/pkgs/development/python-modules/qtconsole/default.nix +++ b/pkgs/development/python-modules/qtconsole/default.nix @@ -14,11 +14,11 @@ buildPythonPackage rec { pname = "qtconsole"; - version = "4.7.2"; + version = "4.7.3"; src = fetchPypi { inherit pname version; - sha256 = "d7834598825169fc322390fdfd96bf791833ded21bf22803f083662edbbf3d75"; + sha256 = "8f5ae5571f0e921db9f2d12613ed667c350ee22c7db598d9bbbe143e8533f932"; }; checkInputs = [ nose ] ++ lib.optionals isPy27 [mock]; From f7a8dc83db3abcacc1f8eadd132b31baa93bad0b Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 21 Apr 2020 11:27:08 +0200 Subject: [PATCH 31/72] python: tqdm: 4.44.0 -> 4.45.0 --- pkgs/development/python-modules/tqdm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tqdm/default.nix b/pkgs/development/python-modules/tqdm/default.nix index 5a24c4ec24f..c00eac75ee0 100644 --- a/pkgs/development/python-modules/tqdm/default.nix +++ b/pkgs/development/python-modules/tqdm/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "tqdm"; - version = "4.44.0"; + version = "4.45.0"; src = fetchPypi { inherit pname version; - sha256 = "4f882b23c492e7060f50d83af86f163b67e4cfbe35dfe12077e748c56282f438"; + sha256 = "00339634a22c10a7a22476ee946bbde2dbe48d042ded784e4d88e0236eca5d81"; }; checkInputs = [ nose coverage glibcLocales flake8 ]; From 4ffb40bc7837a9e7d84889809e996062ca366402 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Wed, 22 Apr 2020 08:27:42 +0200 Subject: [PATCH 32/72] python3Packages.dask: 2.10.1 -> 2.14.0 --- .../development/python-modules/dask/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/dask/default.nix b/pkgs/development/python-modules/dask/default.nix index b8dfd8deb4a..1b3a08aa997 100644 --- a/pkgs/development/python-modules/dask/default.nix +++ b/pkgs/development/python-modules/dask/default.nix @@ -3,7 +3,7 @@ , buildPythonPackage , fetchFromGitHub , fsspec -, pytest +, pytestCheckHook , pythonOlder , cloudpickle , numpy @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "dask"; - version = "2.10.1"; + version = "2.14.0"; disabled = pythonOlder "3.5"; @@ -23,13 +23,15 @@ buildPythonPackage rec { owner = "dask"; repo = pname; rev = version; - sha256 = "035mr7385yf5ng5wf60qxr80529h8dsla5hymkyg68dxhkd0jvbr"; + sha256 = "0kj46pwzvdw8ii1h45y48wxvjid89yp4cfak2h4b8z8xic73fqgj"; }; checkInputs = [ - pytest + pytestCheckHook ]; + dontUseSetuptoolsCheck = true; + propagatedBuildInputs = [ bokeh cloudpickle @@ -50,9 +52,10 @@ buildPythonPackage rec { --replace "cmdclass=versioneer.get_cmdclass()," "" ''; - checkPhase = '' - pytest - ''; + disabledTests = [ + "test_argwhere_str" + "test_count_nonzero_str" + ]; meta = { description = "Minimal task scheduling abstraction"; From 166f2a01ebb640ee68da4f4f82451ad5b67525d8 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Sun, 26 Apr 2020 19:02:36 +0200 Subject: [PATCH 33/72] libglvnd: 1.2.0 -> 1.3.1 --- .../libraries/libglvnd/default.nix | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/pkgs/development/libraries/libglvnd/default.nix b/pkgs/development/libraries/libglvnd/default.nix index 5772e0d24f6..92cde8aef4c 100644 --- a/pkgs/development/libraries/libglvnd/default.nix +++ b/pkgs/development/libraries/libglvnd/default.nix @@ -2,34 +2,18 @@ stdenv.mkDerivation rec { pname = "libglvnd"; - version = "1.2.0"; + version = "1.3.1"; src = fetchFromGitHub { owner = "NVIDIA"; repo = "libglvnd"; rev = "v${version}"; - sha256 = "1hyywwjsmvsd7di603f7iznjlccqlc7yvz0j59gax7bljm9wb6ni"; + sha256 = "0mkzdzdxjxjl794rblq4mq33wmb8ikqmfswbqdbr8gw2kw4wlhdl"; }; nativeBuildInputs = [ autoreconfHook pkgconfig python3 addOpenGLRunpath ]; buildInputs = [ libX11 libXext xorgproto ]; - # The following 3 patches should be removed once libglvnd >1.2.0 is released - patches = [ - (fetchpatch { - url = "https://github.com/NVIDIA/libglvnd/commit/6f52473dac08c44b081b792874b4ce73122096da.patch"; - sha256 = "0rd9ihl8n33cm0rya5a7ki0hn31fh52r0gaj5d4w80jrsah2ayij"; - }) - (fetchpatch { - url = "https://github.com/NVIDIA/libglvnd/commit/51233cc52cbcbe25f8461830913c06f5b5bc9508.patch"; - sha256 = "1qx3nw8vq5xcrixmi7xw1vpy4gbf7kmx38rx8wg8x046g4mv8ijj"; - }) - (fetchpatch { - url = "https://github.com/NVIDIA/libglvnd/commit/5dfdc5a6dc60a3bdc63cd4510dabacba388da13a.patch"; - sha256 = "0gmb3619yz3z7n22afjh8p2y13bmsky4r0z0csm14is3wvdi64ya"; - }) - ]; - postPatch = lib.optionalString stdenv.isDarwin '' substituteInPlace src/GLX/Makefile.am \ --replace "-Wl,-Bsymbolic " "" From ddf043849371b348437e444c7e7df5d2b18a963b Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Thu, 23 Apr 2020 14:33:18 +0200 Subject: [PATCH 34/72] libssh: 0.8.8 -> 0.8.9 Fixes CVE-2020-1730. Release notes: https://www.libssh.org/2020/04/09/libssh-0-9-4-and-libssh-0-8-9-security-release/ --- pkgs/development/libraries/libssh/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libssh/default.nix b/pkgs/development/libraries/libssh/default.nix index bf6e0a491f2..c6accad9c3c 100644 --- a/pkgs/development/libraries/libssh/default.nix +++ b/pkgs/development/libraries/libssh/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "libssh"; - version = "0.8.8"; + version = "0.8.9"; src = fetchurl { url = "https://www.libssh.org/files/0.8/${pname}-${version}.tar.xz"; - sha256 = "1qk5bm9r6199jbfk54f8w24vkl52051g8s3kmq4z2kdc6vbpy4jb"; + sha256 = "09b8w9m5qiap8wbvz4613nglsynpk8hn0q9b929ny2y4l2fy2nc5"; }; postPatch = '' From f05a209e34ebf92b6017d5314d648bc0972272d2 Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Tue, 21 Apr 2020 09:44:11 +0200 Subject: [PATCH 35/72] libfido2: make builds reproducible --- pkgs/development/libraries/libfido2/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/libfido2/default.nix b/pkgs/development/libraries/libfido2/default.nix index 30ecdda3da2..b062b10732e 100644 --- a/pkgs/development/libraries/libfido2/default.nix +++ b/pkgs/development/libraries/libfido2/default.nix @@ -22,6 +22,14 @@ stdenv.mkDerivation rec { buildInputs = [ hidapi libcbor openssl ] ++ stdenv.lib.optionals stdenv.isLinux [ udev ]; + patches = [ + # make build reproducible + (fetchpatch { + url = "https://github.com/Yubico/libfido2/commit/e79f7d7996e70d6b2ae9826fce81d61659cab4f6.patch"; + sha256 = "0jwg69f95qqf0ym24q1ka50d3d3338cyw4fdfzpw4sab0shiaq9v"; + }) + ]; + cmakeFlags = [ "-DUDEV_RULES_DIR=${placeholder "out"}/etc/udev/rules.d" "-DUSE_HIDAPI=1" From fe7f770666bbd940b54a7cd6ef366eb6151ef655 Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Tue, 28 Apr 2020 05:25:38 +0000 Subject: [PATCH 36/72] sof-firmware: init at 1.4.2 --- nixos/modules/hardware/all-firmware.nix | 1 + .../linux/firmware/sof-firmware/default.nix | 28 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 31 insertions(+) create mode 100644 pkgs/os-specific/linux/firmware/sof-firmware/default.nix diff --git a/nixos/modules/hardware/all-firmware.nix b/nixos/modules/hardware/all-firmware.nix index 16be8bcfdd7..b07edb0f6ac 100644 --- a/nixos/modules/hardware/all-firmware.nix +++ b/nixos/modules/hardware/all-firmware.nix @@ -51,6 +51,7 @@ in { rtlwifi_new-firmware zd1211fw alsa-firmware + sof-firmware openelec-dvb-firmware ] ++ optional (pkgs.stdenv.hostPlatform.isAarch32 || pkgs.stdenv.hostPlatform.isAarch64) raspberrypiWirelessFirmware ++ optionals (versionOlder config.boot.kernelPackages.kernel.version "4.13") [ diff --git a/pkgs/os-specific/linux/firmware/sof-firmware/default.nix b/pkgs/os-specific/linux/firmware/sof-firmware/default.nix new file mode 100644 index 00000000000..73ab46b3c8a --- /dev/null +++ b/pkgs/os-specific/linux/firmware/sof-firmware/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl }: + +with stdenv.lib; +stdenv.mkDerivation rec { + pname = "sof-firmware"; + version = "1.4.2"; + + src = fetchurl { + url = "https://www.alsa-project.org/files/pub/misc/sof/${pname}-${version}.tar.bz2"; + sha256 = "1nkh020gjm45vxd6fvmz63hj16ilff2nl5avvsklajjs6xci1sf5"; + }; + + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + rm lib/firmware/intel/{sof/LICENCE,sof-tplg/LICENCE} + mkdir $out + cp -r lib $out/lib + ''; + + meta = with stdenv.lib; { + description = "Sound Open Firmware"; + homepage = "https://www.sofproject.org/"; + license = with licenses; [ bsd3 isc ]; + maintainers = with maintainers; [ lblasc ]; + platforms = with platforms; linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4ed07788904..a6ba99ce008 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6666,6 +6666,8 @@ in python = python3; }; + sof-firmware = callPackage ../os-specific/linux/firmware/sof-firmware { }; + softhsm = callPackage ../tools/security/softhsm { inherit (darwin) libobjc; inherit (darwin.apple_sdk.frameworks) Security; From 3f175184904d925ad21bf07b1c783d2977a5a4c5 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Sat, 18 Apr 2020 23:21:06 +1000 Subject: [PATCH 37/72] buildGoPackage: use $out instead of $bin --- doc/languages-frameworks/go.xml | 12 ------------ nixos/doc/manual/release-notes/rl-2009.xml | 5 +++++ pkgs/development/go-packages/generic/default.nix | 9 +++------ 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/doc/languages-frameworks/go.xml b/doc/languages-frameworks/go.xml index 84b146532b1..70c135555ea 100644 --- a/doc/languages-frameworks/go.xml +++ b/doc/languages-frameworks/go.xml @@ -191,18 +191,6 @@ deis = buildGoPackage rec { To extract dependency information from a Go package in automated way use go2nix. It can produce complete derivation and goDeps file for Go programs. - - buildGoPackage produces where bin includes program binaries. You can test build a Go binary as follows: - -$ nix-build -A deis.bin - - or build all outputs with: - -$ nix-build -A deis.all - - bin output will be installed by default with nix-env -i or systemPackages. - - You may use Go packages installed into the active Nix profiles by adding the following to your ~/.bashrc: diff --git a/nixos/doc/manual/release-notes/rl-2009.xml b/nixos/doc/manual/release-notes/rl-2009.xml index 07f11239366..65cea9ca1c4 100644 --- a/nixos/doc/manual/release-notes/rl-2009.xml +++ b/nixos/doc/manual/release-notes/rl-2009.xml @@ -312,6 +312,11 @@ environment.systemPackages = [ the notmuch.emacs output. + + + The default output of buildGoPackage is now $out instead of $bin. + + diff --git a/pkgs/development/go-packages/generic/default.nix b/pkgs/development/go-packages/generic/default.nix index b4ec8bd1706..54d1c743bee 100644 --- a/pkgs/development/go-packages/generic/default.nix +++ b/pkgs/development/go-packages/generic/default.nix @@ -203,15 +203,15 @@ let installPhase = args.installPhase or '' runHook preInstall - mkdir -p $bin + mkdir -p $out dir="$NIX_BUILD_TOP/go/bin" - [ -e "$dir" ] && cp -r $dir $bin + [ -e "$dir" ] && cp -r $dir $out runHook postInstall ''; preFixup = preFixup + '' - find $bin/bin -type f -exec ${removeExpr removeReferences} '{}' + || true + find $out/bin -type f -exec ${removeExpr removeReferences} '{}' + || true ''; strictDeps = true; @@ -235,9 +235,6 @@ let enableParallelBuilding = enableParallelBuilding; - # I prefer to call this dev but propagatedBuildInputs expects $out to exist - outputs = args.outputs or [ "bin" "out" ]; - meta = { # Add default meta information homepage = "https://${goPackagePath}"; From c59c4e358989ce49afd177e6899549fbb8f8bf7f Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Tue, 28 Apr 2020 11:50:34 +1000 Subject: [PATCH 38/72] nixos/*: use $out instead of $bin with buildGoPackage --- nixos/modules/programs/singularity.nix | 4 ++-- .../continuous-integration/gitlab-runner.nix | 2 +- nixos/modules/services/misc/confd.nix | 2 +- nixos/modules/services/misc/etcd.nix | 2 +- nixos/modules/services/misc/gitea.nix | 16 ++++++++-------- nixos/modules/services/misc/gogs.nix | 6 +++--- nixos/modules/services/misc/leaps.nix | 2 +- nixos/modules/services/misc/ssm-agent.nix | 3 +-- nixos/modules/services/monitoring/bosun.nix | 2 +- .../services/monitoring/grafana-reporter.nix | 2 +- nixos/modules/services/monitoring/grafana.nix | 2 +- .../monitoring/prometheus/exporters/snmp.nix | 2 +- nixos/modules/services/monitoring/scollector.nix | 2 +- nixos/modules/services/networking/consul.nix | 8 ++++---- nixos/modules/services/networking/flannel.nix | 6 +++--- nixos/modules/services/networking/skydns.nix | 2 +- .../modules/services/security/hologram-agent.nix | 4 ++-- .../services/security/hologram-server.nix | 2 +- nixos/modules/services/security/oauth2_proxy.nix | 2 +- nixos/modules/services/web-apps/mattermost.nix | 2 +- nixos/modules/virtualisation/ecs-agent.nix | 3 +-- nixos/modules/virtualisation/lxd.nix | 2 +- nixos/modules/virtualisation/podman.nix | 8 +++----- 23 files changed, 41 insertions(+), 45 deletions(-) diff --git a/nixos/modules/programs/singularity.nix b/nixos/modules/programs/singularity.nix index b27e122bd1d..6ac64a81fc2 100644 --- a/nixos/modules/programs/singularity.nix +++ b/nixos/modules/programs/singularity.nix @@ -5,8 +5,8 @@ let cfg = config.programs.singularity; singularity = pkgs.singularity.overrideAttrs (attrs : { installPhase = attrs.installPhase + '' - mv $bin/libexec/singularity/bin/starter-suid $bin/libexec/singularity/bin/starter-suid.orig - ln -s /run/wrappers/bin/singularity-suid $bin/libexec/singularity/bin/starter-suid + mv $out/libexec/singularity/bin/starter-suid $out/libexec/singularity/bin/starter-suid.orig + ln -s /run/wrappers/bin/singularity-suid $out/libexec/singularity/bin/starter-suid ''; }); in { diff --git a/nixos/modules/services/continuous-integration/gitlab-runner.nix b/nixos/modules/services/continuous-integration/gitlab-runner.nix index bd4cf6a37ba..cce4797e13f 100644 --- a/nixos/modules/services/continuous-integration/gitlab-runner.nix +++ b/nixos/modules/services/continuous-integration/gitlab-runner.nix @@ -127,7 +127,7 @@ in serviceConfig = { StateDirectory = "gitlab-runner"; ExecReload= "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; - ExecStart = ''${cfg.package.bin}/bin/gitlab-runner run \ + ExecStart = ''${cfg.package}/bin/gitlab-runner run \ --working-directory ${cfg.workDir} \ --config /etc/gitlab-runner/config.toml \ --service gitlab-runner \ diff --git a/nixos/modules/services/misc/confd.nix b/nixos/modules/services/misc/confd.nix index 8e9bec15dd4..c1ebdb3dde9 100755 --- a/nixos/modules/services/misc/confd.nix +++ b/nixos/modules/services/misc/confd.nix @@ -75,7 +75,7 @@ in { wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; serviceConfig = { - ExecStart = "${cfg.package.bin}/bin/confd"; + ExecStart = "${cfg.package}/bin/confd"; }; }; diff --git a/nixos/modules/services/misc/etcd.nix b/nixos/modules/services/misc/etcd.nix index 7322e1c080b..32360d43768 100644 --- a/nixos/modules/services/misc/etcd.nix +++ b/nixos/modules/services/misc/etcd.nix @@ -178,7 +178,7 @@ in { serviceConfig = { Type = "notify"; - ExecStart = "${pkgs.etcd.bin}/bin/etcd"; + ExecStart = "${pkgs.etcd}/bin/etcd"; User = "etcd"; LimitNOFILE = 40000; }; diff --git a/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix index 38910a5a005..7c8e2c75577 100644 --- a/nixos/modules/services/misc/gitea.nix +++ b/nixos/modules/services/misc/gitea.nix @@ -335,7 +335,7 @@ in description = "gitea"; after = [ "network.target" ] ++ lib.optional usePostgresql "postgresql.service" ++ lib.optional useMysql "mysql.service"; wantedBy = [ "multi-user.target" ]; - path = [ gitea.bin pkgs.gitAndTools.git ]; + path = [ gitea pkgs.gitAndTools.git ]; preStart = let runConfig = "${cfg.stateDir}/custom/conf/app.ini"; @@ -347,11 +347,11 @@ in cp -f ${configFile} ${runConfig} if [ ! -e ${secretKey} ]; then - ${gitea.bin}/bin/gitea generate secret SECRET_KEY > ${secretKey} + ${gitea}/bin/gitea generate secret SECRET_KEY > ${secretKey} fi if [ ! -e ${jwtSecret} ]; then - ${gitea.bin}/bin/gitea generate secret LFS_JWT_SECRET > ${jwtSecret} + ${gitea}/bin/gitea generate secret LFS_JWT_SECRET > ${jwtSecret} fi KEY="$(head -n1 ${secretKey})" @@ -374,7 +374,7 @@ in HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 6 -type f -wholename "*git/hooks/*") if [ "$HOOKS" ] then - sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea.bin}/bin/gitea,g' $HOOKS + sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea}/bin/gitea,g' $HOOKS sed -ri 's,/nix/store/[a-z0-9.-]+/bin/env,${pkgs.coreutils}/bin/env,g' $HOOKS sed -ri 's,/nix/store/[a-z0-9.-]+/bin/bash,${pkgs.bash}/bin/bash,g' $HOOKS sed -ri 's,/nix/store/[a-z0-9.-]+/bin/perl,${pkgs.perl}/bin/perl,g' $HOOKS @@ -383,7 +383,7 @@ in # update command option in authorized_keys if [ -r ${cfg.stateDir}/.ssh/authorized_keys ] then - sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea.bin}/bin/gitea,g' ${cfg.stateDir}/.ssh/authorized_keys + sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea}/bin/gitea,g' ${cfg.stateDir}/.ssh/authorized_keys fi ''; @@ -392,7 +392,7 @@ in User = cfg.user; Group = "gitea"; WorkingDirectory = cfg.stateDir; - ExecStart = "${gitea.bin}/bin/gitea web"; + ExecStart = "${gitea}/bin/gitea web"; Restart = "always"; # Filesystem @@ -450,7 +450,7 @@ in description = "gitea dump"; after = [ "gitea.service" ]; wantedBy = [ "default.target" ]; - path = [ gitea.bin ]; + path = [ gitea ]; environment = { USER = cfg.user; @@ -461,7 +461,7 @@ in serviceConfig = { Type = "oneshot"; User = cfg.user; - ExecStart = "${gitea.bin}/bin/gitea dump"; + ExecStart = "${gitea}/bin/gitea dump"; WorkingDirectory = cfg.stateDir; }; }; diff --git a/nixos/modules/services/misc/gogs.nix b/nixos/modules/services/misc/gogs.nix index ee99967c261..c5070aaa356 100644 --- a/nixos/modules/services/misc/gogs.nix +++ b/nixos/modules/services/misc/gogs.nix @@ -200,7 +200,7 @@ in description = "Gogs (Go Git Service)"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.gogs.bin ]; + path = [ pkgs.gogs ]; preStart = let runConfig = "${cfg.stateDir}/custom/conf/app.ini"; @@ -230,7 +230,7 @@ in HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 4 -type f -wholename "*git/hooks/*") if [ "$HOOKS" ] then - sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gogs,${pkgs.gogs.bin}/bin/gogs,g' $HOOKS + sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gogs,${pkgs.gogs}/bin/gogs,g' $HOOKS sed -ri 's,/nix/store/[a-z0-9.-]+/bin/env,${pkgs.coreutils}/bin/env,g' $HOOKS sed -ri 's,/nix/store/[a-z0-9.-]+/bin/bash,${pkgs.bash}/bin/bash,g' $HOOKS sed -ri 's,/nix/store/[a-z0-9.-]+/bin/perl,${pkgs.perl}/bin/perl,g' $HOOKS @@ -242,7 +242,7 @@ in User = cfg.user; Group = cfg.group; WorkingDirectory = cfg.stateDir; - ExecStart = "${pkgs.gogs.bin}/bin/gogs web"; + ExecStart = "${pkgs.gogs}/bin/gogs web"; Restart = "always"; }; diff --git a/nixos/modules/services/misc/leaps.nix b/nixos/modules/services/misc/leaps.nix index d4e88ecbebd..ef89d3e64d0 100644 --- a/nixos/modules/services/misc/leaps.nix +++ b/nixos/modules/services/misc/leaps.nix @@ -55,7 +55,7 @@ in Restart = "on-failure"; WorkingDirectory = stateDir; PrivateTmp = true; - ExecStart = "${pkgs.leaps.bin}/bin/leaps -path ${toString cfg.path} -address ${cfg.address}:${toString cfg.port}"; + ExecStart = "${pkgs.leaps}/bin/leaps -path ${toString cfg.path} -address ${cfg.address}:${toString cfg.port}"; }; }; }; diff --git a/nixos/modules/services/misc/ssm-agent.nix b/nixos/modules/services/misc/ssm-agent.nix index e951a4c7ffa..f7c05deeecb 100644 --- a/nixos/modules/services/misc/ssm-agent.nix +++ b/nixos/modules/services/misc/ssm-agent.nix @@ -35,7 +35,7 @@ in { path = [ fake-lsb-release ]; serviceConfig = { - ExecStart = "${cfg.package.bin}/bin/agent"; + ExecStart = "${cfg.package}/bin/agent"; KillMode = "process"; Restart = "on-failure"; RestartSec = "15min"; @@ -43,4 +43,3 @@ in { }; }; } - diff --git a/nixos/modules/services/monitoring/bosun.nix b/nixos/modules/services/monitoring/bosun.nix index b1c12cce1f8..04e9da1c81a 100644 --- a/nixos/modules/services/monitoring/bosun.nix +++ b/nixos/modules/services/monitoring/bosun.nix @@ -148,7 +148,7 @@ in { User = cfg.user; Group = cfg.group; ExecStart = '' - ${cfg.package.bin}/bin/bosun -c ${configFile} + ${cfg.package}/bin/bosun -c ${configFile} ''; }; }; diff --git a/nixos/modules/services/monitoring/grafana-reporter.nix b/nixos/modules/services/monitoring/grafana-reporter.nix index b5a78e4583e..893c15d568b 100644 --- a/nixos/modules/services/monitoring/grafana-reporter.nix +++ b/nixos/modules/services/monitoring/grafana-reporter.nix @@ -59,7 +59,7 @@ in { "-templates ${cfg.templateDir}" ]; in { - ExecStart = "${pkgs.grafana_reporter.bin}/bin/grafana-reporter ${args}"; + ExecStart = "${pkgs.grafana_reporter}/bin/grafana-reporter ${args}"; }; }; }; diff --git a/nixos/modules/services/monitoring/grafana.nix b/nixos/modules/services/monitoring/grafana.nix index 0f8bc2471e3..b0c81a46d4d 100644 --- a/nixos/modules/services/monitoring/grafana.nix +++ b/nixos/modules/services/monitoring/grafana.nix @@ -535,7 +535,7 @@ in { ${optionalString cfg.provision.enable '' export GF_PATHS_PROVISIONING=${provisionConfDir}; ''} - exec ${cfg.package.bin}/bin/grafana-server -homepath ${cfg.dataDir} + exec ${cfg.package}/bin/grafana-server -homepath ${cfg.dataDir} ''; serviceConfig = { WorkingDirectory = cfg.dataDir; diff --git a/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix b/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix index 045e48a3d0f..01276366e97 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix @@ -58,7 +58,7 @@ in in { serviceConfig = { ExecStart = '' - ${pkgs.prometheus-snmp-exporter.bin}/bin/snmp_exporter \ + ${pkgs.prometheus-snmp-exporter}/bin/snmp_exporter \ --config.file=${escapeShellArg configFile} \ --log.format=${escapeShellArg cfg.logFormat} \ --log.level=${cfg.logLevel} \ diff --git a/nixos/modules/services/monitoring/scollector.nix b/nixos/modules/services/monitoring/scollector.nix index 38cd2213de7..6f13ce889cb 100644 --- a/nixos/modules/services/monitoring/scollector.nix +++ b/nixos/modules/services/monitoring/scollector.nix @@ -118,7 +118,7 @@ in { serviceConfig = { User = cfg.user; Group = cfg.group; - ExecStart = "${cfg.package.bin}/bin/scollector -conf=${conf} ${lib.concatStringsSep " " cfg.extraOpts}"; + ExecStart = "${cfg.package}/bin/scollector -conf=${conf} ${lib.concatStringsSep " " cfg.extraOpts}"; }; }; diff --git a/nixos/modules/services/networking/consul.nix b/nixos/modules/services/networking/consul.nix index 689cbc8a986..f7d2afead06 100644 --- a/nixos/modules/services/networking/consul.nix +++ b/nixos/modules/services/networking/consul.nix @@ -179,15 +179,15 @@ in (filterAttrs (n: _: hasPrefix "consul.d/" n) config.environment.etc); serviceConfig = { - ExecStart = "@${cfg.package.bin}/bin/consul consul agent -config-dir /etc/consul.d" + ExecStart = "@${cfg.package}/bin/consul consul agent -config-dir /etc/consul.d" + concatMapStrings (n: " -config-file ${n}") configFiles; - ExecReload = "${cfg.package.bin}/bin/consul reload"; + ExecReload = "${cfg.package}/bin/consul reload"; PermissionsStartOnly = true; User = if cfg.dropPrivileges then "consul" else null; Restart = "on-failure"; TimeoutStartSec = "infinity"; } // (optionalAttrs (cfg.leaveOnStop) { - ExecStop = "${cfg.package.bin}/bin/consul leave"; + ExecStop = "${cfg.package}/bin/consul leave"; }); path = with pkgs; [ iproute gnugrep gawk consul ]; @@ -238,7 +238,7 @@ in serviceConfig = { ExecStart = '' - ${cfg.alerts.package.bin}/bin/consul-alerts start \ + ${cfg.alerts.package}/bin/consul-alerts start \ --alert-addr=${cfg.alerts.listenAddr} \ --consul-addr=${cfg.alerts.consulAddr} \ ${optionalString cfg.alerts.watchChecks "--watch-checks"} \ diff --git a/nixos/modules/services/networking/flannel.nix b/nixos/modules/services/networking/flannel.nix index dd2f6454e95..4c040112d28 100644 --- a/nixos/modules/services/networking/flannel.nix +++ b/nixos/modules/services/networking/flannel.nix @@ -19,8 +19,8 @@ in { package = mkOption { description = "Package to use for flannel"; type = types.package; - default = pkgs.flannel.bin; - defaultText = "pkgs.flannel.bin"; + default = pkgs.flannel; + defaultText = "pkgs.flannel"; }; publicIp = mkOption { @@ -167,7 +167,7 @@ in { touch /run/flannel/docker '' + optionalString (cfg.storageBackend == "etcd") '' echo "setting network configuration" - until ${pkgs.etcdctl.bin}/bin/etcdctl set /coreos.com/network/config '${builtins.toJSON networkConfig}' + until ${pkgs.etcdctl}/bin/etcdctl set /coreos.com/network/config '${builtins.toJSON networkConfig}' do echo "setting network configuration, retry" sleep 1 diff --git a/nixos/modules/services/networking/skydns.nix b/nixos/modules/services/networking/skydns.nix index 6ad18bb2240..e79d6de9264 100644 --- a/nixos/modules/services/networking/skydns.nix +++ b/nixos/modules/services/networking/skydns.nix @@ -83,7 +83,7 @@ in { SKYDNS_NAMESERVERS = concatStringsSep "," cfg.nameservers; }; serviceConfig = { - ExecStart = "${cfg.package.bin}/bin/skydns"; + ExecStart = "${cfg.package}/bin/skydns"; }; }; diff --git a/nixos/modules/services/security/hologram-agent.nix b/nixos/modules/services/security/hologram-agent.nix index a5087b0a99b..e37334b3cf5 100644 --- a/nixos/modules/services/security/hologram-agent.nix +++ b/nixos/modules/services/security/hologram-agent.nix @@ -43,12 +43,12 @@ in { description = "Provide EC2 instance credentials to machines outside of EC2"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - requires = [ "network-link-dummy0.service" "network-addresses-dummy0.service" ]; + requires = [ "network-link-dummy0.service" "network-addresses-dummy0.service" ]; preStart = '' /run/current-system/sw/bin/rm -fv /run/hologram.sock ''; serviceConfig = { - ExecStart = "${pkgs.hologram.bin}/bin/hologram-agent -debug -conf ${cfgFile} -port ${cfg.httpPort}"; + ExecStart = "${pkgs.hologram}/bin/hologram-agent -debug -conf ${cfgFile} -port ${cfg.httpPort}"; }; }; diff --git a/nixos/modules/services/security/hologram-server.nix b/nixos/modules/services/security/hologram-server.nix index bad02c7440b..4acf6ae0e21 100644 --- a/nixos/modules/services/security/hologram-server.nix +++ b/nixos/modules/services/security/hologram-server.nix @@ -123,7 +123,7 @@ in { wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = "${pkgs.hologram.bin}/bin/hologram-server --debug --conf ${cfgFile}"; + ExecStart = "${pkgs.hologram}/bin/hologram-server --debug --conf ${cfgFile}"; }; }; }; diff --git a/nixos/modules/services/security/oauth2_proxy.nix b/nixos/modules/services/security/oauth2_proxy.nix index 46caadee204..d5c5437329e 100644 --- a/nixos/modules/services/security/oauth2_proxy.nix +++ b/nixos/modules/services/security/oauth2_proxy.nix @@ -577,7 +577,7 @@ in serviceConfig = { User = "oauth2_proxy"; Restart = "always"; - ExecStart = "${cfg.package.bin}/bin/oauth2_proxy ${configString}"; + ExecStart = "${cfg.package}/bin/oauth2_proxy ${configString}"; EnvironmentFile = mkIf (cfg.keyFile != null) cfg.keyFile; }; }; diff --git a/nixos/modules/services/web-apps/mattermost.nix b/nixos/modules/services/web-apps/mattermost.nix index 853347bf86e..f5c2c356afc 100644 --- a/nixos/modules/services/web-apps/mattermost.nix +++ b/nixos/modules/services/web-apps/mattermost.nix @@ -224,7 +224,7 @@ in serviceConfig = { User = "nobody"; Group = "nogroup"; - ExecStart = "${pkgs.matterircd.bin}/bin/matterircd ${concatStringsSep " " cfg.matterircd.parameters}"; + ExecStart = "${pkgs.matterircd}/bin/matterircd ${concatStringsSep " " cfg.matterircd.parameters}"; WorkingDirectory = "/tmp"; PrivateTmp = true; Restart = "always"; diff --git a/nixos/modules/virtualisation/ecs-agent.nix b/nixos/modules/virtualisation/ecs-agent.nix index fc51b159579..93fefe56d1a 100644 --- a/nixos/modules/virtualisation/ecs-agent.nix +++ b/nixos/modules/virtualisation/ecs-agent.nix @@ -38,9 +38,8 @@ in { if [ ! -z "$ECS_DATADIR" ]; then mkdir -p "$ECS_DATADIR" fi - ${cfg.package.bin}/bin/agent + ${cfg.package}/bin/agent ''; }; }; } - diff --git a/nixos/modules/virtualisation/lxd.nix b/nixos/modules/virtualisation/lxd.nix index de48d3a780e..53b89a9f55b 100644 --- a/nixos/modules/virtualisation/lxd.nix +++ b/nixos/modules/virtualisation/lxd.nix @@ -108,7 +108,7 @@ in ''; serviceConfig = { - ExecStart = "@${cfg.package.bin}/bin/lxd lxd --group lxd"; + ExecStart = "@${cfg.package}/bin/lxd lxd --group lxd"; Type = "simple"; KillMode = "process"; # when stopping, leave the containers alone LimitMEMLOCK = "infinity"; diff --git a/nixos/modules/virtualisation/podman.nix b/nixos/modules/virtualisation/podman.nix index 41d50dc7308..35f879840dd 100644 --- a/nixos/modules/virtualisation/podman.nix +++ b/nixos/modules/virtualisation/podman.nix @@ -6,13 +6,11 @@ let # Provides a fake "docker" binary mapping to podman dockerCompat = pkgs.runCommandNoCC "${pkgs.podman.pname}-docker-compat-${pkgs.podman.version}" { - outputs = [ "out" "bin" "man" ]; + outputs = [ "out" "man" ]; inherit (pkgs.podman) meta; } '' - mkdir $out - - mkdir -p $bin/bin - ln -s ${pkgs.podman.bin}/bin/podman $bin/bin/docker + mkdir -p $out/bin + ln -s ${pkgs.podman}/bin/podman $out/bin/docker mkdir -p $man/share/man/man1 for f in ${pkgs.podman.man}/share/man/man1/*; do From b5dc07a4b471e6f651af3b13e4bd841b6b3ea6ed Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Tue, 28 Apr 2020 11:50:57 +1000 Subject: [PATCH 39/72] treewide: use $out instead of $bin with buildGoPackage --- pkgs/applications/blockchains/dcrwallet.nix | 4 ++-- pkgs/applications/blockchains/quorum.nix | 4 ++-- pkgs/applications/misc/overmind/default.nix | 2 +- .../networking/cluster/k3s/default.nix | 8 ++++---- .../networking/cluster/kompose/default.nix | 2 +- .../networking/cluster/kops/default.nix | 2 +- .../networking/cluster/minishift/default.nix | 2 +- .../networking/cluster/openshift/default.nix | 4 ++-- .../networking/cluster/stern/default.nix | 2 +- .../networking/cluster/terraform/default.nix | 4 ++-- .../networking/cluster/terragrunt/default.nix | 2 +- .../networking/sync/rclone/default.nix | 4 ++-- .../git-and-tools/grv/default.nix | 2 +- .../version-management/gitea/default.nix | 4 ++-- .../version-management/gitlab/gitaly/default.nix | 2 +- .../gitlab/gitlab-shell/default.nix | 4 ++-- .../version-management/gogs/default.nix | 4 ++-- .../virtualization/containerd/default.nix | 4 ++-- .../virtualization/cri-o/default.nix | 7 +++---- .../virtualization/docker-slim/default.nix | 2 +- .../applications/virtualization/docker/proxy.nix | 2 +- .../virtualization/podman/default.nix | 4 ++-- .../applications/virtualization/runc/default.nix | 4 ++-- .../virtualization/singularity/default.nix | 12 ++++++------ pkgs/desktops/deepin/dde-api/default.nix | 4 +--- pkgs/desktops/deepin/dde-daemon/default.nix | 2 -- pkgs/desktops/deepin/startdde/default.nix | 4 +--- pkgs/development/tools/buildah/default.nix | 4 ++-- .../tools/cloudfoundry-cli/default.nix | 2 +- .../default.nix | 4 ++-- .../buildkite-agent/default.nix | 4 ++-- .../buildkite-agent/generic.nix | 12 ++++++------ .../gitlab-runner/default.nix | 8 ++++---- pkgs/development/tools/deis/default.nix | 4 ++-- pkgs/development/tools/dep2nix/default.nix | 2 +- pkgs/development/tools/doctl/default.nix | 2 +- pkgs/development/tools/fac/default.nix | 2 +- pkgs/development/tools/go2nix/default.nix | 4 ++-- pkgs/development/tools/gocode-gomod/default.nix | 2 +- pkgs/development/tools/kind/default.nix | 2 +- pkgs/development/tools/misc/hound/default.nix | 2 +- pkgs/development/tools/out-of-tree/default.nix | 2 +- pkgs/development/tools/skaffold/default.nix | 2 +- pkgs/development/tools/skopeo/default.nix | 2 +- pkgs/development/tools/toxiproxy/default.nix | 4 ++-- pkgs/development/tools/vgo2nix/default.nix | 2 +- pkgs/development/tools/wally-cli/default.nix | 2 +- pkgs/games/boohu/default.nix | 2 +- pkgs/games/harmonist/default.nix | 2 +- pkgs/misc/logging/beats/6.x.nix | 2 +- pkgs/misc/logging/beats/7.x.nix | 2 +- pkgs/servers/dex/default.nix | 4 ++-- pkgs/servers/etcd/default.nix | 2 +- pkgs/servers/meguca/default.nix | 6 +++--- pkgs/servers/miniflux/default.nix | 2 +- .../monitoring/grafana-reporter/default.nix | 2 +- pkgs/servers/monitoring/grafana/default.nix | 6 +++--- pkgs/servers/monitoring/loki/default.nix | 2 +- .../monitoring/prometheus/alertmanager.nix | 2 +- pkgs/servers/monitoring/prometheus/default.nix | 6 +++--- .../monitoring/prometheus/postfix-exporter.nix | 2 +- .../monitoring/prometheus/pushgateway.nix | 2 +- pkgs/servers/monitoring/uchiwa/default.nix | 4 ++-- pkgs/servers/nginx-sso/default.nix | 4 ++-- pkgs/servers/sql/cockroachdb/default.nix | 8 ++------ .../admin/docker-credential-helpers/default.nix | 6 +++--- pkgs/tools/admin/lxd/default.nix | 4 ++-- pkgs/tools/backup/diskrsync/default.nix | 2 +- pkgs/tools/backup/duplicacy/default.nix | 2 +- pkgs/tools/backup/restic/default.nix | 2 +- pkgs/tools/backup/restic/rest-server.nix | 2 +- pkgs/tools/filesystems/gcsfuse/default.nix | 4 ++-- pkgs/tools/misc/aptly/default.nix | 2 +- pkgs/tools/misc/direnv/default.nix | 6 +++--- pkgs/tools/misc/mongodb-tools/default.nix | 2 +- pkgs/tools/misc/phraseapp-client/default.nix | 2 +- pkgs/tools/misc/tewisay/default.nix | 6 +++--- pkgs/tools/networking/assh/default.nix | 2 +- pkgs/tools/networking/dd-agent/datadog-agent.nix | 16 ++++++++-------- pkgs/tools/networking/guardian-agent/default.nix | 8 ++++---- pkgs/tools/package-management/morph/default.nix | 4 ++-- pkgs/tools/security/gopass/default.nix | 4 ++-- pkgs/tools/security/notary/default.nix | 2 +- pkgs/tools/security/vault/default.nix | 2 +- pkgs/tools/security/verifpal/default.nix | 4 ++-- pkgs/tools/system/localtime/default.nix | 2 +- pkgs/tools/virtualization/cri-tools/default.nix | 2 +- .../virtualization/distrobuilder/default.nix | 2 +- 88 files changed, 153 insertions(+), 164 deletions(-) diff --git a/pkgs/applications/blockchains/dcrwallet.nix b/pkgs/applications/blockchains/dcrwallet.nix index 163ed2615d3..258aad8e1bd 100644 --- a/pkgs/applications/blockchains/dcrwallet.nix +++ b/pkgs/applications/blockchains/dcrwallet.nix @@ -29,8 +29,8 @@ buildGoPackage rec { ''; installPhase = '' - mkdir -pv $bin/bin - cp -v dcrwallet $bin/bin + mkdir -pv $out/bin + cp -v dcrwallet $out/bin ''; diff --git a/pkgs/applications/blockchains/quorum.nix b/pkgs/applications/blockchains/quorum.nix index 49bc0be108f..f745860f661 100644 --- a/pkgs/applications/blockchains/quorum.nix +++ b/pkgs/applications/blockchains/quorum.nix @@ -21,8 +21,8 @@ buildGoPackage rec { ''; installPhase = '' - mkdir -pv $bin/bin - cp -v build/bin/geth build/bin/bootnode build/bin/swarm $bin/bin + mkdir -pv $out/bin + cp -v build/bin/geth build/bin/bootnode build/bin/swarm $out/bin ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/misc/overmind/default.nix b/pkgs/applications/misc/overmind/default.nix index 7603a66cd36..29dc6f54e6c 100644 --- a/pkgs/applications/misc/overmind/default.nix +++ b/pkgs/applications/misc/overmind/default.nix @@ -8,7 +8,7 @@ buildGoPackage rec { nativeBuildInputs = [ makeWrapper ]; postInstall = '' - wrapProgram "$bin/bin/overmind" --prefix PATH : "${lib.makeBinPath [ tmux which ]}" + wrapProgram "$out/bin/overmind" --prefix PATH : "${lib.makeBinPath [ tmux which ]}" ''; src = fetchFromGitHub { diff --git a/pkgs/applications/networking/cluster/k3s/default.nix b/pkgs/applications/networking/cluster/k3s/default.nix index b18e1f08dd4..134684f0639 100644 --- a/pkgs/applications/networking/cluster/k3s/default.nix +++ b/pkgs/applications/networking/cluster/k3s/default.nix @@ -126,8 +126,8 @@ let installPhase = '' pushd go/src/${goPackagePath} - mkdir -p "$bin/bin" - install -m 0755 -t "$bin/bin" ./bin/* + mkdir -p "$out/bin" + install -m 0755 -t "$out/bin" ./bin/* popd ''; @@ -181,8 +181,8 @@ let installPhase = '' pushd go/src/${goPackagePath} - mkdir -p "$bin/bin" - install -m 0755 -t "$bin/bin" ./dist/artifacts/k3s + mkdir -p "$out/bin" + install -m 0755 -t "$out/bin" ./dist/artifacts/k3s popd ''; diff --git a/pkgs/applications/networking/cluster/kompose/default.nix b/pkgs/applications/networking/cluster/kompose/default.nix index 2467ed93b32..c01e1c8c004 100644 --- a/pkgs/applications/networking/cluster/kompose/default.nix +++ b/pkgs/applications/networking/cluster/kompose/default.nix @@ -16,7 +16,7 @@ buildGoPackage rec { nativeBuildInputs = [ installShellFiles ]; postInstall = '' for shell in bash zsh; do - $bin/bin/kompose completion $shell > kompose.$shell + $out/bin/kompose completion $shell > kompose.$shell installShellCompletion kompose.$shell done ''; diff --git a/pkgs/applications/networking/cluster/kops/default.nix b/pkgs/applications/networking/cluster/kops/default.nix index 3e1f63531bb..2a86fed0d08 100644 --- a/pkgs/applications/networking/cluster/kops/default.nix +++ b/pkgs/applications/networking/cluster/kops/default.nix @@ -34,7 +34,7 @@ let postInstall = '' for shell in bash zsh; do - $bin/bin/kops completion $shell > kops.$shell + $out/bin/kops completion $shell > kops.$shell installShellCompletion kops.$shell done ''; diff --git a/pkgs/applications/networking/cluster/minishift/default.nix b/pkgs/applications/networking/cluster/minishift/default.nix index 3dcfbf6fd7e..0c932396e9e 100644 --- a/pkgs/applications/networking/cluster/minishift/default.nix +++ b/pkgs/applications/networking/cluster/minishift/default.nix @@ -48,7 +48,7 @@ in buildGoPackage rec { ''; postInstall = '' - wrapProgram "$bin/bin/minishift" \ + wrapProgram "$out/bin/minishift" \ --prefix PATH ':' '${lib.makeBinPath [ docker-machine-kvm openshift ]}' ''; diff --git a/pkgs/applications/networking/cluster/openshift/default.nix b/pkgs/applications/networking/cluster/openshift/default.nix index bcd259b138f..67845c06695 100644 --- a/pkgs/applications/networking/cluster/openshift/default.nix +++ b/pkgs/applications/networking/cluster/openshift/default.nix @@ -72,8 +72,8 @@ in buildGoPackage rec { ''; installPhase = '' - mkdir -p $bin/bin - cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$bin/bin/" + mkdir -p $out/bin + cp -a "_output/local/bin/$(go env GOOS)/$(go env GOARCH)/"* "$out/bin/" installShellCompletion --bash contrib/completions/bash/* installShellCompletion --zsh contrib/completions/zsh/* ''; diff --git a/pkgs/applications/networking/cluster/stern/default.nix b/pkgs/applications/networking/cluster/stern/default.nix index 95ad965c346..8ad0e8711f2 100644 --- a/pkgs/applications/networking/cluster/stern/default.nix +++ b/pkgs/applications/networking/cluster/stern/default.nix @@ -20,7 +20,7 @@ buildGoPackage rec { nativeBuildInputs = [ installShellFiles ]; postInstall = - let stern = if isCrossBuild then buildPackages.stern else "$bin"; in + let stern = if isCrossBuild then buildPackages.stern else "$out"; in '' for shell in bash zsh; do ${stern}/bin/stern --completion $shell > stern.$shell diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix index 50a5129226a..516c4e51402 100644 --- a/pkgs/applications/networking/cluster/terraform/default.nix +++ b/pkgs/applications/networking/cluster/terraform/default.nix @@ -26,7 +26,7 @@ let postInstall = '' # remove all plugins, they are part of the main binary now - for i in $bin/bin/*; do + for i in $out/bin/*; do if [[ $(basename $i) != terraform ]]; then rm "$i" fi @@ -88,7 +88,7 @@ let buildCommand = '' mkdir -p $out/bin/ - makeWrapper "${terraform.bin}/bin/terraform" "$out/bin/terraform" \ + makeWrapper "${terraform}/bin/terraform" "$out/bin/terraform" \ --set NIX_TERRAFORM_PLUGIN_DIR "${ buildEnv { name = "tf-plugin-env"; diff --git a/pkgs/applications/networking/cluster/terragrunt/default.nix b/pkgs/applications/networking/cluster/terragrunt/default.nix index 26c969c671f..4e3066fc6ab 100644 --- a/pkgs/applications/networking/cluster/terragrunt/default.nix +++ b/pkgs/applications/networking/cluster/terragrunt/default.nix @@ -23,7 +23,7 @@ buildGoPackage rec { ''; postInstall = '' - wrapProgram $bin/bin/terragrunt \ + wrapProgram $out/bin/terragrunt \ --set TERRAGRUNT_TFPATH ${lib.getBin terraform.full}/bin/terraform ''; diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix index 57925a3292d..2fde398b2f5 100644 --- a/pkgs/applications/networking/sync/rclone/default.nix +++ b/pkgs/applications/networking/sync/rclone/default.nix @@ -15,7 +15,7 @@ buildGoPackage rec { subPackages = [ "." ]; - outputs = [ "bin" "out" "man" ]; + outputs = [ "out" "man" ]; nativeBuildInputs = [ installShellFiles ]; @@ -23,7 +23,7 @@ buildGoPackage rec { let rcloneBin = if stdenv.buildPlatform == stdenv.hostPlatform - then "$bin" + then "$out" else stdenv.lib.getBin buildPackages.rclone; in '' diff --git a/pkgs/applications/version-management/git-and-tools/grv/default.nix b/pkgs/applications/version-management/git-and-tools/grv/default.nix index 8c915762b6e..64a4f8a823c 100644 --- a/pkgs/applications/version-management/git-and-tools/grv/default.nix +++ b/pkgs/applications/version-management/git-and-tools/grv/default.nix @@ -36,7 +36,7 @@ buildGoPackage { installPhase = '' runHook preInstall - install -D grv $bin/bin/grv + install -D grv $out/bin/grv runHook postInstall ''; diff --git a/pkgs/applications/version-management/gitea/default.nix b/pkgs/applications/version-management/gitea/default.nix index 570fb2ce56f..b18ac251016 100644 --- a/pkgs/applications/version-management/gitea/default.nix +++ b/pkgs/applications/version-management/gitea/default.nix @@ -44,7 +44,7 @@ buildGoPackage rec { ) ''; - outputs = [ "bin" "out" "data" ]; + outputs = [ "out" "data" ]; postInstall = '' mkdir $data @@ -52,7 +52,7 @@ buildGoPackage rec { mkdir -p $out cp -R ./go/src/${goPackagePath}/options/locale $out/locale - wrapProgram $bin/bin/gitea \ + wrapProgram $out/bin/gitea \ --prefix PATH : ${makeBinPath [ bash git gzip openssh ]} ''; diff --git a/pkgs/applications/version-management/gitlab/gitaly/default.nix b/pkgs/applications/version-management/gitlab/gitaly/default.nix index 968b26632c7..37a2fc23af0 100644 --- a/pkgs/applications/version-management/gitlab/gitaly/default.nix +++ b/pkgs/applications/version-management/gitlab/gitaly/default.nix @@ -65,7 +65,7 @@ in buildGoPackage rec { "'/run/gitlab/shell-config.yml'" ''; - outputs = [ "bin" "out" "ruby" ]; + outputs = [ "out" "ruby" ]; meta = with stdenv.lib; { homepage = "https://gitlab.com/gitlab-org/gitaly"; diff --git a/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix b/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix index 40860b13e4d..2b4fddaa9c8 100644 --- a/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix +++ b/pkgs/applications/version-management/gitlab/gitlab-shell/default.nix @@ -18,8 +18,8 @@ buildGoPackage rec { goDeps = ./deps.nix; postInstall = '' - cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/bin/* $bin/bin - cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/{support,VERSION} $bin/ + cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/bin/* $out/bin + cp -r "$NIX_BUILD_TOP/go/src/$goPackagePath"/{support,VERSION} $out/ ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/version-management/gogs/default.nix b/pkgs/applications/version-management/gogs/default.nix index a35778ac023..48667ad8be3 100644 --- a/pkgs/applications/version-management/gogs/default.nix +++ b/pkgs/applications/version-management/gogs/default.nix @@ -34,13 +34,13 @@ buildGoPackage rec { ( optional sqliteSupport "sqlite" ++ optional pamSupport "pam"); - outputs = [ "bin" "out" "data" ]; + outputs = [ "out" "data" ]; postInstall = '' mkdir $data cp -R $src/{public,templates} $data - wrapProgram $bin/bin/gogs \ + wrapProgram $out/bin/gogs \ --prefix PATH : ${makeBinPath [ bash git gzip openssh ]} ''; diff --git a/pkgs/applications/virtualization/containerd/default.nix b/pkgs/applications/virtualization/containerd/default.nix index 7ce4390ba30..fbeb2e3382f 100644 --- a/pkgs/applications/virtualization/containerd/default.nix +++ b/pkgs/applications/virtualization/containerd/default.nix @@ -14,7 +14,7 @@ buildGoPackage rec { }; goPackagePath = "github.com/containerd/containerd"; - outputs = [ "bin" "out" "man" ]; + outputs = [ "out" "man" ]; nativeBuildInputs = [ go-md2man utillinux ]; @@ -33,7 +33,7 @@ buildGoPackage rec { installPhase = '' for b in bin/*; do - install -Dm555 $b $bin/$b + install -Dm555 $b $out/$b done make man diff --git a/pkgs/applications/virtualization/cri-o/default.nix b/pkgs/applications/virtualization/cri-o/default.nix index 74a316ef52a..dacc404b3a8 100644 --- a/pkgs/applications/virtualization/cri-o/default.nix +++ b/pkgs/applications/virtualization/cri-o/default.nix @@ -32,7 +32,6 @@ in buildGoPackage rec { sha256 = "1cy2lqasfn5n20vlm3ckb6myci8ya6qv08dw8fq7z4ycnm39r1a6"; }; - outputs = [ "bin" "out" ]; nativeBuildInputs = [ git pkgconfig which ]; buildInputs = [ btrfs-progs gpgme libapparmor libassuan libgpgerror libseccomp libselinux lvm2 ] @@ -47,9 +46,9 @@ in buildGoPackage rec { bin/pinns ''; installPhase = '' - install -Dm755 bin/crio $bin/bin/crio${flavor} - install -Dm755 bin/crio-status $bin/bin/crio-status${flavor} - install -Dm755 bin/pinns $bin/bin/pinns${flavor} + install -Dm755 bin/crio $out/bin/crio${flavor} + install -Dm755 bin/crio-status $out/bin/crio-status${flavor} + install -Dm755 bin/pinns $out/bin/pinns${flavor} ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/virtualization/docker-slim/default.nix b/pkgs/applications/virtualization/docker-slim/default.nix index a4c2be05061..996d52bacab 100644 --- a/pkgs/applications/virtualization/docker-slim/default.nix +++ b/pkgs/applications/virtualization/docker-slim/default.nix @@ -33,7 +33,7 @@ buildGoPackage rec { # docker-slim tries to create its state dir next to the binary (inside the nix # store), so we set it to use the working directory at the time of invocation postInstall = '' - wrapProgram "$bin/bin/docker-slim" --add-flags '--state-path "$(pwd)"' + wrapProgram "$out/bin/docker-slim" --add-flags '--state-path "$(pwd)"' ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/virtualization/docker/proxy.nix b/pkgs/applications/virtualization/docker/proxy.nix index dde0b481497..cb3518d7d3d 100644 --- a/pkgs/applications/virtualization/docker/proxy.nix +++ b/pkgs/applications/virtualization/docker/proxy.nix @@ -16,7 +16,7 @@ buildGoPackage rec { goDeps = null; installPhase = '' - install -m755 -D ./go/bin/proxy $bin/bin/docker-proxy + install -m755 -D ./go/bin/proxy $out/bin/docker-proxy ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/virtualization/podman/default.nix b/pkgs/applications/virtualization/podman/default.nix index 2c1ad0b4297..b8f8459796a 100644 --- a/pkgs/applications/virtualization/podman/default.nix +++ b/pkgs/applications/virtualization/podman/default.nix @@ -25,7 +25,7 @@ buildGoPackage rec { goPackagePath = "github.com/containers/libpod"; - outputs = [ "bin" "out" "man" ]; + outputs = [ "out" "man" ]; nativeBuildInputs = [ pkg-config go-md2man installShellFiles ]; @@ -40,7 +40,7 @@ buildGoPackage rec { ''; installPhase = '' - install -Dm555 bin/podman $bin/bin/podman + install -Dm555 bin/podman $out/bin/podman installShellCompletion --bash completions/bash/podman installShellCompletion --zsh completions/zsh/_podman MANDIR=$man/share/man make install.man diff --git a/pkgs/applications/virtualization/runc/default.nix b/pkgs/applications/virtualization/runc/default.nix index 87385024967..b29b1f97d21 100644 --- a/pkgs/applications/virtualization/runc/default.nix +++ b/pkgs/applications/virtualization/runc/default.nix @@ -22,7 +22,7 @@ buildGoPackage rec { }; goPackagePath = "github.com/opencontainers/runc"; - outputs = [ "bin" "out" "man" ]; + outputs = [ "out" "man" ]; nativeBuildInputs = [ go-md2man installShellFiles pkg-config which ]; buildInputs = [ libseccomp libapparmor apparmor-parser ]; @@ -38,7 +38,7 @@ buildGoPackage rec { ''; installPhase = '' - install -Dm755 runc $bin/bin/runc + install -Dm755 runc $out/bin/runc installManPage man/*/* ''; diff --git a/pkgs/applications/virtualization/singularity/default.nix b/pkgs/applications/virtualization/singularity/default.nix index 4477e7c7b1d..f6a1a3bc6a9 100644 --- a/pkgs/applications/virtualization/singularity/default.nix +++ b/pkgs/applications/virtualization/singularity/default.nix @@ -42,7 +42,7 @@ buildGoPackage rec { patchShebangs . sed -i 's|defaultPath := "[^"]*"|defaultPath := "${stdenv.lib.makeBinPath propagatedBuildInputs}"|' cmd/internal/cli/actions.go - ./mconfig -V ${version} -p $bin --localstatedir=/var + ./mconfig -V ${version} -p $out --localstatedir=/var # Don't install SUID binaries sed -i 's/-m 4755/-m 755/g' builddir/Makefile @@ -54,16 +54,16 @@ buildGoPackage rec { ''; installPhase = '' - make -C builddir install LOCALSTATEDIR=$bin/var - chmod 755 $bin/libexec/singularity/bin/starter-suid - wrapProgram $bin/bin/singularity --prefix PATH : ${stdenv.lib.makeBinPath propagatedBuildInputs} + make -C builddir install LOCALSTATEDIR=$out/var + chmod 755 $out/libexec/singularity/bin/starter-suid + wrapProgram $out/bin/singularity --prefix PATH : ${stdenv.lib.makeBinPath propagatedBuildInputs} ''; postFixup = '' - find $bin/ -type f -executable -exec remove-references-to -t ${go} '{}' + || true + find $out/libexec/ -type f -executable -exec remove-references-to -t ${go} '{}' + || true # These etc scripts shouldn't have their paths patched - cp etc/actions/* $bin/etc/singularity/actions/ + cp etc/actions/* $out/etc/singularity/actions/ ''; meta = with stdenv.lib; { diff --git a/pkgs/desktops/deepin/dde-api/default.nix b/pkgs/desktops/deepin/dde-api/default.nix index 9fb18d04df8..accc7e2b701 100644 --- a/pkgs/desktops/deepin/dde-api/default.nix +++ b/pkgs/desktops/deepin/dde-api/default.nix @@ -37,8 +37,6 @@ buildGoPackage rec { goDeps = ./deps.nix; - outputs = [ "out" ]; - nativeBuildInputs = [ pkgconfig deepin-gettext-tools # build @@ -109,7 +107,7 @@ buildGoPackage rec { installPhase = '' make install PREFIX="$out" SYSTEMD_LIB_DIR="$out/lib" -C go/src/${goPackagePath} mv $out/share/gocode $out/share/go - remove-references-to -t ${go} $out/bin/* $out/lib/deepin-api/* + remove-references-to -t ${go} $out/lib/deepin-api/* ''; postFixup = '' diff --git a/pkgs/desktops/deepin/dde-daemon/default.nix b/pkgs/desktops/deepin/dde-daemon/default.nix index fdbb7856b06..ad818b2606c 100644 --- a/pkgs/desktops/deepin/dde-daemon/default.nix +++ b/pkgs/desktops/deepin/dde-daemon/default.nix @@ -29,8 +29,6 @@ buildGoPackage rec { goDeps = ./deps.nix; - outputs = [ "out" ]; - nativeBuildInputs = [ pkgconfig dbus-factory diff --git a/pkgs/desktops/deepin/startdde/default.nix b/pkgs/desktops/deepin/startdde/default.nix index 3050e7b9e13..137417f3754 100644 --- a/pkgs/desktops/deepin/startdde/default.nix +++ b/pkgs/desktops/deepin/startdde/default.nix @@ -22,8 +22,6 @@ buildGoPackage rec { goDeps = ./deps.nix; - outputs = [ "out" ]; - nativeBuildInputs = [ pkgconfig dbus-factory @@ -114,7 +112,7 @@ buildGoPackage rec { installPhase = '' make install PREFIX="$out" -C go/src/${goPackagePath} rm -rf $out/share/lightdm # this is uselesss for NixOS - remove-references-to -t ${go} $out/bin/* $out/sbin/* + remove-references-to -t ${go} $out/sbin/* ''; postFixup = '' diff --git a/pkgs/development/tools/buildah/default.nix b/pkgs/development/tools/buildah/default.nix index 84b28631308..09d1e16a8b0 100644 --- a/pkgs/development/tools/buildah/default.nix +++ b/pkgs/development/tools/buildah/default.nix @@ -22,7 +22,7 @@ buildGoPackage rec { sha256 = "187cvb3i5cwm7cwxmzpl2ca7900yb6v6b6cybyz5mnd5ccy5ff1q"; }; - outputs = [ "bin" "man" "out" ]; + outputs = [ "out" "man" ]; goPackagePath = "github.com/containers/buildah"; excludedPackages = [ "tests" ]; @@ -35,7 +35,7 @@ buildGoPackage rec { buildPhase = '' pushd go/src/${goPackagePath} make GIT_COMMIT="unknown" - install -Dm755 buildah $bin/bin/buildah + install -Dm755 buildah $out/bin/buildah installShellCompletion --bash contrib/completions/bash/buildah ''; diff --git a/pkgs/development/tools/cloudfoundry-cli/default.nix b/pkgs/development/tools/cloudfoundry-cli/default.nix index 55d9854d792..1fa45a32c05 100644 --- a/pkgs/development/tools/cloudfoundry-cli/default.nix +++ b/pkgs/development/tools/cloudfoundry-cli/default.nix @@ -34,7 +34,7 @@ buildGoPackage rec { ''; installPhase = '' - install -Dm555 out/cf "$bin/bin/cf" + install -Dm555 out/cf "$out/bin/cf" installShellCompletion --bash "$src/ci/installers/completion/cf" ''; diff --git a/pkgs/development/tools/container-linux-config-transpiler/default.nix b/pkgs/development/tools/container-linux-config-transpiler/default.nix index 0e6c58aa7ba..005c5d55b79 100644 --- a/pkgs/development/tools/container-linux-config-transpiler/default.nix +++ b/pkgs/development/tools/container-linux-config-transpiler/default.nix @@ -20,8 +20,8 @@ buildGoPackage rec { ''; postInstall = '' - mv $bin/bin/{internal,ct} - rm $bin/bin/tools + mv $out/bin/{internal,ct} + rm $out/bin/tools ''; meta = { diff --git a/pkgs/development/tools/continuous-integration/buildkite-agent/default.nix b/pkgs/development/tools/continuous-integration/buildkite-agent/default.nix index 9182c889598..ceaa704b565 100644 --- a/pkgs/development/tools/continuous-integration/buildkite-agent/default.nix +++ b/pkgs/development/tools/continuous-integration/buildkite-agent/default.nix @@ -24,10 +24,10 @@ buildGoPackage rec { postInstall = '' # Fix binary name - mv $bin/bin/{agent,buildkite-agent} + mv $out/bin/{agent,buildkite-agent} # These are runtime dependencies - wrapProgram $bin/bin/buildkite-agent \ + wrapProgram $out/bin/buildkite-agent \ --prefix PATH : '${stdenv.lib.makeBinPath [ openssh git coreutils gnused gnugrep ]}' ''; diff --git a/pkgs/development/tools/continuous-integration/buildkite-agent/generic.nix b/pkgs/development/tools/continuous-integration/buildkite-agent/generic.nix index 1d50e4ff6d5..39178201456 100644 --- a/pkgs/development/tools/continuous-integration/buildkite-agent/generic.nix +++ b/pkgs/development/tools/continuous-integration/buildkite-agent/generic.nix @@ -15,17 +15,17 @@ buildGoPackage { postInstall = '' ${stdenv.lib.optionalString hasBootstrapScript '' # Install bootstrap.sh - mkdir -p $bin/libexec/buildkite-agent - cp $NIX_BUILD_TOP/go/src/${goPackagePath}/templates/bootstrap.sh $bin/libexec/buildkite-agent - sed -e "s|#!/bin/bash|#!${bash}/bin/bash|g" -i $bin/libexec/buildkite-agent/bootstrap.sh + mkdir -p $out/libexec/buildkite-agent + cp $NIX_BUILD_TOP/go/src/${goPackagePath}/templates/bootstrap.sh $out/libexec/buildkite-agent + sed -e "s|#!/bin/bash|#!${bash}/bin/bash|g" -i $out/libexec/buildkite-agent/bootstrap.sh ''} # Fix binary name - mv $bin/bin/{agent,buildkite-agent} + mv $out/bin/{agent,buildkite-agent} # These are runtime dependencies - wrapProgram $bin/bin/buildkite-agent \ - ${stdenv.lib.optionalString hasBootstrapScript "--set BUILDKITE_BOOTSTRAP_SCRIPT_PATH $bin/libexec/buildkite-agent/bootstrap.sh"} \ + wrapProgram $out/bin/buildkite-agent \ + ${stdenv.lib.optionalString hasBootstrapScript "--set BUILDKITE_BOOTSTRAP_SCRIPT_PATH $out/libexec/buildkite-agent/bootstrap.sh"} \ --prefix PATH : '${stdenv.lib.makeBinPath [ openssh git coreutils gnused gnugrep ]}' ''; diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix index 7c7862dbe3b..e152b0ba638 100644 --- a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix +++ b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix @@ -35,10 +35,10 @@ buildGoPackage rec { patches = [ ./fix-shell-path.patch ]; postInstall = '' - touch $bin/bin/hello - install -d $bin/bin/helper-images - ln -sf ${docker_x86_64} $bin/bin/helper-images/prebuilt-x86_64.tar.xz - ln -sf ${docker_arm} $bin/bin/helper-images/prebuilt-arm.tar.xz + touch $out/bin/hello + install -d $out/bin/helper-images + ln -sf ${docker_x86_64} $out/bin/helper-images/prebuilt-x86_64.tar.xz + ln -sf ${docker_arm} $out/bin/helper-images/prebuilt-arm.tar.xz ''; meta = with lib; { diff --git a/pkgs/development/tools/deis/default.nix b/pkgs/development/tools/deis/default.nix index 4625c79767f..9e45d5988cc 100644 --- a/pkgs/development/tools/deis/default.nix +++ b/pkgs/development/tools/deis/default.nix @@ -9,8 +9,8 @@ buildGoPackage rec { subPackages = [ "client" ]; postInstall = '' - if [ -f "$bin/bin/client" ]; then - mv "$bin/bin/client" "$bin/bin/deis" + if [ -f "$out/bin/client" ]; then + mv "$out/bin/client" "$out/bin/deis" fi ''; diff --git a/pkgs/development/tools/dep2nix/default.nix b/pkgs/development/tools/dep2nix/default.nix index 86a1ac6d6b1..9d14f7c1c1e 100644 --- a/pkgs/development/tools/dep2nix/default.nix +++ b/pkgs/development/tools/dep2nix/default.nix @@ -19,7 +19,7 @@ buildGoPackage rec { ]; postFixup = '' - wrapProgram $bin/bin/dep2nix \ + wrapProgram $out/bin/dep2nix \ --prefix PATH : ${nix-prefetch-scripts}/bin ''; diff --git a/pkgs/development/tools/doctl/default.nix b/pkgs/development/tools/doctl/default.nix index f84167afca8..f9c55555536 100644 --- a/pkgs/development/tools/doctl/default.nix +++ b/pkgs/development/tools/doctl/default.nix @@ -21,7 +21,7 @@ buildGoPackage rec { postInstall = '' export HOME=$(mktemp -d) # attempts to write to /homeless-shelter for shell in bash fish zsh; do - $bin/bin/doctl completion $shell > doctl.$shell + $out/bin/doctl completion $shell > doctl.$shell installShellCompletion doctl.$shell done ''; diff --git a/pkgs/development/tools/fac/default.nix b/pkgs/development/tools/fac/default.nix index 331c86ad88c..6a23f84f236 100644 --- a/pkgs/development/tools/fac/default.nix +++ b/pkgs/development/tools/fac/default.nix @@ -18,7 +18,7 @@ buildGoPackage rec { nativeBuildInputs = [ makeWrapper ]; postInstall = '' - wrapProgram $bin/bin/fac \ + wrapProgram $out/bin/fac \ --prefix PATH : ${git}/bin # Install man page, not installed by default diff --git a/pkgs/development/tools/go2nix/default.nix b/pkgs/development/tools/go2nix/default.nix index 96f82cc827f..300f82ee548 100644 --- a/pkgs/development/tools/go2nix/default.nix +++ b/pkgs/development/tools/go2nix/default.nix @@ -17,14 +17,14 @@ buildGoPackage rec { goDeps = ./deps.nix; - outputs = [ "bin" "out" "man" ]; + outputs = [ "out" "man" ]; nativeBuildInputs = [ go-bindata gotools makeWrapper ]; preBuild = ''go generate ./...''; postInstall = '' - wrapProgram $bin/bin/go2nix \ + wrapProgram $out/bin/go2nix \ --prefix PATH : ${nix-prefetch-git}/bin \ --prefix PATH : ${git}/bin diff --git a/pkgs/development/tools/gocode-gomod/default.nix b/pkgs/development/tools/gocode-gomod/default.nix index 3ed719cbfce..603568236e6 100644 --- a/pkgs/development/tools/gocode-gomod/default.nix +++ b/pkgs/development/tools/gocode-gomod/default.nix @@ -25,7 +25,7 @@ buildGoPackage rec { goDeps = ./deps.nix; postInstall = '' - mv $bin/bin/gocode $bin/bin/gocode-gomod + mv $out/bin/gocode $out/bin/gocode-gomod ''; meta = with stdenv.lib; { diff --git a/pkgs/development/tools/kind/default.nix b/pkgs/development/tools/kind/default.nix index 6436c83ee21..c9bea694549 100644 --- a/pkgs/development/tools/kind/default.nix +++ b/pkgs/development/tools/kind/default.nix @@ -20,7 +20,7 @@ buildGoPackage rec { nativeBuildInputs = [ installShellFiles ]; postInstall = '' for shell in bash zsh; do - $bin/bin/kind completion $shell > kind.$shell + $out/bin/kind completion $shell > kind.$shell installShellCompletion kind.$shell done ''; diff --git a/pkgs/development/tools/misc/hound/default.nix b/pkgs/development/tools/misc/hound/default.nix index d3afbbc1bc7..2d7431f9e8b 100644 --- a/pkgs/development/tools/misc/hound/default.nix +++ b/pkgs/development/tools/misc/hound/default.nix @@ -27,7 +27,7 @@ buildGoPackage rec { postInstall = with stdenv; let binPath = lib.makeBinPath [ mercurial git ]; in '' - wrapProgram $bin/bin/houndd --prefix PATH : ${binPath} + wrapProgram $out/bin/houndd --prefix PATH : ${binPath} ''; meta = { diff --git a/pkgs/development/tools/out-of-tree/default.nix b/pkgs/development/tools/out-of-tree/default.nix index 5faeec2387d..434f0186d89 100644 --- a/pkgs/development/tools/out-of-tree/default.nix +++ b/pkgs/development/tools/out-of-tree/default.nix @@ -17,7 +17,7 @@ buildGoPackage rec { goDeps = ./deps.nix; postFixup = '' - wrapProgram $bin/bin/out-of-tree \ + wrapProgram $out/bin/out-of-tree \ --prefix PATH : "${stdenv.lib.makeBinPath [ qemu docker which ]}" ''; diff --git a/pkgs/development/tools/skaffold/default.nix b/pkgs/development/tools/skaffold/default.nix index 5534492cf37..dce42380c50 100644 --- a/pkgs/development/tools/skaffold/default.nix +++ b/pkgs/development/tools/skaffold/default.nix @@ -26,7 +26,7 @@ buildGoPackage rec { nativeBuildInputs = [ installShellFiles ]; postInstall = '' for shell in bash zsh; do - $bin/bin/skaffold completion $shell > skaffold.$shell + $out/bin/skaffold completion $shell > skaffold.$shell installShellCompletion skaffold.$shell done ''; diff --git a/pkgs/development/tools/skopeo/default.nix b/pkgs/development/tools/skopeo/default.nix index 7d4e4e0c69e..f7e1478bbec 100644 --- a/pkgs/development/tools/skopeo/default.nix +++ b/pkgs/development/tools/skopeo/default.nix @@ -34,7 +34,7 @@ buildGoPackage { inherit version; inherit src goPackagePath; - outputs = [ "bin" "man" "out" ]; + outputs = [ "out" "man" ]; excludedPackages = [ "integration" ]; diff --git a/pkgs/development/tools/toxiproxy/default.nix b/pkgs/development/tools/toxiproxy/default.nix index a5c13e2266e..cdf3ed5b71a 100644 --- a/pkgs/development/tools/toxiproxy/default.nix +++ b/pkgs/development/tools/toxiproxy/default.nix @@ -15,8 +15,8 @@ buildGoPackage rec { buildFlagsArray = "-ldflags=-X github.com/Shopify/toxiproxy.Version=v${version}"; postInstall = '' - mv $bin/bin/cli $bin/bin/toxiproxy-cli - mv $bin/bin/cmd $bin/bin/toxiproxy-cmd + mv $out/bin/cli $out/bin/toxiproxy-cli + mv $out/bin/cmd $out/bin/toxiproxy-cmd ''; meta = { diff --git a/pkgs/development/tools/vgo2nix/default.nix b/pkgs/development/tools/vgo2nix/default.nix index 5f2a45f7427..65cc4b145fb 100644 --- a/pkgs/development/tools/vgo2nix/default.nix +++ b/pkgs/development/tools/vgo2nix/default.nix @@ -28,7 +28,7 @@ buildGoPackage { postInstall = with stdenv; let binPath = lib.makeBinPath [ nix-prefetch-git go ]; in '' - wrapProgram $bin/bin/vgo2nix --prefix PATH : ${binPath} + wrapProgram $out/bin/vgo2nix --prefix PATH : ${binPath} ''; meta = with stdenv.lib; { diff --git a/pkgs/development/tools/wally-cli/default.nix b/pkgs/development/tools/wally-cli/default.nix index 5d2550b89cb..ca8b40c4d53 100644 --- a/pkgs/development/tools/wally-cli/default.nix +++ b/pkgs/development/tools/wally-cli/default.nix @@ -19,7 +19,7 @@ buildGoPackage rec { }; postInstall = '' - mv $bin/bin/cli $bin/bin/wally + mv $out/bin/cli $out/bin/wally ''; goDeps = ./deps.nix; diff --git a/pkgs/games/boohu/default.nix b/pkgs/games/boohu/default.nix index 3dcfe201d2c..3ca8ee4693a 100644 --- a/pkgs/games/boohu/default.nix +++ b/pkgs/games/boohu/default.nix @@ -14,7 +14,7 @@ buildGoPackage rec { goDeps = ./deps.nix; - postInstall = "mv $bin/bin/boohu.git $bin/bin/boohu"; + postInstall = "mv $out/bin/boohu.git $out/bin/boohu"; meta = with stdenv.lib; { description = "A new coffee-break roguelike game"; diff --git a/pkgs/games/harmonist/default.nix b/pkgs/games/harmonist/default.nix index 19074a309dd..fb9e1cf6617 100644 --- a/pkgs/games/harmonist/default.nix +++ b/pkgs/games/harmonist/default.nix @@ -14,7 +14,7 @@ buildGoPackage rec { goDeps = ./deps.nix; - postInstall = "mv $bin/bin/harmonist.git $bin/bin/harmonist"; + postInstall = "mv $out/bin/harmonist.git $out/bin/harmonist"; meta = with stdenv.lib; { description = "A stealth coffee-break roguelike game"; diff --git a/pkgs/misc/logging/beats/6.x.nix b/pkgs/misc/logging/beats/6.x.nix index d3f284a2ddb..c3bca18a9a4 100644 --- a/pkgs/misc/logging/beats/6.x.nix +++ b/pkgs/misc/logging/beats/6.x.nix @@ -47,7 +47,7 @@ in { ''; buildInputs = [ systemd.dev ]; postFixup = let libPath = stdenv.lib.makeLibraryPath [ systemd.lib ]; in '' - patchelf --set-rpath ${libPath} "$bin/bin/journalbeat" + patchelf --set-rpath ${libPath} "$out/bin/journalbeat" ''; }; } diff --git a/pkgs/misc/logging/beats/7.x.nix b/pkgs/misc/logging/beats/7.x.nix index cdc8417a9c1..61c89339fe7 100644 --- a/pkgs/misc/logging/beats/7.x.nix +++ b/pkgs/misc/logging/beats/7.x.nix @@ -46,7 +46,7 @@ in { ''; buildInputs = [ systemd.dev ]; postFixup = let libPath = stdenv.lib.makeLibraryPath [ systemd.lib ]; in '' - patchelf --set-rpath ${libPath} "$bin/bin/journalbeat" + patchelf --set-rpath ${libPath} "$out/bin/journalbeat" ''; }; } diff --git a/pkgs/servers/dex/default.nix b/pkgs/servers/dex/default.nix index 799b73294e8..09a3cd877ab 100644 --- a/pkgs/servers/dex/default.nix +++ b/pkgs/servers/dex/default.nix @@ -22,8 +22,8 @@ buildGoPackage rec { ]; postInstall = '' - mkdir -p $bin/share - cp -r $src/web $bin/share/web + mkdir -p $out/share + cp -r $src/web $out/share/web ''; meta = with lib; { diff --git a/pkgs/servers/etcd/default.nix b/pkgs/servers/etcd/default.nix index 9a2bf7ce590..bdb4b4883da 100644 --- a/pkgs/servers/etcd/default.nix +++ b/pkgs/servers/etcd/default.nix @@ -22,7 +22,7 @@ buildGoPackage rec { ''; installPhase = '' - install -Dm755 bin/* bin/functional/cmd/* -t $bin/bin + install -Dm755 bin/* bin/functional/cmd/* -t $out/bin ''; passthru.tests = with nixosTests; { diff --git a/pkgs/servers/meguca/default.nix b/pkgs/servers/meguca/default.nix index 3088ee190e7..4c5521e97bb 100644 --- a/pkgs/servers/meguca/default.nix +++ b/pkgs/servers/meguca/default.nix @@ -35,9 +35,9 @@ buildGoPackage { ''; installPhase = '' - mkdir -p $bin/bin $bin/share/meguca - cp meguca $bin/bin - cp -r www $bin/share/meguca + mkdir -p $out/bin $out/share/meguca + cp meguca $out/bin + cp -r www $out/share/meguca ''; meta = with stdenv.lib; { diff --git a/pkgs/servers/miniflux/default.nix b/pkgs/servers/miniflux/default.nix index bb841da74d2..43c41250970 100644 --- a/pkgs/servers/miniflux/default.nix +++ b/pkgs/servers/miniflux/default.nix @@ -20,7 +20,7 @@ buildGoPackage rec { ''; postInstall = '' - mv $bin/bin/miniflux.app $bin/bin/miniflux + mv $out/bin/miniflux.app $out/bin/miniflux ''; meta = with stdenv.lib; { diff --git a/pkgs/servers/monitoring/grafana-reporter/default.nix b/pkgs/servers/monitoring/grafana-reporter/default.nix index 24756cc8bd2..d6f3c28d82b 100644 --- a/pkgs/servers/monitoring/grafana-reporter/default.nix +++ b/pkgs/servers/monitoring/grafana-reporter/default.nix @@ -19,7 +19,7 @@ buildGoPackage rec { }; postInstall = '' - wrapProgram $bin/bin/grafana-reporter \ + wrapProgram $out/bin/grafana-reporter \ --prefix PATH : ${makeBinPath [ tetex ]} ''; diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index 66e534a0f9a..7fdd9c70d9a 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -29,10 +29,10 @@ buildGoPackage rec { postInstall = '' tar -xvf $srcStatic - mkdir -p $bin/share/grafana - mv grafana-*/{public,conf,tools} $bin/share/grafana/ + mkdir -p $out/share/grafana + mv grafana-*/{public,conf,tools} $out/share/grafana/ '' + lib.optionalString phantomJsSupport '' - ln -sf ${phantomjs2}/bin/phantomjs $bin/share/grafana/tools/phantomjs/phantomjs + ln -sf ${phantomjs2}/bin/phantomjs $out/share/grafana/tools/phantomjs/phantomjs ''; meta = with lib; { diff --git a/pkgs/servers/monitoring/loki/default.nix b/pkgs/servers/monitoring/loki/default.nix index a4117d923e3..e8804702f0d 100644 --- a/pkgs/servers/monitoring/loki/default.nix +++ b/pkgs/servers/monitoring/loki/default.nix @@ -24,7 +24,7 @@ buildGoPackage rec { buildInputs = stdenv.lib.optionals stdenv.isLinux [ systemd.dev ]; preFixup = stdenv.lib.optionalString stdenv.isLinux '' - wrapProgram $bin/bin/promtail \ + wrapProgram $out/bin/promtail \ --prefix LD_LIBRARY_PATH : "${systemd.lib}/lib" ''; diff --git a/pkgs/servers/monitoring/prometheus/alertmanager.nix b/pkgs/servers/monitoring/prometheus/alertmanager.nix index 9074c19e109..9402fa44eed 100644 --- a/pkgs/servers/monitoring/prometheus/alertmanager.nix +++ b/pkgs/servers/monitoring/prometheus/alertmanager.nix @@ -27,7 +27,7 @@ buildGoPackage rec { nativeBuildInputs = [ installShellFiles ]; postInstall = '' - $bin/bin/amtool --completion-script-bash > amtool.bash + $out/bin/amtool --completion-script-bash > amtool.bash installShellCompletion amtool.bash ''; diff --git a/pkgs/servers/monitoring/prometheus/default.nix b/pkgs/servers/monitoring/prometheus/default.nix index e43e625e449..28b76234dd8 100644 --- a/pkgs/servers/monitoring/prometheus/default.nix +++ b/pkgs/servers/monitoring/prometheus/default.nix @@ -54,9 +54,9 @@ in buildGoPackage rec { ''; preInstall = '' - mkdir -p "$bin/share/doc/prometheus" "$bin/etc/prometheus" - cp -a $src/documentation/* $bin/share/doc/prometheus - cp -a $src/console_libraries $src/consoles $bin/etc/prometheus + mkdir -p "$out/share/doc/prometheus" "$out/etc/prometheus" + cp -a $src/documentation/* $out/share/doc/prometheus + cp -a $src/console_libraries $src/consoles $out/etc/prometheus ''; doCheck = true; diff --git a/pkgs/servers/monitoring/prometheus/postfix-exporter.nix b/pkgs/servers/monitoring/prometheus/postfix-exporter.nix index 8202a8c8c29..b5a93343252 100644 --- a/pkgs/servers/monitoring/prometheus/postfix-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/postfix-exporter.nix @@ -43,7 +43,7 @@ buildGoPackage rec { ]; postInstall = optionalString withSystemdSupport '' - wrapProgram $bin/bin/postfix_exporter \ + wrapProgram $out/bin/postfix_exporter \ --prefix LD_LIBRARY_PATH : "${systemd.lib}/lib" ''; diff --git a/pkgs/servers/monitoring/prometheus/pushgateway.nix b/pkgs/servers/monitoring/prometheus/pushgateway.nix index 0cb41f099c6..1425fccdca4 100644 --- a/pkgs/servers/monitoring/prometheus/pushgateway.nix +++ b/pkgs/servers/monitoring/prometheus/pushgateway.nix @@ -29,7 +29,7 @@ buildGoPackage rec { doInstallCheck = true; installCheckPhase = '' - export PATH=$PATH:$bin/bin + export PATH=$PATH:$out/bin pushgateway --help diff --git a/pkgs/servers/monitoring/uchiwa/default.nix b/pkgs/servers/monitoring/uchiwa/default.nix index 065af0079b0..9f0be68e168 100644 --- a/pkgs/servers/monitoring/uchiwa/default.nix +++ b/pkgs/servers/monitoring/uchiwa/default.nix @@ -16,7 +16,7 @@ let goPackagePath = "github.com/${owner}/${repo}"; inherit src; postInstall = '' - mkdir $out + mkdir -p $out cp go/src/github.com/sensu/uchiwa/public/index.html $out/ ''; }; @@ -37,7 +37,7 @@ in stdenv.mkDerivation { buildCommand = '' mkdir -p $out/bin $out/public - makeWrapper ${backend.bin}/bin/uchiwa $out/bin/uchiwa \ + makeWrapper ${backend}/bin/uchiwa $out/bin/uchiwa \ --add-flags "-p $out/public" ln -s ${backend.out}/index.html $out/public/index.html ln -s ${frontend.out}/bower_components $out/public/bower_components diff --git a/pkgs/servers/nginx-sso/default.nix b/pkgs/servers/nginx-sso/default.nix index e9bd705ffa9..769a8605f03 100644 --- a/pkgs/servers/nginx-sso/default.nix +++ b/pkgs/servers/nginx-sso/default.nix @@ -15,8 +15,8 @@ buildGoPackage rec { }; postInstall = '' - mkdir -p $bin/share - cp -R $src/frontend $bin/share + mkdir -p $out/share + cp -R $src/frontend $out/share ''; meta = with stdenv.lib; { diff --git a/pkgs/servers/sql/cockroachdb/default.nix b/pkgs/servers/sql/cockroachdb/default.nix index fb62ee58474..2ce8e901e86 100644 --- a/pkgs/servers/sql/cockroachdb/default.nix +++ b/pkgs/servers/sql/cockroachdb/default.nix @@ -42,7 +42,7 @@ buildGoPackage rec { installPhase = '' runHook preInstall - install -D cockroachoss $bin/bin/cockroach + install -D cockroachoss $out/bin/cockroach installShellCompletion cockroach.bash mkdir -p $man/share/man @@ -51,11 +51,7 @@ buildGoPackage rec { runHook postInstall ''; - # Unfortunately we have to keep an empty reference to $out, because it seems - # buildGoPackages only nukes references to the go compiler under $bin, effectively - # making all binary output under $bin mandatory. Ideally, we would just use - # $out and $man and remove $bin since there's no point in an empty path. :( - outputs = [ "bin" "man" "out" ]; + outputs = [ "out" "man" ]; meta = with stdenv.lib; { homepage = "https://www.cockroachlabs.com"; diff --git a/pkgs/tools/admin/docker-credential-helpers/default.nix b/pkgs/tools/admin/docker-credential-helpers/default.nix index 1f4315afc40..38762b6fd29 100644 --- a/pkgs/tools/admin/docker-credential-helpers/default.nix +++ b/pkgs/tools/admin/docker-credential-helpers/default.nix @@ -32,11 +32,11 @@ buildGoPackage rec { installPhase = if stdenv.isDarwin then '' - install -Dm755 -t $bin/bin bin/docker-credential-osxkeychain + install -Dm755 -t $out/bin bin/docker-credential-osxkeychain '' else '' - install -Dm755 -t $bin/bin bin/docker-credential-pass - install -Dm755 -t $bin/bin bin/docker-credential-secretservice + install -Dm755 -t $out/bin bin/docker-credential-pass + install -Dm755 -t $out/bin bin/docker-credential-secretservice ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/admin/lxd/default.nix b/pkgs/tools/admin/lxd/default.nix index 6051c16e91e..e4ac149a8ed 100644 --- a/pkgs/tools/admin/lxd/default.nix +++ b/pkgs/tools/admin/lxd/default.nix @@ -31,9 +31,9 @@ buildGoPackage rec { postInstall = '' # test binaries, code generation - rm $bin/bin/{deps,macaroon-identity,generate} + rm $out/bin/{deps,macaroon-identity,generate} - wrapProgram $bin/bin/lxd --prefix PATH : ${stdenv.lib.makeBinPath [ + wrapProgram $out/bin/lxd --prefix PATH : ${stdenv.lib.makeBinPath [ acl rsync gnutar xz btrfs-progs gzip dnsmasq squashfsTools iproute iptables ebtables bash criu (writeShellScriptBin "apparmor_parser" '' exec '${apparmor-parser}/bin/apparmor_parser' -I '${apparmor-profiles}/etc/apparmor.d' "$@" diff --git a/pkgs/tools/backup/diskrsync/default.nix b/pkgs/tools/backup/diskrsync/default.nix index 81209444455..b96d6d75725 100644 --- a/pkgs/tools/backup/diskrsync/default.nix +++ b/pkgs/tools/backup/diskrsync/default.nix @@ -17,7 +17,7 @@ buildGoPackage rec { buildInputs = [ makeWrapper ]; preFixup = '' - wrapProgram "$bin/bin/diskrsync" --argv0 diskrsync --prefix PATH : ${openssh}/bin + wrapProgram "$out/bin/diskrsync" --argv0 diskrsync --prefix PATH : ${openssh}/bin ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/backup/duplicacy/default.nix b/pkgs/tools/backup/duplicacy/default.nix index 1d754e4324d..b261289f0bf 100644 --- a/pkgs/tools/backup/duplicacy/default.nix +++ b/pkgs/tools/backup/duplicacy/default.nix @@ -19,7 +19,7 @@ buildGoPackage rec { ''; installPhase = '' - install -D duplicacy_main $bin/bin/duplicacy + install -D duplicacy_main $out/bin/duplicacy ''; meta = with lib; { diff --git a/pkgs/tools/backup/restic/default.nix b/pkgs/tools/backup/restic/default.nix index df9d613ee44..f366533f9bf 100644 --- a/pkgs/tools/backup/restic/default.nix +++ b/pkgs/tools/backup/restic/default.nix @@ -20,7 +20,7 @@ buildGoPackage rec { passthru.tests.restic = nixosTests.restic; postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' - $bin/bin/restic generate \ + $out/bin/restic generate \ --bash-completion restic.bash \ --zsh-completion restic.zsh \ --man . diff --git a/pkgs/tools/backup/restic/rest-server.nix b/pkgs/tools/backup/restic/rest-server.nix index c7f12cb751b..45a4df74b15 100644 --- a/pkgs/tools/backup/restic/rest-server.nix +++ b/pkgs/tools/backup/restic/rest-server.nix @@ -19,7 +19,7 @@ buildGoPackage rec { ''; installPhase = '' - install -Dt $bin/bin rest-server + install -Dt $out/bin rest-server ''; meta = with lib; { diff --git a/pkgs/tools/filesystems/gcsfuse/default.nix b/pkgs/tools/filesystems/gcsfuse/default.nix index f8d955dbfc1..3f0e261b18d 100644 --- a/pkgs/tools/filesystems/gcsfuse/default.nix +++ b/pkgs/tools/filesystems/gcsfuse/default.nix @@ -16,8 +16,8 @@ buildGoPackage rec { subPackages = [ "." "tools/mount_gcsfuse" ]; postInstall = '' - ln -s $bin/bin/mount_gcsfuse $bin/bin/mount.gcsfuse - ln -s $bin/bin/mount_gcsfuse $bin/bin/mount.fuse.gcsfuse + ln -s $out/bin/mount_gcsfuse $out/bin/mount.gcsfuse + ln -s $out/bin/mount_gcsfuse $out/bin/mount.fuse.gcsfuse ''; meta = with lib;{ diff --git a/pkgs/tools/misc/aptly/default.nix b/pkgs/tools/misc/aptly/default.nix index 792b12688aa..3c97c168429 100644 --- a/pkgs/tools/misc/aptly/default.nix +++ b/pkgs/tools/misc/aptly/default.nix @@ -33,7 +33,7 @@ buildGoPackage { postInstall = '' installShellCompletion --bash ${aptlyCompletionSrc}/aptly - wrapProgram "$bin/bin/aptly" \ + wrapProgram "$out/bin/aptly" \ --prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg bzip2 xz graphviz ]}" ''; diff --git a/pkgs/tools/misc/direnv/default.nix b/pkgs/tools/misc/direnv/default.nix index 3c7e72f6d73..7a57c7ad08b 100644 --- a/pkgs/tools/misc/direnv/default.nix +++ b/pkgs/tools/misc/direnv/default.nix @@ -23,9 +23,9 @@ buildGoPackage rec { installPhase = '' mkdir -p $out - make install DESTDIR=$bin - mkdir -p $bin/share/fish/vendor_conf.d - echo "eval ($bin/bin/direnv hook fish)" > $bin/share/fish/vendor_conf.d/direnv.fish + make install DESTDIR=$out + mkdir -p $out/share/fish/vendor_conf.d + echo "eval ($out/bin/direnv hook fish)" > $out/share/fish/vendor_conf.d/direnv.fish ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/misc/mongodb-tools/default.nix b/pkgs/tools/misc/mongodb-tools/default.nix index f216e358d8a..c3e9a0dc2ff 100644 --- a/pkgs/tools/misc/mongodb-tools/default.nix +++ b/pkgs/tools/misc/mongodb-tools/default.nix @@ -45,7 +45,7 @@ in buildGoPackage { runHook preBuild ${stdenv.lib.concatMapStrings (t: '' - go build -o "$bin/bin/${t}" -tags ssl -ldflags "-s -w" $goPackagePath/${t}/main + go build -o "$out/bin/${t}" -tags ssl -ldflags "-s -w" $goPackagePath/${t}/main '') tools} runHook postBuild diff --git a/pkgs/tools/misc/phraseapp-client/default.nix b/pkgs/tools/misc/phraseapp-client/default.nix index a66a6688ad4..35bd84005b5 100644 --- a/pkgs/tools/misc/phraseapp-client/default.nix +++ b/pkgs/tools/misc/phraseapp-client/default.nix @@ -15,7 +15,7 @@ buildGoPackage rec { }; postInstall = '' - ln -s $bin/bin/phraseapp-client $bin/bin/phraseapp + ln -s $out/bin/phraseapp-client $out/bin/phraseapp ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/misc/tewisay/default.nix b/pkgs/tools/misc/tewisay/default.nix index d2a8a1d0e87..b4f834bdd1a 100644 --- a/pkgs/tools/misc/tewisay/default.nix +++ b/pkgs/tools/misc/tewisay/default.nix @@ -18,12 +18,12 @@ buildGoPackage rec { goDeps = ./deps.nix; postInstall = '' - install -D -t $bin/share/tewisay/cows go/src/${goPackagePath}/cows/*.cow + install -D -t $out/share/tewisay/cows go/src/${goPackagePath}/cows/*.cow ''; preFixup = '' - wrapProgram $bin/bin/tewisay \ - --prefix COWPATH : $bin/share/tewisay/cows + wrapProgram $out/bin/tewisay \ + --prefix COWPATH : $out/share/tewisay/cows ''; meta = { diff --git a/pkgs/tools/networking/assh/default.nix b/pkgs/tools/networking/assh/default.nix index 9d4230524be..7b796a52e3a 100644 --- a/pkgs/tools/networking/assh/default.nix +++ b/pkgs/tools/networking/assh/default.nix @@ -10,7 +10,7 @@ buildGoPackage rec { nativeBuildInputs = [ makeWrapper ]; postInstall = '' - wrapProgram "$bin/bin/assh" \ + wrapProgram "$out/bin/assh" \ --prefix PATH : ${openssh}/bin ''; diff --git a/pkgs/tools/networking/dd-agent/datadog-agent.nix b/pkgs/tools/networking/dd-agent/datadog-agent.nix index 57d7244148d..dc29a95d92b 100644 --- a/pkgs/tools/networking/dd-agent/datadog-agent.nix +++ b/pkgs/tools/networking/dd-agent/datadog-agent.nix @@ -47,8 +47,8 @@ in buildGoPackage rec { # DataDog use paths relative to the agent binary, so fix these. postPatch = '' - sed -e "s|PyChecksPath =.*|PyChecksPath = \"$bin/${python.sitePackages}\"|" \ - -e "s|distPath =.*|distPath = \"$bin/share/datadog-agent\"|" \ + sed -e "s|PyChecksPath =.*|PyChecksPath = \"$out/${python.sitePackages}\"|" \ + -e "s|distPath =.*|distPath = \"$out/share/datadog-agent\"|" \ -i cmd/agent/common/common_nix.go sed -e "s|/bin/hostname|${lib.getBin hostname}/bin/hostname|" \ -i pkg/util/hostname_nix.go @@ -57,14 +57,14 @@ in buildGoPackage rec { # Install the config files and python modules from the "dist" dir # into standard paths. postInstall = '' - mkdir -p $bin/${python.sitePackages} $bin/share/datadog-agent - cp -R $src/cmd/agent/dist/conf.d $bin/share/datadog-agent - cp -R $src/cmd/agent/dist/{checks,utils,config.py} $bin/${python.sitePackages} + mkdir -p $out/${python.sitePackages} $out/share/datadog-agent + cp -R $src/cmd/agent/dist/conf.d $out/share/datadog-agent + cp -R $src/cmd/agent/dist/{checks,utils,config.py} $out/${python.sitePackages} - cp -R $src/pkg/status/dist/templates $bin/share/datadog-agent + cp -R $src/pkg/status/dist/templates $out/share/datadog-agent - wrapProgram "$bin/bin/agent" \ - --set PYTHONPATH "$bin/${python.sitePackages}" \ + wrapProgram "$out/bin/agent" \ + --set PYTHONPATH "$out/${python.sitePackages}" \ --prefix LD_LIBRARY_PATH : ${systemd.lib}/lib ''; diff --git a/pkgs/tools/networking/guardian-agent/default.nix b/pkgs/tools/networking/guardian-agent/default.nix index a5e8dc10d34..262234ca67b 100644 --- a/pkgs/tools/networking/guardian-agent/default.nix +++ b/pkgs/tools/networking/guardian-agent/default.nix @@ -23,14 +23,14 @@ buildGoPackage rec { goDeps = ./deps.nix; postInstall = '' - mkdir -p $bin/bin $out/share/doc/${pname} - cp -v ./go/src/github.com/StanfordSNR/${pname}/scripts/* $bin/bin/ + mkdir -p $out/bin $out/share/doc/${pname} + cp -v ./go/src/github.com/StanfordSNR/${pname}/scripts/* $out/bin/ cp -vr ./go/src/github.com/StanfordSNR/${pname}/{AUTHORS,doc,LICENSE,README.md} $out/share/doc/guardian-agent ''; postFixup = '' - wrapProgram $bin/bin/sga-guard \ - --prefix PATH : "$bin/bin" \ + wrapProgram $out/bin/sga-guard \ + --prefix PATH : "$out/bin" \ --prefix PATH : "${autossh}/bin" ''; diff --git a/pkgs/tools/package-management/morph/default.nix b/pkgs/tools/package-management/morph/default.nix index a1d2f15ad13..130bf2bb2e5 100644 --- a/pkgs/tools/package-management/morph/default.nix +++ b/pkgs/tools/package-management/morph/default.nix @@ -29,10 +29,10 @@ buildGoPackage rec { postInstall = '' mkdir -p $lib cp -v $src/data/*.nix $lib - wrapProgram $bin/bin/morph --prefix PATH : ${lib.makeBinPath [ openssh ]}; + wrapProgram $out/bin/morph --prefix PATH : ${lib.makeBinPath [ openssh ]}; ''; - outputs = [ "out" "bin" "lib" ]; + outputs = [ "out" "lib" ]; meta = with lib; { description = "Morph is a NixOS host manager written in Golang."; diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index cb640fb1639..4aee3737664 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -23,13 +23,13 @@ buildGoPackage rec { postInstall = '' for shell in bash fish zsh; do - $bin/bin/gopass completion $shell > gopass.$shell + $out/bin/gopass completion $shell > gopass.$shell installShellCompletion gopass.$shell done ''; postFixup = '' - wrapProgram $bin/bin/gopass \ + wrapProgram $out/bin/gopass \ --prefix PATH : "${wrapperPath}" ''; diff --git a/pkgs/tools/security/notary/default.nix b/pkgs/tools/security/notary/default.nix index 4f0b5f2c954..15797fc8665 100644 --- a/pkgs/tools/security/notary/default.nix +++ b/pkgs/tools/security/notary/default.nix @@ -26,7 +26,7 @@ buildGoPackage rec { installPhase = '' runHook preInstall - install -D bin/notary $bin/bin/notary + install -D bin/notary $out/bin/notary runHook postInstall ''; diff --git a/pkgs/tools/security/vault/default.nix b/pkgs/tools/security/vault/default.nix index ae46bbae40a..5c1409dae1a 100644 --- a/pkgs/tools/security/vault/default.nix +++ b/pkgs/tools/security/vault/default.nix @@ -23,7 +23,7 @@ buildGoPackage rec { ]; postInstall = '' - echo "complete -C $bin/bin/vault vault" > vault.bash + echo "complete -C $out/bin/vault vault" > vault.bash installShellCompletion vault.bash ''; diff --git a/pkgs/tools/security/verifpal/default.nix b/pkgs/tools/security/verifpal/default.nix index 95afb580d4e..e1e5e100bd1 100644 --- a/pkgs/tools/security/verifpal/default.nix +++ b/pkgs/tools/security/verifpal/default.nix @@ -28,8 +28,8 @@ buildGoPackage rec { ''; installPhase = '' - mkdir -p $bin/bin - cp go/src/$goPackagePath/build/bin/linux/verifpal $bin/bin/ + mkdir -p $out/bin + cp go/src/$goPackagePath/build/bin/linux/verifpal $out/bin/ ''; meta = { diff --git a/pkgs/tools/system/localtime/default.nix b/pkgs/tools/system/localtime/default.nix index 4dcb6afb00f..805a70c74e9 100644 --- a/pkgs/tools/system/localtime/default.nix +++ b/pkgs/tools/system/localtime/default.nix @@ -16,7 +16,7 @@ buildGoPackage rec { makeFlags = [ "PREFIX=${placeholder "out"}" - "BINDIR=${placeholder "bin"}/bin" + "BINDIR=${placeholder "out"}/bin" ]; buildPhase = '' diff --git a/pkgs/tools/virtualization/cri-tools/default.nix b/pkgs/tools/virtualization/cri-tools/default.nix index dced8672ee6..65a7f7d1980 100644 --- a/pkgs/tools/virtualization/cri-tools/default.nix +++ b/pkgs/tools/virtualization/cri-tools/default.nix @@ -14,7 +14,7 @@ buildGoPackage rec { buildPhase = '' pushd go/src/${goPackagePath} - make all install BINDIR=$bin/bin + make all install BINDIR=$out/bin ''; meta = with lib; { diff --git a/pkgs/tools/virtualization/distrobuilder/default.nix b/pkgs/tools/virtualization/distrobuilder/default.nix index a781f3a4424..6ad8c355ee2 100644 --- a/pkgs/tools/virtualization/distrobuilder/default.nix +++ b/pkgs/tools/virtualization/distrobuilder/default.nix @@ -23,7 +23,7 @@ buildGoPackage rec { goDeps = ./deps.nix; postInstall = '' - wrapProgram $bin/bin/distrobuilder --prefix PATH ":" ${binPath} + wrapProgram $out/bin/distrobuilder --prefix PATH ":" ${binPath} ''; nativeBuildInputs = [ pkgconfig makeWrapper ]; From 6f693a9afe846e5ba6c4de551e63a91e4b246f6b Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 28 Apr 2020 12:28:37 +0200 Subject: [PATCH 40/72] pandoc: remove GHC from the runtime closure (2.4GB -> 180MB) Also moves the overrides to its own file before we clutter all-packages.nix any further. Comparison of the runtime closure: Before: [{'path': b'/nix/store/mxaxvp33wg9sim8qh2kkw041v492bvxj-libunistring-0.9.10', 'size': '1,634,416'}, {'path': b'/nix/store/hjng28vbd73qq9iz9j8r397x19aa8fp9-libidn2-2.3.0', 'size': '222,672'}, {'path': b'/nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30', 'size': '31,082,264'}, {'path': b'/nix/store/0infa8sv151a1j6zz6lizbpmwv4ksh67-gcc-9.2.0-lib', 'size': '6,284,904'}, {'path': b'/nix/store/9si14qjcz8072c0v42zbkglq08s2cg04-bash-4.4-p23', 'size': '1,325,208'}, {'path': b'/nix/store/bnqfi6ycx6khjfmyyz0wvdgaq4k5p8wv-ghc-8.6.5-doc', 'size': '264,802,472'}, {'path': b'/nix/store/8xhn1y70dbvc5sqxaxvbgc5nqdiahyb2-hashable-1.2.7.0-doc', 'size': '902,800'}, {'path': b'/nix/store/cikknfzlf88qj0fi5m7r547biyji0vnw-primitive-0.6.4.0-doc', 'size': '4,520,392'}, {'path': b'/nix/store/drbcz1f6qfas7r8fsb6qriafzypah1kd-integer-logarithms-1' b'.0.3-doc', 'size': '354,280'}, {'path': b'/nix/store/idk0kl0xg7kmzri5d9bfz4h32ycbz1bw-scientific-0.3.6.2-doc', 'size': '925,408'}, {'path': b'/nix/store/0qxwawz8fc3nz59n07scgh1b3l68ifwf-attoparsec-0.13.2.3-' b'doc', 'size': '3,234,760'}, {'path': b'/nix/store/6wfnl0kvgz9r1z8wp53ildc2hgsysybl-libffi-3.3', 'size': '56,728'}, {'path': b'/nix/store/d38akrx7lljl6pl5gqdxcsmf57k9w08v-gmp-6.2.0', 'size': '751,936'}, {'path': b'/nix/store/fv7c5dxd6cq0w2yl21rpsgmwra87h7x5-ncurses-6.1-20190112', 'size': '3,556,472'}, {'path': b'/nix/store/m0w464nw8ry965np116v3zi0azhcr2ql-attr-2.4.48', 'size': '89,136'}, {'path': b'/nix/store/fv2g7kwbr8a609rzq56fv8lm5h1brwxd-acl-2.2.53', 'size': '109,920'}, {'path': b'/nix/store/bgvd279hrb53i3ah2mi0nf8jp6g6g6g9-coreutils-8.31', 'size': '1,839,848'}, {'path': b'/nix/store/6hhxlbabm7xxdfdw9mbxb8llh63k1bxx-linux-headers-4.19.16', 'size': '4,960,528'}, {'path': b'/nix/store/v235kcs9jfd5vw9d1ylwilqvf49dyjhg-glibc-2.30-bin', 'size': '2,750,608'}, {'path': b'/nix/store/c9l946swbx2v67mwamd3vrypha4l9nz0-glibc-2.30-dev', 'size': '2,479,160'}, {'path': b'/nix/store/qvgf4g9c5h3wzq4xjy566vc0pqgc9fjq-zlib-1.2.11', 'size': '124,336'}, {'path': b'/nix/store/pbfnvqlf8bgp09gy601554ph83y4qzp5-gcc-9.2.0', 'size': '143,309,504'}, {'path': b'/nix/store/nyhj00w339gk2gaj3faz70gjrnbmam8v-binutils-2.31.1', 'size': '33,502,640'}, {'path': b'/nix/store/yrrr7hwcmlr11cl61rjmclp9wrrb92iy-expand-response-params', 'size': '17,368'}, {'path': b'/nix/store/sh8l6la5mv29girlgswnd23s0vfpcfdn-binutils-wrapper-2.3' b'1.1', 'size': '37,992'}, {'path': b'/nix/store/i5k2ibiprmks1bddmjm12fgi30maldzf-pcre-8.43', 'size': '497,632'}, {'path': b'/nix/store/sjvvyjp67sssnpl0k0g5ysmcm8xscwp4-gnugrep-3.4', 'size': '802,368'}, {'path': b'/nix/store/1v0410l20p343l6cvpijz8bi4if2ysh6-gcc-wrapper-9.2.0', 'size': '41,392'}, {'path': b'/nix/store/m0cjgyzlz31s85kl92vgcggsdvb9svcj-libffi-3.3-dev', 'size': '20,296'}, {'path': b'/nix/store/qfmbizy1jv469c1cjfv2vx5h9mdmqapc-gmp-6.2.0-dev', 'size': '215,640'}, {'path': b'/nix/store/yvmfc6lcsljxb8mdpaz63yl1j0z2zzm2-perl-5.30.1', 'size': '53,237,064'}, {'path': b'/nix/store/hz3nwwc0k32ygvjn63gw8gm0nf9gprd8-ghc-8.6.5', 'size': '1,479,053,416'}, {'path': b'/nix/store/6dva17vynqmcib4zjiwn2wqm3nalwks0-integer-logarithms-1' b'.0.3', 'size': '623,632'}, {'path': b'/nix/store/akabgy94c61fnazi0qag5jsj8ysc5y0p-primitive-0.6.4.0', 'size': '9,668,344'}, {'path': b'/nix/store/m2ba7a3d39g0qqr3xd80wgbli555n9q6-hashable-1.2.7.0', 'size': '2,462,152'}, {'path': b'/nix/store/bas2z2zbc24namg1b81kb7cg8x6d6fiw-scientific-0.3.6.2', 'size': '3,125,400'}, {'path': b'/nix/store/0plyy7kq8nxkmv9zi4glgfkcmlz255zl-attoparsec-0.13.2.3', 'size': '16,785,040'}, {'path': b'/nix/store/amya73lz4zziz1zgzb4fvb5b2mn27g8m-random-1.1-doc', 'size': '567,288'}, {'path': b'/nix/store/2n12ini2shm6s7l59ghw98qz198qlnxk-splitmix-0.0.3-doc', 'size': '439,144'}, {'path': b'/nix/store/i5l69z2c0fa4rfkcjjz5bh1ygj3gv742-vector-0.12.1.2-doc', 'size': '17,714,256'}, {'path': b'/nix/store/2na544033hzy4dv5vdy6g48wfzb2ggy2-vector-0.12.1.2', 'size': '47,636,440'}, {'path': b'/nix/store/2yjdlxxhzdi05jcpv8i8dcg8dvg2ms5l-readline-6.3p08', 'size': '391,888'}, {'path': b'/nix/store/ra9ccq229ni22zbxcw3spyjzxxriiraa-network-uri-2.6.2.0-' b'doc', 'size': '919,848'}, {'path': b'/nix/store/3jibbksnd12zj2vkvnm0alp89ax6cfp8-network-uri-2.6.2.0', 'size': '4,475,984'}, {'path': b'/nix/store/cbl6ryhcwbmmqcqmn3g05l5vwsqq7lhh-syb-0.7.1-doc', 'size': '1,077,416'}, {'path': b'/nix/store/iwdppd7ffrx6sbnrx968g3p8s9siixvq-QuickCheck-2.13.2-doc', 'size': '5,510,272'}, {'path': b'/nix/store/8iqwq1m1lc44n23f44rfzvq879crgsd8-unordered-containers' b'-0.2.10.0-doc', 'size': '2,505,120'}, {'path': b'/nix/store/cwgsw7fmsl32z4wwg4wmb8r4i9cqi7ax-base-compat-0.10.5-doc', 'size': '3,928,200'}, {'path': b'/nix/store/dfs4nsfcmvrqb4pfs528mcbx7p6h8rd9-dlist-0.8.0.7-doc', 'size': '287,408'}, {'path': b'/nix/store/fmj6pfcrz6gwpd5ikrhv3sv1lvhzdnkr-tagged-0.8.6-doc', 'size': '585,768'}, {'path': b'/nix/store/fq7gnr6x16s36yyq3ijzg705frg04dsy-th-abstraction-0.3.1' b'.0-doc', 'size': '1,423,760'}, {'path': b'/nix/store/qhbh3dj2b9rx7xplp5fz48fpa05rcws1-uuid-types-1.0.3-doc', 'size': '495,104'}, {'path': b'/nix/store/cmx2kqns3vy0xlpfwbnxfz4br4a050yv-base-orphans-0.8.2-doc', 'size': '1,109,168'}, {'path': b'/nix/store/wj6r2pm4vsbqm17fmcnz3mm8iam9myc8-time-compat-1.9.2.2-' b'doc', 'size': '1,879,624'}, {'path': b'/nix/store/v0w0r8idgapbna2qjb6g2k2k16qfqz0d-aeson-1.4.6.0-doc', 'size': '8,699,624'}, {'path': b'/nix/store/3zsd0wqy8c3x9nvja8bhs8r10y4wl1p1-pandoc-types-1.17.6.' b'1-doc', 'size': '2,551,784'}, {'path': b'/nix/store/4857x32hdkrrd2iqsn2m5d95xaj1s4p8-network-2.8.0.1-doc', 'size': '2,117,320'}, {'path': b'/nix/store/7qn29l7gyvnfc0pvxsmqr7nvkpw0ndn1-tagged-0.8.6', 'size': '1,883,152'}, {'path': b'/nix/store/84i7995b3md52k9xvys2jdq7pmyrxckv-unordered-containers' b'-0.2.10.0', 'size': '6,878,528'}, {'path': b'/nix/store/ankhr2045qag4g0jb14p2z5mjqp7mdpn-base-orphans-0.8.2', 'size': '1,619,536'}, {'path': b'/nix/store/cjqcam9fp4bkbz5c2scgpgrywzny8h2k-dlist-0.8.0.7', 'size': '732,544'}, {'path': b'/nix/store/d3jdb9fz47z35p05pr3xgyrg7sffp78b-base-compat-0.10.5', 'size': '2,244,632'}, {'path': b'/nix/store/k0jpihzyqp475i39haciq86h929lp1ql-random-1.1', 'size': '3,503,896'}, {'path': b'/nix/store/i88qnwrc40lskrji9pb0q8f5qpdd7jbi-uuid-types-1.0.3', 'size': '1,643,272'}, {'path': b'/nix/store/jl9ns5773w6vx0rqhv1f67ydsww22r27-time-compat-1.9.2.2', 'size': '4,675,896'}, {'path': b'/nix/store/pwfwlzn5qa61aravfhw670hjd3cyacfs-th-abstraction-0.3.1.0', 'size': '5,370,256'}, {'path': b'/nix/store/bciw51ipp7z9npkpwyj1nkjx6ayk62yl-aeson-1.4.6.0', 'size': '66,540,376'}, {'path': b'/nix/store/g8daac71hgx0h735rwnj5n69mswxv4xp-pandoc-2.7.3-data', 'size': '641,776'}, {'path': b'/nix/store/r9rz4fiq8z4gppzf7miqkq1cbnw40yz6-splitmix-0.0.3', 'size': '766,920'}, {'path': b'/nix/store/hs0mrcymg5alw1jlz46pb5ypgk7yf3js-QuickCheck-2.13.2', 'size': '20,329,560'}, {'path': b'/nix/store/pf2bzndm7l357pc3hi5chsavvnn1wbmp-syb-0.7.1', 'size': '2,904,168'}, {'path': b'/nix/store/gkllhz4s27p4nqnwyrxc04c6829bsnkn-pandoc-types-1.17.6.1', 'size': '19,829,464'}, {'path': b'/nix/store/pywbwq86hy6c592aa1fnzvj8nqvmq90i-lua-5.3.5', 'size': '1,585,744'}, {'path': b'/nix/store/r0kkdb3ilqi2blsc77nlkyxvvwwfalh9-HTTP-4000.3.14-doc', 'size': '3,377,184'}, {'path': b'/nix/store/r900ixyg8b9i6ygayax9p4rgh79lzbky-network-2.8.0.1', 'size': '9,063,944'}, {'path': b'/nix/store/rq51qlkaf3v5g51q19f9dwyfxv86q3qq-HTTP-4000.3.14', 'size': '11,520,256'}, {'path': b'/nix/store/z7ln4gszk2nns7qs9k0j6zvw20cv22hw-pandoc-2.7.3', 'size': '131,976,264'}] total: 2,476,810,912 After: [{'path': b'/nix/store/00d9ds1iqjxpbp3c2rsb0wyl3ypcck4y-pandoc-2.7.3-data', 'size': '641,776'}, {'path': b'/nix/store/mxaxvp33wg9sim8qh2kkw041v492bvxj-libunistring-0.9.10', 'size': '1,634,416'}, {'path': b'/nix/store/hjng28vbd73qq9iz9j8r397x19aa8fp9-libidn2-2.3.0', 'size': '222,672'}, {'path': b'/nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30', 'size': '31,082,264'}, {'path': b'/nix/store/0infa8sv151a1j6zz6lizbpmwv4ksh67-gcc-9.2.0-lib', 'size': '6,284,904'}, {'path': b'/nix/store/fv7c5dxd6cq0w2yl21rpsgmwra87h7x5-ncurses-6.1-20190112', 'size': '3,556,472'}, {'path': b'/nix/store/2yjdlxxhzdi05jcpv8i8dcg8dvg2ms5l-readline-6.3p08', 'size': '391,888'}, {'path': b'/nix/store/6wfnl0kvgz9r1z8wp53ildc2hgsysybl-libffi-3.3', 'size': '56,728'}, {'path': b'/nix/store/d38akrx7lljl6pl5gqdxcsmf57k9w08v-gmp-6.2.0', 'size': '751,936'}, {'path': b'/nix/store/pywbwq86hy6c592aa1fnzvj8nqvmq90i-lua-5.3.5', 'size': '1,585,744'}, {'path': b'/nix/store/qvgf4g9c5h3wzq4xjy566vc0pqgc9fjq-zlib-1.2.11', 'size': '124,336'}, {'path': b'/nix/store/gg13d8cj775qbn81sbvjqlazxm14b2jq-pandoc-2.7.3', 'size': '131,919,072'}] total: 178,252,208 --- pkgs/development/tools/pandoc/default.nix | 29 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +--- 2 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/tools/pandoc/default.nix diff --git a/pkgs/development/tools/pandoc/default.nix b/pkgs/development/tools/pandoc/default.nix new file mode 100644 index 00000000000..ce7132b0007 --- /dev/null +++ b/pkgs/development/tools/pandoc/default.nix @@ -0,0 +1,29 @@ +{ haskellPackages, haskell, removeReferencesTo }: + +let + static = haskell.lib.justStaticExecutables haskellPackages.pandoc; + +in + (haskell.lib.overrideCabal static (drv: { + configureFlags = drv.configureFlags or [] ++ ["-fembed_data_files"]; + buildDepends = drv.buildDepends or [] ++ [haskellPackages.file-embed]; + buildTools = (drv.buildTools or []) ++ [ removeReferencesTo ]; + })).overrideAttrs (drv: { + + # These libraries are still referenced, because pandoc references + # their `Paths_*` module for figuring out their version. + # The `Paths_*` module is generated by Cabal, and contains the + # version, but also paths to e.g. the data directories, which + # lead to a transitive runtime dependency on the whole GHC distribution. + # This should ideally be fixed in haskellPackages (or even Cabal), + # but a minimal pandoc is important enough to patch it manually. + disallowedReferences = [ haskellPackages.pandoc-types haskellPackages.HTTP ]; + postInstall = '' + remove-references-to \ + -t ${haskellPackages.pandoc-types} \ + $out/bin/pandoc + remove-references-to \ + -t ${haskellPackages.HTTP} \ + $out/bin/pandoc + ''; + }) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a2fae02ba57..ba33311a39e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5752,10 +5752,7 @@ in pal = callPackage ../tools/misc/pal { }; - pandoc = haskell.lib.overrideCabal (haskell.lib.justStaticExecutables haskellPackages.pandoc) (drv: { - configureFlags = drv.configureFlags or [] ++ ["-fembed_data_files"]; - buildDepends = drv.buildDepends or [] ++ [haskellPackages.file-embed]; - }); + pandoc = callPackage ../development/tools/pandoc { }; pamtester = callPackage ../tools/security/pamtester { }; From d103dc49986ed4c7a242a832d4f74a85062e2395 Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Tue, 28 Apr 2020 15:08:13 +0200 Subject: [PATCH 41/72] linux: do not depend on systemd indirectly utillinux depends on systemd because: * uuidd supports socket activation * lslogins can show recent journal entries * fstrim comes with a service file (and we use this in NixOS) * logger can write journal entries (See https://www.openembedded.org/pipermail/openembedded-core/2015-February/102069.html) systemd doesn't depend on utillinux but on utillinuxMinimal which is a version of utillinux without these features to avoid cyclic dependencies. With this change, the linux kernel (of which i don't fully understand why it would depend on util-linux in the first place, but this was added in https://github.com/NixOS/nixpkgs/pull/32137/files without too much explanation) depends on the minimal version of util-linux too. This makes it that every time we change build flags in systemd the linux kernel doesn't have to wastefully rebuild. --- pkgs/os-specific/linux/kernel/manual-config.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 71505840b86..d73e0a8ac90 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -1,6 +1,6 @@ { buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl , libelf, cpio -, utillinux +, utillinuxMinimal , writeTextFile }: @@ -281,7 +281,7 @@ let in assert stdenv.lib.versionAtLeast version "4.14" -> libelf != null; -assert stdenv.lib.versionAtLeast version "4.15" -> utillinux != null; +assert stdenv.lib.versionAtLeast version "4.15" -> utillinuxMinimal != null; stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches configfile) // { pname = "linux"; inherit version; @@ -292,7 +292,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr ] ++ optional (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools ++ optional (stdenv.lib.versionAtLeast version "4.14") libelf - ++ optional (stdenv.lib.versionAtLeast version "4.15") utillinux + ++ optional (stdenv.lib.versionAtLeast version "4.15") utillinuxMinimal ++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ] ++ optional (stdenv.lib.versionAtLeast version "5.2") cpio ; From 128b93e06142914a88c91f3c9f03ce52f6cb569e Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 26 Apr 2020 16:32:56 -0400 Subject: [PATCH 42/72] meson: Patch to ingest env vars like autoconf See comment in code and the PR it references, https://github.com/mesonbuild/meson/pull/6827, for details. We can remove entries from the cross file because they will be gotten from env vars now. --- .../tools/build-managers/meson/default.nix | 11 +++++------ .../build-managers/meson/more-env-vars.patch | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 pkgs/development/tools/build-managers/meson/more-env-vars.patch diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index 977ffe837ec..3fb435c5c2b 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -45,6 +45,11 @@ python3Packages.buildPythonApplication rec { # We remove the check so multiple outputs can work sanely. ./allow-dirs-outside-of-prefix.patch + # Meson is currently inspecting fewer variables than autoconf does, which + # makes it harder for us to use setup hooks, etc. Taken from + # https://github.com/mesonbuild/meson/pull/6827 + ./more-env-vars.patch + # Unlike libtool, vanilla Meson does not pass any information # about the path library will be installed to to g-ir-scanner, # breaking the GIR when path other than ${!outputLib}/lib is used. @@ -67,13 +72,7 @@ python3Packages.buildPythonApplication rec { crossFile = writeTextDir "cross-file.conf" '' [binaries] - c = '${targetPackages.stdenv.cc.targetPrefix}cc' - cpp = '${targetPackages.stdenv.cc.targetPrefix}c++' - ar = '${targetPackages.stdenv.cc.bintools.targetPrefix}ar' - strip = '${targetPackages.stdenv.cc.bintools.targetPrefix}strip' pkgconfig = 'pkg-config' - ld = '${targetPackages.stdenv.cc.targetPrefix}ld' - objcopy = '${targetPackages.stdenv.cc.targetPrefix}objcopy' [properties] needs_exe_wrapper = true diff --git a/pkgs/development/tools/build-managers/meson/more-env-vars.patch b/pkgs/development/tools/build-managers/meson/more-env-vars.patch new file mode 100644 index 00000000000..a8f860f03cc --- /dev/null +++ b/pkgs/development/tools/build-managers/meson/more-env-vars.patch @@ -0,0 +1,16 @@ +diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py +index ac13a710..e0d07c51 100644 +--- a/mesonbuild/envconfig.py ++++ b/mesonbuild/envconfig.py +@@ -119,9 +119,9 @@ def get_env_var_pair(for_machine: MachineChoice, + # compiling we fall back on the unprefixed host version. This + # allows native builds to never need to worry about the 'BUILD_*' + # ones. +- ([var_name + '_FOR_BUILD'] if is_cross else [var_name]), ++ [var_name + '_FOR_BUILD'] + ([] if is_cross else [var_name]), + # Always just the unprefixed host verions +- ([] if is_cross else [var_name]), ++ [var_name], + )[for_machine] + for var in candidates: + value = os.environ.get(var) From 8245230753d260b61b928fad7e00323f38ca450f Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sun, 26 Apr 2020 16:47:27 -0400 Subject: [PATCH 43/72] meson: Make target-agnostic The cross file is added in the `mkDerivation`. It isn't nice putting build tool-specific stuff here, but our current architecture gives us little alternative. --- .../tools/build-managers/meson/default.nix | 28 ------------------ .../tools/build-managers/meson/setup-hook.sh | 5 ---- pkgs/stdenv/generic/make-derivation.nix | 29 +++++++++++++++++++ 3 files changed, 29 insertions(+), 33 deletions(-) diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index 3fb435c5c2b..3809d19e7d0 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -3,20 +3,8 @@ , stdenv , writeTextDir , substituteAll -, targetPackages }: -let - # See https://mesonbuild.com/Reference-tables.html#cpu-families - cpuFamilies = { - aarch64 = "aarch64"; - armv5tel = "arm"; - armv6l = "arm"; - armv7l = "arm"; - i686 = "x86"; - x86_64 = "x86_64"; - }; -in python3Packages.buildPythonApplication rec { pname = "meson"; version = "0.54.0"; @@ -70,27 +58,11 @@ python3Packages.buildPythonApplication rec { setupHook = ./setup-hook.sh; - crossFile = writeTextDir "cross-file.conf" '' - [binaries] - pkgconfig = 'pkg-config' - - [properties] - needs_exe_wrapper = true - - [host_machine] - system = '${targetPackages.stdenv.targetPlatform.parsed.kernel.name}' - cpu_family = '${cpuFamilies.${targetPackages.stdenv.targetPlatform.parsed.cpu.name}}' - cpu = '${targetPackages.stdenv.targetPlatform.parsed.cpu.name}' - endian = ${if targetPackages.stdenv.targetPlatform.isLittleEndian then "'little'" else "'big'"} - ''; - # 0.45 update enabled tests but they are failing doCheck = false; # checkInputs = [ ninja pkgconfig ]; # checkPhase = "python ./run_project_tests.py"; - isCross = stdenv.targetPlatform != stdenv.hostPlatform; - meta = with lib; { homepage = "https://mesonbuild.com"; description = "SCons-like build system that use python as a front-end language and Ninja as a building backend"; diff --git a/pkgs/development/tools/build-managers/meson/setup-hook.sh b/pkgs/development/tools/build-managers/meson/setup-hook.sh index aef18e65ea1..3d946fcffd5 100644 --- a/pkgs/development/tools/build-managers/meson/setup-hook.sh +++ b/pkgs/development/tools/build-managers/meson/setup-hook.sh @@ -5,11 +5,6 @@ mesonConfigurePhase() { mesonFlags="--prefix=$prefix $mesonFlags" fi - # Build release by default. - if [ -n "@isCross@" ]; then - crossMesonFlags="--cross-file=@crossFile@/cross-file.conf" - fi - # See multiple-outputs.sh and meson’s coredata.py mesonFlags="\ --libdir=${!outputLib}/lib --libexecdir=${!outputLib}/libexec \ diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index a11b280b047..e6363ce42c0 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -49,6 +49,7 @@ in rec { # Configure Phase , configureFlags ? [] , cmakeFlags ? [] + , mesonFlags ? [] , # Target is not included by default because most programs don't care. # Including it then would cause needless mass rebuilds. # @@ -252,6 +253,34 @@ in rec { ++ lib.optional (stdenv.buildPlatform.uname.system != null) "-DCMAKE_HOST_SYSTEM_NAME=${stdenv.buildPlatform.uname.system}" ++ lib.optional (stdenv.buildPlatform.uname.processor != null) "-DCMAKE_HOST_SYSTEM_PROCESSOR=${stdenv.buildPlatform.uname.processor}" ++ lib.optional (stdenv.buildPlatform.uname.release != null) "-DCMAKE_HOST_SYSTEM_VERSION=${stdenv.buildPlatform.uname.release}"; + + mesonFlags = if mesonFlags == null then null else let + # See https://mesonbuild.com/Reference-tables.html#cpu-families + cpuFamilies = { + aarch64 = "aarch64"; + armv5tel = "arm"; + armv6l = "arm"; + armv7l = "arm"; + i686 = "x86"; + x86_64 = "x86_64"; + }; + crossFile = builtins.toFile "cross-file.conf" ('' + [properties] + needs_exe_wrapper = true + + [host_machine] + system = '${stdenv.targetPlatform.parsed.kernel.name}' + cpu_family = '${cpuFamilies.${stdenv.targetPlatform.parsed.cpu.name}}' + cpu = '${stdenv.targetPlatform.parsed.cpu.name}' + endian = ${if stdenv.targetPlatform.isLittleEndian then "'little'" else "'big'"} + '' + # TODO should have target prefix too, issue #86077 + + '' + + [binaries] + pkgconfig = 'pkg-config' + ''); + in [ "--cross-file=${crossFile}" ] ++ mesonFlags; } // lib.optionalAttrs (attrs.enableParallelBuilding or false) { enableParallelChecking = attrs.enableParallelChecking or true; } // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != []) { From cf858e6d57c4753ca872ef9c24d2c31cb6a1204f Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 28 Apr 2020 16:51:44 -0400 Subject: [PATCH 44/72] mkDerivation mesonFlags: Fix cross file logic to handle more cases Otherwise eval breaks --- pkgs/stdenv/generic/make-derivation.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index e6363ce42c0..b06541a7e41 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -256,21 +256,19 @@ in rec { mesonFlags = if mesonFlags == null then null else let # See https://mesonbuild.com/Reference-tables.html#cpu-families - cpuFamilies = { - aarch64 = "aarch64"; - armv5tel = "arm"; - armv6l = "arm"; - armv7l = "arm"; - i686 = "x86"; - x86_64 = "x86_64"; - }; + cpuFamily = platform: with platform; + /**/ if isAarch64 then "arm" + else if isAarch32 then "aarch64" + else if isx86_32 then "x86" + else if isx86_64 then "x86_64" + else platform.parsed.cpu.family + builtins.toString platform.parsed.cpu.bits; crossFile = builtins.toFile "cross-file.conf" ('' [properties] needs_exe_wrapper = true [host_machine] system = '${stdenv.targetPlatform.parsed.kernel.name}' - cpu_family = '${cpuFamilies.${stdenv.targetPlatform.parsed.cpu.name}}' + cpu_family = '${cpuFamily stdenv.targetPlatform}' cpu = '${stdenv.targetPlatform.parsed.cpu.name}' endian = ${if stdenv.targetPlatform.isLittleEndian then "'little'" else "'big'"} '' From f509255ff75e8b7f545be1cc0403626a35fd6570 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Tue, 28 Apr 2020 13:22:31 -0400 Subject: [PATCH 45/72] openexr,ilmbase: Switch to cmake-based build It appears that the autotools based build isn't supported on Darwin. Just use the stdenv-builtin cmake build everywhere, as it works just fine and is simpler. --- .../development/libraries/ilmbase/default.nix | 23 ++++------ .../development/libraries/openexr/default.nix | 45 +++++-------------- 2 files changed, 20 insertions(+), 48 deletions(-) diff --git a/pkgs/development/libraries/ilmbase/default.nix b/pkgs/development/libraries/ilmbase/default.nix index 4ea16a59e8b..9d2479c2e0b 100644 --- a/pkgs/development/libraries/ilmbase/default.nix +++ b/pkgs/development/libraries/ilmbase/default.nix @@ -1,9 +1,13 @@ -{ stdenv, lib, buildPackages, automake, autoconf, libtool, which, - fetchpatch, openexr }: +{ stdenv +, buildPackages +, cmake +, libtool +, openexr +}: stdenv.mkDerivation rec { pname = "ilmbase"; - version = lib.getVersion openexr; + version = stdenv.lib.getVersion openexr; # the project no longer provides separate tarballs. We may even want to merge # the ilmbase package into openexr in the future. @@ -13,19 +17,10 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - preConfigure = '' - patchShebangs ./bootstrap - ./bootstrap - ''; - + nativeBuildInputs = [ cmake libtool ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; - nativeBuildInputs = [ automake autoconf libtool which ]; - NIX_CFLAGS_LINK = "-pthread"; - - patches = [ - ./cross.patch - ]; + patches = [ ./cross.patch ]; # fails 1 out of 1 tests with # "lt-ImathTest: testBoxAlgo.cpp:892: void {anonymous}::boxMatrixTransform(): Assertion `b21 == b2' failed" diff --git a/pkgs/development/libraries/openexr/default.nix b/pkgs/development/libraries/openexr/default.nix index da8fb429465..425afc70f37 100644 --- a/pkgs/development/libraries/openexr/default.nix +++ b/pkgs/development/libraries/openexr/default.nix @@ -1,11 +1,13 @@ -{ lib, stdenv, buildPackages, fetchFromGitHub, autoconf, automake, libtool, pkgconfig, - zlib, ilmbase, fetchpatch }: - -let - # Doesn't really do anything when not crosscompiling - emulator = stdenv.hostPlatform.emulator buildPackages; -in - +{ lib +, stdenv +, buildPackages +, fetchFromGitHub +, zlib +, ilmbase +, fetchpatch +, cmake +, libtool +}: stdenv.mkDerivation rec { pname = "openexr"; version = "2.4.1"; @@ -17,36 +19,11 @@ stdenv.mkDerivation rec { sha256 = "020gyl8zv83ag6gbcchmqiyx9rh2jca7j8n52zx1gk4rck7kwc01"; }; - sourceRoot = "source/OpenEXR"; - outputs = [ "bin" "dev" "out" "doc" ]; - - # Needed because there are some generated sources. Solution: just run them under QEMU. - postPatch = '' - for file in b44ExpLogTable dwaLookups - do - # Ecape for both sh and Automake - emu=${lib.escapeShellArg (lib.replaceStrings ["$"] ["$$"] emulator)} - before="./$file > $file.h" - after="$emu $before" - substituteInPlace IlmImf/Makefile.am \ - --replace "$before" "$after" - done - - # Make sure the patch succeeded - [[ $(grep "$emu" IlmImf/Makefile.am | wc -l) = 2 ]] - ''; - - preConfigure = '' - patchShebangs ./bootstrap - ./bootstrap - ''; - - nativeBuildInputs = [ pkgconfig autoconf automake libtool ]; + nativeBuildInputs = [ cmake libtool ]; propagatedBuildInputs = [ ilmbase zlib ]; enableParallelBuilding = true; - doCheck = false; # fails 1 of 1 tests meta = with stdenv.lib; { description = "A high dynamic-range (HDR) image file format"; From 7550ab98b0a305afda06121e6f135a7556b7e753 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 28 Apr 2020 23:36:40 +0200 Subject: [PATCH 46/72] libbfd: fix build The patch to separate it from `binutils` didn't apply anymore after updating `binutils` to 2.34[1]. [1] #85951 --- .../build-components-separately.patch | 38 ++++++------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/pkgs/development/tools/misc/binutils/build-components-separately.patch b/pkgs/development/tools/misc/binutils/build-components-separately.patch index d3cd0d2131c..38fa4934a28 100644 --- a/pkgs/development/tools/misc/binutils/build-components-separately.patch +++ b/pkgs/development/tools/misc/binutils/build-components-separately.patch @@ -1,19 +1,8 @@ -From bc09a9236f67e710d545ac11bcdac7b55dbcc1a0 Mon Sep 17 00:00:00 2001 -From: John Ericson -Date: Thu, 12 Oct 2017 11:16:57 -0400 -Subject: [PATCH] Build components separately - ---- - bfd/configure.ac | 18 +++--------------- - opcodes/Makefile.am | 17 +++++++++++++---- - opcodes/configure.ac | 45 ++++++--------------------------------------- - 3 files changed, 22 insertions(+), 58 deletions(-) - diff --git a/bfd/configure.ac b/bfd/configure.ac -index 9a183c1628..8728837384 100644 +index c5bfbd5d..45ad4c26 100644 --- a/bfd/configure.ac +++ b/bfd/configure.ac -@@ -241,31 +241,19 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, +@@ -278,31 +278,19 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, LT_LIB_M @@ -33,26 +22,26 @@ index 9a183c1628..8728837384 100644 - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" - fi - - # More hacks to build DLLs on Windows. case "${host}" in + # More hacks to build DLLs on Windows. *-*-cygwin*) SHARED_LDFLAGS="-no-undefined" - SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" + SHARED_LIBADD="-liberty -lintl -lcygwin -lkernel32" ;; - # Hack to build or1k-src on OSX - or1k*-*-darwin*) + # Use built-in libintl on macOS, since it is not provided by libc. + *-*-darwin*) - SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl" + SHARED_LIBADD="-liberty -lintl" ;; esac diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am -index 925e7ff651..47b395c195 100644 +index 4f06074a..6836c589 100644 --- a/opcodes/Makefile.am +++ b/opcodes/Makefile.am -@@ -52,7 +52,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir) +@@ -51,7 +51,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir) endif # This is where bfd.h lives. @@ -61,7 +50,7 @@ index 925e7ff651..47b395c195 100644 BUILD_LIBS = @BUILD_LIBS@ BUILD_LIB_DEPS = @BUILD_LIB_DEPS@ -@@ -303,7 +303,7 @@ OFILES = @BFD_MACHINES@ +@@ -301,7 +301,7 @@ OFILES = @BFD_MACHINES@ # development.sh is used to determine -Werror default. CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh @@ -70,7 +59,7 @@ index 925e7ff651..47b395c195 100644 disassemble.lo: disassemble.c if am__fastdepCC -@@ -324,12 +324,21 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c +@@ -322,12 +322,21 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c # old version of libbfd, or to pick up libbfd for the wrong architecture # if host != build. So for building with shared libraries we use a # hardcoded path to libbfd.so instead of relying on the entries in libbfd.la. @@ -95,10 +84,10 @@ index 925e7ff651..47b395c195 100644 # the build directory so that we don't have to convert all the # programs that use libopcodes.a simultaneously. This is a hack which diff --git a/opcodes/configure.ac b/opcodes/configure.ac -index b9f5eb8a4f..ef2c2152b7 100644 +index 00be9c88..6e589ae4 100644 --- a/opcodes/configure.ac +++ b/opcodes/configure.ac -@@ -89,6 +89,7 @@ AC_PROG_INSTALL +@@ -86,6 +86,7 @@ AC_PROG_INSTALL AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h) ACX_HEADER_STRING @@ -106,7 +95,7 @@ index b9f5eb8a4f..ef2c2152b7 100644 AC_CHECK_DECLS([basename, stpcpy]) -@@ -134,61 +135,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, +@@ -137,61 +138,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, LT_LIB_M @@ -173,6 +162,3 @@ index b9f5eb8a4f..ef2c2152b7 100644 ;; esac --- -2.14.2 - From c3c3f68020af668e0c9ce3c93077e5f1fcafc87b Mon Sep 17 00:00:00 2001 From: Dave Nicponski Date: Wed, 22 Apr 2020 18:58:45 -0400 Subject: [PATCH 47/72] xcbuild: add compatibility support for exporting sdk info "Real" xcodebuild allows using `xcodebuild -version -sdk` without an sdk version argument, which will dump sdk info for all the installed sdks. Bazel"s "xcode cc toolchain setup on mac" process uses this to determine which SDK version is actually installed. This change allows using a nix-supplied pinned compiler and build system under bazel. --- pkgs/development/tools/xcbuild/wrapper.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/tools/xcbuild/wrapper.nix b/pkgs/development/tools/xcbuild/wrapper.nix index cd7b8616366..861ef0fc847 100644 --- a/pkgs/development/tools/xcbuild/wrapper.nix +++ b/pkgs/development/tools/xcbuild/wrapper.nix @@ -110,11 +110,15 @@ runCommand "xcodebuild-${xcbuild.version}" { mkdir -p $out/Applications/Xcode.app/Contents ln -s $out $out/Applications/Xcode.app/Contents/Developer + # The native xcodebuild command supports an invocation like "xcodebuild -version -sdk" without specifying the specific SDK, so we simulate this by + # detecting this case and simulating the output; printing the header and appending the normal output via appending the sdk version to the positional + # arguments we pass through to the wrapped xcodebuild. makeWrapper ${xcbuild}/bin/xcodebuild $out/bin/xcodebuild \ --add-flags "-xcconfig ${xcconfig}" \ --add-flags "DERIVED_DATA_DIR=." \ --set DEVELOPER_DIR "$out" \ --set SDKROOT ${sdkName} \ + --run '[ "$#" -eq 2 ] && [ "$1" = "-version" ] && [ "$2" = "-sdk" ] && echo ${sdkName}.sdk - macOS ${sdkVer} \(macosx${sdkVer}\) && set -- "$@" "${sdkName}"' \ --run '[ "$1" = "-version" ] && [ "$#" -eq 1 ] && (echo Xcode ${xcodeVer}; echo Build version ${sdkBuildVersion}) && exit 0' \ --run '[ "$1" = "-license" ] && exit 0' From 38b084f621b51c721341331ae13e321010d8eebb Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 28 Apr 2020 22:51:22 -0400 Subject: [PATCH 48/72] meson: Fix cross The old `CC=.. CXX= .. meson ...` env var hack I removed in 3c00ca03a251693e58eb4e3c247ee1f640215783 had a side effect of ensuring that Meson always had access to a native C compiler, which unforunately it expects in most cases. Thankfully, that will be fixed soon. --- pkgs/development/tools/build-managers/meson/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index 3809d19e7d0..0eae4215d46 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -3,6 +3,7 @@ , stdenv , writeTextDir , substituteAll +, pkgsHostHost }: python3Packages.buildPythonApplication rec { @@ -58,6 +59,10 @@ python3Packages.buildPythonApplication rec { setupHook = ./setup-hook.sh; + # Ensure there will always be a native C compiler when meson is used, as a + # workaround until https://github.com/mesonbuild/meson/pull/6512 lands. + depsHostHostPropagated = [ pkgsHostHost.stdenv.cc ]; + # 0.45 update enabled tests but they are failing doCheck = false; # checkInputs = [ ninja pkgconfig ]; From 05d26adb0ad90ec17ad38a0ed638e9be33cbc7c7 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 28 Apr 2020 22:55:37 -0400 Subject: [PATCH 49/72] mkDerivation mesonFlags: Fix arm cpu families In my haste to unbreak eval, I screwed up and got the bit-widths, backwards. --- pkgs/stdenv/generic/make-derivation.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index b06541a7e41..09879451d8e 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -257,8 +257,8 @@ in rec { mesonFlags = if mesonFlags == null then null else let # See https://mesonbuild.com/Reference-tables.html#cpu-families cpuFamily = platform: with platform; - /**/ if isAarch64 then "arm" - else if isAarch32 then "aarch64" + /**/ if isAarch32 then "arm" + else if isAarch64 then "aarch64" else if isx86_32 then "x86" else if isx86_64 then "x86_64" else platform.parsed.cpu.family + builtins.toString platform.parsed.cpu.bits; From 6fc9fd53dba25f61a6493e7c0d8fef5eca9c51bf Mon Sep 17 00:00:00 2001 From: Luka Blaskovic Date: Wed, 29 Apr 2020 03:34:41 +0000 Subject: [PATCH 50/72] linux config: enable Sound Open Firmware support --- .../linux/kernel/common-config.nix | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index 0a58ed87e6c..088ec4ebf44 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -254,6 +254,27 @@ let SND_USB_CAIAQ_INPUT = yes; # Enable PSS mixer (Beethoven ADSP-16 and other compatible) PSS_MIXER = whenOlder "4.12" yes; + # Enable Sound Open Firmware support + } // optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux" && + versionAtLeast version "5.5") { + SND_SOC_SOF_TOPLEVEL = yes; + SND_SOC_SOF_ACPI = module; + SND_SOC_SOF_PCI = module; + SND_SOC_SOF_APOLLOLAKE_SUPPORT = yes; + SND_SOC_SOF_CANNONLAKE_SUPPORT = yes; + SND_SOC_SOF_COFFEELAKE_SUPPORT = yes; + SND_SOC_SOF_COMETLAKE_H_SUPPORT = yes; + SND_SOC_SOF_COMETLAKE_LP_SUPPORT = yes; + SND_SOC_SOF_ELKHARTLAKE_SUPPORT = yes; + SND_SOC_SOF_GEMINILAKE_SUPPORT = yes; + SND_SOC_SOF_HDA_AUDIO_CODEC = yes; + SND_SOC_SOF_HDA_COMMON_HDMI_CODEC = yes; + SND_SOC_SOF_HDA_LINK = yes; + SND_SOC_SOF_ICELAKE_SUPPORT = yes; + SND_SOC_SOF_INTEL_TOPLEVEL = yes; + SND_SOC_SOF_JASPERLAKE_SUPPORT = yes; + SND_SOC_SOF_MERRIFIELD_SUPPORT = yes; + SND_SOC_SOF_TIGERLAKE_SUPPORT = yes; }; usb-serial = { From d518884d3899c99ce8289bd13d7123e4db305e05 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 29 Apr 2020 14:37:52 +0200 Subject: [PATCH 51/72] =?UTF-8?q?gtk3:=203.24.18=20=E2=86=92=203.24.20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://gitlab.gnome.org/GNOME/gtk/blob/db39ce2b1699acaf5d0ba160cf7cc68ccf6e16d6/NEWS#L1-38 Also switch to a merged pkg-config patch and add a patch comment. --- pkgs/development/libraries/gtk/3.x.nix | 18 ++++++++--- ...build-Fix-path-handling-in-pkgconfig.patch | 30 ------------------- 2 files changed, 14 insertions(+), 34 deletions(-) delete mode 100644 pkgs/development/libraries/gtk/patches/01-build-Fix-path-handling-in-pkgconfig.patch diff --git a/pkgs/development/libraries/gtk/3.x.nix b/pkgs/development/libraries/gtk/3.x.nix index a3fe432017c..1e618730cd8 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.18"; + version = "3.24.20"; 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 = "1lia2ybd1661j6mvrc00iyd50gm7sy157bdzlyf4mr028rzzzspm"; + sha256 = "Laxp9xbo0EunqVCRWJ4rquyV3KzpMssVg5Fj20ebHfM="; }; patches = [ @@ -71,12 +71,17 @@ stdenv.mkDerivation rec { sha256 = "0g6fhqcv8spfy3mfmxpyji93k8d4p4q4fz1v9a1c1cgcwkz41d7p"; }) - # https://gitlab.gnome.org/GNOME/gtk/merge_requests/1002 - ./patches/01-build-Fix-path-handling-in-pkgconfig.patch + # Fix path handling in pkg-config + # https://gitlab.gnome.org/GNOME/gtk/merge_requests/1793 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gtk/commit/6d9db8610eff8c12d594d53b7813d9eea1247801.patch"; + sha256 = "QHseZWgPlZBDEM2dIVixUJkGZMCaYjahkLmSCqCcoWU="; + }) ] ++ optionals stdenv.isDarwin [ # X11 module requires which is not installed on Darwin # let’s drop that dependency in similar way to how other parts of the library do it # e.g. https://gitlab.gnome.org/GNOME/gtk/blob/3.24.4/gtk/gtk-launch.c#L31-33 + # https://gitlab.gnome.org/GNOME/gtk/merge_requests/536 ./patches/3.0-darwin-x11.patch ]; @@ -92,6 +97,11 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-DG_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"; postPatch = '' + # TODO: Remove in 3.24.21 + # https://gitlab.gnome.org/GNOME/gtk/issues/2669 + echo "${stdenv.shell}" > check-version.py + chmod +x check-version.py + files=( build-aux/meson/post-install.py demos/gtk-demo/geninclude.py diff --git a/pkgs/development/libraries/gtk/patches/01-build-Fix-path-handling-in-pkgconfig.patch b/pkgs/development/libraries/gtk/patches/01-build-Fix-path-handling-in-pkgconfig.patch deleted file mode 100644 index ec69a12514f..00000000000 --- a/pkgs/development/libraries/gtk/patches/01-build-Fix-path-handling-in-pkgconfig.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7b692e618c4183a51af3d3b0037f106c4fec2355 Mon Sep 17 00:00:00 2001 -From: worldofpeace -Date: Fri, 19 Jul 2019 13:32:57 -0400 -Subject: [PATCH] build: Fix path handling in pkgconfig - ---- - meson.build | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/meson.build b/meson.build -index 36913b3f04..161b378ba5 100644 ---- a/meson.build -+++ b/meson.build -@@ -834,10 +834,10 @@ configure_file(input: 'config.h.meson', - # pkg-config files - bit of a mess all of this - pkgconf = configuration_data() - --pkgconf.set('prefix', get_option('prefix')) -+pkgconf.set('prefix', gtk_prefix) - pkgconf.set('exec_prefix', '${prefix}') --pkgconf.set('libdir', '${prefix}/@0@'.format(get_option('libdir'))) --pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir'))) -+pkgconf.set('libdir', gtk_libdir) -+pkgconf.set('includedir', join_paths('${prefix}', gtk_includedir)) - pkgconf.set('GTK_API_VERSION', gtk_api_version) - pkgconf.set('VERSION', meson.project_version()) - pkgconf.set('GTK_BINARY_VERSION', gtk_binary_version) --- -2.22.0 - From ff76d777fb99d7829c65da6037c70352843ed0a7 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 29 Apr 2020 15:48:24 +0200 Subject: [PATCH 52/72] Revert "binutils: 2.33.1 -> 2.34" This reverts commit c5f602f5b764ac6ee8e1e0c1b1b3ead88c381da7. --- ...OPERTY_X86_ISA_1_USED-note-if-needed.patch | 517 ++++++++++++++++ ...operly-add-X86_ISA_1_NEEDED-property.patch | 137 ++++ ...ly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch | 583 ++++++++++++++++++ .../tools/misc/binutils/default.nix | 16 +- .../binutils/gold-symbol-visibility.patch | 79 +++ 5 files changed, 1326 insertions(+), 6 deletions(-) create mode 100644 pkgs/development/tools/misc/binutils/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch create mode 100644 pkgs/development/tools/misc/binutils/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch create mode 100644 pkgs/development/tools/misc/binutils/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch create mode 100644 pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch diff --git a/pkgs/development/tools/misc/binutils/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch b/pkgs/development/tools/misc/binutils/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch new file mode 100644 index 00000000000..5a047b0f070 --- /dev/null +++ b/pkgs/development/tools/misc/binutils/0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch @@ -0,0 +1,517 @@ +From 6737a6b34f4823deb7142f27b4074831a37ac1e1 Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Fri, 20 Jul 2018 09:18:47 -0700 +Subject: [PATCH] x86: Add a GNU_PROPERTY_X86_ISA_1_USED note if needed + +When -z separate-code, which is enabled by default for Linux/x86, is +used to create executable, ld won't place any data in the code-only +PT_LOAD segment. If there are no data sections placed before the +code-only PT_LOAD segment, the program headers won't be mapped into +any PT_LOAD segment. When the executable tries to access it (based +on the program header address passed in AT_PHDR), it will lead to +segfault. This patch inserts a GNU_PROPERTY_X86_ISA_1_USED note if +there may be no data sections before the text section so that the +first PT_LOAD segment won't be code-only and will contain the program +header. + +Testcases are adjusted to either pass "-z noseparate-code" to ld or +discard the .note.gnu.property section. A Linux/x86 run-time test is +added. + +bfd/ + + PR ld/23428 + * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): If the + separate code program header is needed, make sure that the first + read-only PT_LOAD segment has no code by adding a + GNU_PROPERTY_X86_ISA_1_USED note. + +ld/ + + PR ld/23428 + * testsuite/ld-elf/linux-x86.S: New file. + * testsuite/ld-elf/linux-x86.exp: Likewise. + * testsuite/ld-elf/pr23428.c: Likewise. + * testsuite/ld-elf/sec64k.exp: Pass "-z noseparate-code" to ld + for Linux/x86 targets. + * testsuite/ld-i386/abs-iamcu.d: Likewise. + * testsuite/ld-i386/abs.d: Likewise. + * testsuite/ld-i386/pr12718.d: Likewise. + * testsuite/ld-i386/pr12921.d: Likewise. + * testsuite/ld-x86-64/abs-k1om.d: Likewise. + * testsuite/ld-x86-64/abs-l1om.d: Likewise. + * testsuite/ld-x86-64/abs.d: Likewise. + * testsuite/ld-x86-64/pr12718.d: Likewise. + * testsuite/ld-x86-64/pr12921.d: Likewise. + * testsuite/ld-linkonce/zeroeh.ld: Discard .note.gnu.property + section. + * testsuite/ld-scripts/print-memory-usage.t: Likewise. + * testsuite/ld-scripts/size-2.t: Likewise. + * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Use ld + to create executable if language is "asm". + +(cherry picked from commit 241e64e3b42cd9eba514b8e0ad2ef39a337f10a5) +--- + bfd/elfxx-x86.c | 60 ++++++++++++++----- + ld/testsuite/ld-elf/linux-x86.S | 63 ++++++++++++++++++++ + ld/testsuite/ld-elf/linux-x86.exp | 46 ++++++++++++++ + ld/testsuite/ld-elf/pr23428.c | 43 +++++++++++++ + ld/testsuite/ld-elf/sec64k.exp | 2 + + ld/testsuite/ld-i386/abs-iamcu.d | 2 +- + ld/testsuite/ld-i386/abs.d | 2 +- + ld/testsuite/ld-i386/pr12718.d | 2 +- + ld/testsuite/ld-i386/pr12921.d | 2 +- + ld/testsuite/ld-linkonce/zeroeh.ld | 1 + + ld/testsuite/ld-scripts/print-memory-usage.t | 2 + + ld/testsuite/ld-scripts/size-2.t | 1 + + ld/testsuite/ld-x86-64/abs-k1om.d | 2 +- + ld/testsuite/ld-x86-64/abs-l1om.d | 2 +- + ld/testsuite/ld-x86-64/abs.d | 2 +- + ld/testsuite/ld-x86-64/pr12718.d | 2 +- + ld/testsuite/ld-x86-64/pr12921.d | 2 +- + ld/testsuite/lib/ld-lib.exp | 5 +- + 20 files changed, 248 insertions(+), 25 deletions(-) + create mode 100644 ld/testsuite/ld-elf/linux-x86.S + create mode 100644 ld/testsuite/ld-elf/linux-x86.exp + create mode 100644 ld/testsuite/ld-elf/pr23428.c + +diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c +index a2497aab86..2e4ff88f1f 100644 +--- a/bfd/elfxx-x86.c ++++ b/bfd/elfxx-x86.c +@@ -2524,6 +2524,7 @@ _bfd_x86_elf_link_setup_gnu_properties + const struct elf_backend_data *bed; + unsigned int class_align = ABI_64_P (info->output_bfd) ? 3 : 2; + unsigned int got_align; ++ bfd_boolean has_text = FALSE; + + features = 0; + if (info->ibt) +@@ -2538,24 +2539,59 @@ _bfd_x86_elf_link_setup_gnu_properties + if (bfd_get_flavour (pbfd) == bfd_target_elf_flavour + && bfd_count_sections (pbfd) != 0) + { ++ if (!has_text) ++ { ++ /* Check if there is no non-empty text section. */ ++ sec = bfd_get_section_by_name (pbfd, ".text"); ++ if (sec != NULL && sec->size != 0) ++ has_text = TRUE; ++ } ++ + ebfd = pbfd; + + if (elf_properties (pbfd) != NULL) + break; + } + +- if (ebfd != NULL && features) ++ bed = get_elf_backend_data (info->output_bfd); ++ ++ htab = elf_x86_hash_table (info, bed->target_id); ++ if (htab == NULL) ++ return pbfd; ++ ++ if (ebfd != NULL) + { +- /* If features is set, add GNU_PROPERTY_X86_FEATURE_1_IBT and +- GNU_PROPERTY_X86_FEATURE_1_SHSTK. */ +- prop = _bfd_elf_get_property (ebfd, +- GNU_PROPERTY_X86_FEATURE_1_AND, +- 4); +- prop->u.number |= features; +- prop->pr_kind = property_number; ++ prop = NULL; ++ if (features) ++ { ++ /* If features is set, add GNU_PROPERTY_X86_FEATURE_1_IBT and ++ GNU_PROPERTY_X86_FEATURE_1_SHSTK. */ ++ prop = _bfd_elf_get_property (ebfd, ++ GNU_PROPERTY_X86_FEATURE_1_AND, ++ 4); ++ prop->u.number |= features; ++ prop->pr_kind = property_number; ++ } ++ else if (has_text ++ && elf_properties (ebfd) == NULL ++ && elf_tdata (info->output_bfd)->o->build_id.sec == NULL ++ && !htab->elf.dynamic_sections_created ++ && !info->traditional_format ++ && (info->output_bfd->flags & D_PAGED) != 0 ++ && info->separate_code) ++ { ++ /* If the separate code program header is needed, make sure ++ that the first read-only PT_LOAD segment has no code by ++ adding a GNU_PROPERTY_X86_ISA_1_USED note. */ ++ prop = _bfd_elf_get_property (ebfd, ++ GNU_PROPERTY_X86_ISA_1_USED, ++ 4); ++ prop->u.number = GNU_PROPERTY_X86_ISA_1_486; ++ prop->pr_kind = property_number; ++ } + + /* Create the GNU property note section if needed. */ +- if (pbfd == NULL) ++ if (prop != NULL && pbfd == NULL) + { + sec = bfd_make_section_with_flags (ebfd, + NOTE_GNU_PROPERTY_SECTION_NAME, +@@ -2581,12 +2617,6 @@ error_alignment: + + pbfd = _bfd_elf_link_setup_gnu_properties (info); + +- bed = get_elf_backend_data (info->output_bfd); +- +- htab = elf_x86_hash_table (info, bed->target_id); +- if (htab == NULL) +- return pbfd; +- + htab->r_info = init_table->r_info; + htab->r_sym = init_table->r_sym; + +diff --git a/ld/testsuite/ld-elf/linux-x86.S b/ld/testsuite/ld-elf/linux-x86.S +new file mode 100644 +index 0000000000..bdf40c6e01 +--- /dev/null ++++ b/ld/testsuite/ld-elf/linux-x86.S +@@ -0,0 +1,63 @@ ++ .text ++ .globl _start ++ .type _start,@function ++ .p2align 4 ++_start: ++ xorl %ebp, %ebp ++#ifdef __LP64__ ++ popq %rdi ++ movq %rsp, %rsi ++ andq $~15, %rsp ++#elif defined __x86_64__ ++ mov (%rsp),%edi ++ addl $4,%esp ++ movl %esp, %esi ++ andl $~15, %esp ++#else ++ popl %esi ++ movl %esp, %ecx ++ andl $~15, %esp ++ ++ subl $8,%esp ++ pushl %ecx ++ pushl %esi ++#endif ++ ++ call main ++ ++ hlt ++ ++ .type syscall, @function ++ .globl syscall ++ .p2align 4 ++syscall: ++#ifdef __x86_64__ ++ movq %rdi, %rax /* Syscall number -> rax. */ ++ movq %rsi, %rdi /* shift arg1 - arg5. */ ++ movq %rdx, %rsi ++ movq %rcx, %rdx ++ movq %r8, %r10 ++ movq %r9, %r8 ++ movq 8(%rsp),%r9 /* arg6 is on the stack. */ ++ syscall /* Do the system call. */ ++#else ++ push %ebp ++ push %edi ++ push %esi ++ push %ebx ++ mov 0x2c(%esp),%ebp ++ mov 0x28(%esp),%edi ++ mov 0x24(%esp),%esi ++ mov 0x20(%esp),%edx ++ mov 0x1c(%esp),%ecx ++ mov 0x18(%esp),%ebx ++ mov 0x14(%esp),%eax ++ int $0x80 ++ pop %ebx ++ pop %esi ++ pop %edi ++ pop %ebp ++#endif ++ ret /* Return to caller. */ ++ .size syscall, .-syscall ++ .section .note.GNU-stack,"",@progbits +diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp +new file mode 100644 +index 0000000000..36217c6fb4 +--- /dev/null ++++ b/ld/testsuite/ld-elf/linux-x86.exp +@@ -0,0 +1,46 @@ ++# Expect script for simple native Linux/x86 tests. ++# Copyright (C) 2018 Free Software Foundation, Inc. ++# ++# This file is part of the GNU Binutils. ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, ++# MA 02110-1301, USA. ++# ++ ++# Test very simple native Linux/x86 programs with linux-x86.S. ++if { ![isnative] || [which $CC] == 0 \ ++ || (![istarget "i?86-*-linux*"] \ ++ && ![istarget "x86_64-*-linux*"] \ ++ && ![istarget "amd64-*-linux*"]) } { ++ return ++} ++ ++# Add $PLT_CFLAGS if PLT is expected. ++global PLT_CFLAGS ++# Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required. ++global NOPIE_CFLAGS NOPIE_LDFLAGS ++ ++run_ld_link_exec_tests [list \ ++ [list \ ++ "Run PR ld/23428 test" \ ++ "--no-dynamic-linker -z separate-code" \ ++ "" \ ++ { linux-x86.S pr23428.c } \ ++ "pr23428" \ ++ "pass.out" \ ++ "$NOPIE_CFLAGS -fno-asynchronous-unwind-tables" \ ++ "asm" \ ++ ] \ ++] +diff --git a/ld/testsuite/ld-elf/pr23428.c b/ld/testsuite/ld-elf/pr23428.c +new file mode 100644 +index 0000000000..3631ed7926 +--- /dev/null ++++ b/ld/testsuite/ld-elf/pr23428.c +@@ -0,0 +1,43 @@ ++#include ++#include ++#include ++ ++#define STRING_COMMA_LEN(STR) (STR), (sizeof (STR) - 1) ++ ++int ++main (int argc, char **argv) ++{ ++ char **ev = &argv[argc + 1]; ++ char **evp = ev; ++ ElfW(auxv_t) *av; ++ const ElfW(Phdr) *phdr = NULL; ++ size_t phnum = 0; ++ size_t loadnum = 0; ++ int fd = STDOUT_FILENO; ++ size_t i; ++ ++ while (*evp++ != NULL) ++ ; ++ ++ av = (ElfW(auxv_t) *) evp; ++ ++ for (; av->a_type != AT_NULL; ++av) ++ switch (av->a_type) ++ { ++ case AT_PHDR: ++ phdr = (const void *) av->a_un.a_val; ++ break; ++ case AT_PHNUM: ++ phnum = av->a_un.a_val; ++ break; ++ } ++ ++ for (i = 0; i < phnum; i++, phdr++) ++ if (phdr->p_type == PT_LOAD) ++ loadnum++; ++ ++ syscall (SYS_write, fd, STRING_COMMA_LEN ("PASS\n")); ++ ++ syscall (SYS_exit, !loadnum); ++ return 0; ++} +diff --git a/ld/testsuite/ld-elf/sec64k.exp b/ld/testsuite/ld-elf/sec64k.exp +index b58139e9dd..3909c0eaa1 100644 +--- a/ld/testsuite/ld-elf/sec64k.exp ++++ b/ld/testsuite/ld-elf/sec64k.exp +@@ -177,6 +177,8 @@ if { ![istarget "d10v-*-*"] + foreach sfile $sfiles { puts $ofd "#source: $sfile" } + if { [istarget spu*-*-*] } { + puts $ofd "#ld: --local-store 0:0" ++ } elseif { [istarget "i?86-*-linux*"] || [istarget "x86_64-*-linux*"] } { ++ puts $ofd "#ld: -z noseparate-code" + } else { + puts $ofd "#ld:" + } +diff --git a/ld/testsuite/ld-i386/abs-iamcu.d b/ld/testsuite/ld-i386/abs-iamcu.d +index ac9beff2e5..aba7d6b03f 100644 +--- a/ld/testsuite/ld-i386/abs-iamcu.d ++++ b/ld/testsuite/ld-i386/abs-iamcu.d +@@ -2,7 +2,7 @@ + #source: abs.s + #source: zero.s + #as: --32 -march=iamcu +-#ld: -m elf_iamcu ++#ld: -m elf_iamcu -z noseparate-code + #objdump: -rs -j .text + + .*: file format .* +diff --git a/ld/testsuite/ld-i386/abs.d b/ld/testsuite/ld-i386/abs.d +index e660aca524..191ee4456a 100644 +--- a/ld/testsuite/ld-i386/abs.d ++++ b/ld/testsuite/ld-i386/abs.d +@@ -2,7 +2,7 @@ + #as: --32 + #source: abs.s + #source: zero.s +-#ld: -melf_i386 ++#ld: -melf_i386 -z noseparate-code + #objdump: -rs + + .*: file format .* +diff --git a/ld/testsuite/ld-i386/pr12718.d b/ld/testsuite/ld-i386/pr12718.d +index ec51540a42..7eba52d95e 100644 +--- a/ld/testsuite/ld-i386/pr12718.d ++++ b/ld/testsuite/ld-i386/pr12718.d +@@ -1,6 +1,6 @@ + #name: PR ld/12718 + #as: --32 +-#ld: -melf_i386 ++#ld: -melf_i386 -z noseparate-code + #readelf: -S + + There are 5 section headers, starting at offset 0x[0-9a-f]+: +diff --git a/ld/testsuite/ld-i386/pr12921.d b/ld/testsuite/ld-i386/pr12921.d +index e49079b3c8..ea2da3eb51 100644 +--- a/ld/testsuite/ld-i386/pr12921.d ++++ b/ld/testsuite/ld-i386/pr12921.d +@@ -1,6 +1,6 @@ + #name: PR ld/12921 + #as: --32 +-#ld: -melf_i386 ++#ld: -melf_i386 -z noseparate-code + #readelf: -S --wide + + There are 7 section headers, starting at offset 0x[0-9a-f]+: +diff --git a/ld/testsuite/ld-linkonce/zeroeh.ld b/ld/testsuite/ld-linkonce/zeroeh.ld +index b22eaa12c9..f89855a08f 100644 +--- a/ld/testsuite/ld-linkonce/zeroeh.ld ++++ b/ld/testsuite/ld-linkonce/zeroeh.ld +@@ -2,4 +2,5 @@ SECTIONS { + .text 0xa00 : { *(.text); *(.gnu.linkonce.t.*) } + .gcc_except_table 0x2000 : { *(.gcc_except_table) } + .eh_frame 0x4000 : { *(.eh_frame) } ++ /DISCARD/ : { *(.note.gnu.property) } + } +diff --git a/ld/testsuite/ld-scripts/print-memory-usage.t b/ld/testsuite/ld-scripts/print-memory-usage.t +index 5ff057a5e3..6eda1d2dc4 100644 +--- a/ld/testsuite/ld-scripts/print-memory-usage.t ++++ b/ld/testsuite/ld-scripts/print-memory-usage.t +@@ -11,4 +11,6 @@ SECTIONS + *(.data) + *(.rw) + } ++ ++ /DISCARD/ : { *(.note.gnu.property) } + } +diff --git a/ld/testsuite/ld-scripts/size-2.t b/ld/testsuite/ld-scripts/size-2.t +index 723863995e..c3c4eddab4 100644 +--- a/ld/testsuite/ld-scripts/size-2.t ++++ b/ld/testsuite/ld-scripts/size-2.t +@@ -18,4 +18,5 @@ SECTIONS + LONG (SIZEOF (.tdata)) + LONG (SIZEOF (.tbss)) + } :image ++ /DISCARD/ : { *(.note.gnu.property) } + } +diff --git a/ld/testsuite/ld-x86-64/abs-k1om.d b/ld/testsuite/ld-x86-64/abs-k1om.d +index 2c26639fc0..6b0fde0eed 100644 +--- a/ld/testsuite/ld-x86-64/abs-k1om.d ++++ b/ld/testsuite/ld-x86-64/abs-k1om.d +@@ -2,7 +2,7 @@ + #source: ../ld-i386/abs.s + #source: ../ld-i386/zero.s + #as: --64 -march=k1om +-#ld: -m elf_k1om ++#ld: -m elf_k1om -z noseparate-code + #objdump: -rs -j .text + + .*: file format .* +diff --git a/ld/testsuite/ld-x86-64/abs-l1om.d b/ld/testsuite/ld-x86-64/abs-l1om.d +index 1fb96d44b7..f87869f9d0 100644 +--- a/ld/testsuite/ld-x86-64/abs-l1om.d ++++ b/ld/testsuite/ld-x86-64/abs-l1om.d +@@ -2,7 +2,7 @@ + #source: ../ld-i386/abs.s + #source: ../ld-i386/zero.s + #as: --64 -march=l1om +-#ld: -m elf_l1om ++#ld: -m elf_l1om -z noseparate-code + #objdump: -rs -j .text + #target: x86_64-*-linux* + +diff --git a/ld/testsuite/ld-x86-64/abs.d b/ld/testsuite/ld-x86-64/abs.d +index b24b018639..d99ab4685d 100644 +--- a/ld/testsuite/ld-x86-64/abs.d ++++ b/ld/testsuite/ld-x86-64/abs.d +@@ -1,7 +1,7 @@ + #name: Absolute non-overflowing relocs + #source: ../ld-i386/abs.s + #source: ../ld-i386/zero.s +-#ld: ++#ld: -z noseparate-code + #objdump: -rs + + .*: file format .* +diff --git a/ld/testsuite/ld-x86-64/pr12718.d b/ld/testsuite/ld-x86-64/pr12718.d +index 07d17325d0..2c503ffbaa 100644 +--- a/ld/testsuite/ld-x86-64/pr12718.d ++++ b/ld/testsuite/ld-x86-64/pr12718.d +@@ -1,6 +1,6 @@ + #name: PR ld/12718 + #as: --64 +-#ld: -melf_x86_64 ++#ld: -melf_x86_64 -z noseparate-code + #readelf: -S --wide + + There are 5 section headers, starting at offset 0x[0-9a-f]+: +diff --git a/ld/testsuite/ld-x86-64/pr12921.d b/ld/testsuite/ld-x86-64/pr12921.d +index 6fe6abee09..1162d55818 100644 +--- a/ld/testsuite/ld-x86-64/pr12921.d ++++ b/ld/testsuite/ld-x86-64/pr12921.d +@@ -1,6 +1,6 @@ + #name: PR ld/12921 + #as: --64 +-#ld: -melf_x86_64 ++#ld: -melf_x86_64 -z noseparate-code + #readelf: -S --wide + + There are 7 section headers, starting at offset 0x[0-9a-f]+: +diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp +index cfbefe9028..1095091882 100644 +--- a/ld/testsuite/lib/ld-lib.exp ++++ b/ld/testsuite/lib/ld-lib.exp +@@ -1482,7 +1482,10 @@ proc run_ld_link_exec_tests { ldtests args } { + continue + } + +- if { [ string match "c++" $lang ] } { ++ if { [ string match "asm" $lang ] } { ++ set link_proc ld_link ++ set link_cmd $ld ++ } elseif { [ string match "c++" $lang ] } { + set link_proc ld_link + set link_cmd $CXX + } else { +-- +2.20.1 + diff --git a/pkgs/development/tools/misc/binutils/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch b/pkgs/development/tools/misc/binutils/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch new file mode 100644 index 00000000000..ca50d9a57cd --- /dev/null +++ b/pkgs/development/tools/misc/binutils/0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch @@ -0,0 +1,137 @@ +From 28a27bdbb9500797e6767f80c8128b09112aeed5 Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Sat, 11 Aug 2018 06:41:33 -0700 +Subject: [PATCH] x86: Properly add X86_ISA_1_NEEDED property + +Existing properties may be removed during property merging. We avoid +adding X86_ISA_1_NEEDED property only if existing properties won't be +removed. + +bfd/ + + PR ld/23428 + * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't + add X86_ISA_1_NEEDED property only if existing properties won't + be removed. + +ld/ + + PR ld/23428 + * testsuite/ld-elf/dummy.s: New file. + * testsuite/ld-elf/linux-x86.S: Add X86_FEATURE_1_AND property. + * testsuite/ld-elf/linux-x86.exp: Add dummy.s to pr23428. + +(cherry picked from commit ab9e342807d132182892de1be1a92d6e91a5c1da) +--- + bfd/elfxx-x86.c | 28 ++++++++++++++++++++++------ + ld/testsuite/ld-elf/dummy.s | 1 + + ld/testsuite/ld-elf/linux-x86.S | 28 ++++++++++++++++++++++++++++ + ld/testsuite/ld-elf/linux-x86.exp | 2 +- + 6 files changed, 66 insertions(+), 7 deletions(-) + create mode 100644 ld/testsuite/ld-elf/dummy.s + +diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c +index 7ccfd25815..2d8f7b640b 100644 +--- a/bfd/elfxx-x86.c ++++ b/bfd/elfxx-x86.c +@@ -2588,7 +2588,6 @@ _bfd_x86_elf_link_setup_gnu_properties + prop->pr_kind = property_number; + } + else if (has_text +- && elf_properties (ebfd) == NULL + && elf_tdata (info->output_bfd)->o->build_id.sec == NULL + && !htab->elf.dynamic_sections_created + && !info->traditional_format +@@ -2598,11 +2597,28 @@ _bfd_x86_elf_link_setup_gnu_properties + /* If the separate code program header is needed, make sure + that the first read-only PT_LOAD segment has no code by + adding a GNU_PROPERTY_X86_ISA_1_NEEDED note. */ +- prop = _bfd_elf_get_property (ebfd, +- GNU_PROPERTY_X86_ISA_1_NEEDED, +- 4); +- prop->u.number = GNU_PROPERTY_X86_ISA_1_486; +- prop->pr_kind = property_number; ++ elf_property_list *list; ++ bfd_boolean need_property = TRUE; ++ ++ for (list = elf_properties (ebfd); list; list = list->next) ++ switch (list->property.pr_type) ++ { ++ case GNU_PROPERTY_STACK_SIZE: ++ case GNU_PROPERTY_NO_COPY_ON_PROTECTED: ++ case GNU_PROPERTY_X86_ISA_1_NEEDED: ++ /* These properties won't be removed during merging. */ ++ need_property = FALSE; ++ break; ++ } ++ ++ if (need_property) ++ { ++ prop = _bfd_elf_get_property (ebfd, ++ GNU_PROPERTY_X86_ISA_1_NEEDED, ++ 4); ++ prop->u.number = GNU_PROPERTY_X86_ISA_1_486; ++ prop->pr_kind = property_number; ++ } + } + + /* Create the GNU property note section if needed. */ +diff --git a/ld/testsuite/ld-elf/dummy.s b/ld/testsuite/ld-elf/dummy.s +new file mode 100644 +index 0000000000..403f98000d +--- /dev/null ++++ b/ld/testsuite/ld-elf/dummy.s +@@ -0,0 +1 @@ ++# Dummy +diff --git a/ld/testsuite/ld-elf/linux-x86.S b/ld/testsuite/ld-elf/linux-x86.S +index bdf40c6e01..d94abc1106 100644 +--- a/ld/testsuite/ld-elf/linux-x86.S ++++ b/ld/testsuite/ld-elf/linux-x86.S +@@ -61,3 +61,31 @@ syscall: + ret /* Return to caller. */ + .size syscall, .-syscall + .section .note.GNU-stack,"",@progbits ++ ++ .section ".note.gnu.property", "a" ++#ifdef __LP64__ ++ .p2align 3 ++#else ++ .p2align 2 ++#endif ++ .long 1f - 0f /* name length */ ++ .long 5f - 2f /* data length */ ++ .long 5 /* note type */ ++0: .asciz "GNU" /* vendor name */ ++1: ++#ifdef __LP64__ ++ .p2align 3 ++#else ++ .p2align 2 ++#endif ++2: .long 0xc0000002 /* pr_type. */ ++ .long 4f - 3f /* pr_datasz. */ ++3: ++ .long 0x2 ++4: ++#ifdef __LP64__ ++ .p2align 3 ++#else ++ .p2align 2 ++#endif ++5: +diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp +index 36217c6fb4..f6f5a80853 100644 +--- a/ld/testsuite/ld-elf/linux-x86.exp ++++ b/ld/testsuite/ld-elf/linux-x86.exp +@@ -37,7 +37,7 @@ run_ld_link_exec_tests [list \ + "Run PR ld/23428 test" \ + "--no-dynamic-linker -z separate-code" \ + "" \ +- { linux-x86.S pr23428.c } \ ++ { linux-x86.S pr23428.c dummy.s } \ + "pr23428" \ + "pass.out" \ + "$NOPIE_CFLAGS -fno-asynchronous-unwind-tables" \ +-- +2.20.1 + diff --git a/pkgs/development/tools/misc/binutils/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch b/pkgs/development/tools/misc/binutils/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch new file mode 100644 index 00000000000..866d6db8ce2 --- /dev/null +++ b/pkgs/development/tools/misc/binutils/0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch @@ -0,0 +1,583 @@ +From d55c3e36094f06bb1fb02f5eac19fdccf1d91f7e Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Wed, 8 Aug 2018 06:09:15 -0700 +Subject: [PATCH] x86: Properly merge GNU_PROPERTY_X86_ISA_1_USED +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Without the GNU_PROPERTY_X86_ISA_1_USED property, all ISAs may be used. +If a bit in the GNU_PROPERTY_X86_ISA_1_USED property is unset, the +corresponding x86 instruction set isn’t used. When merging properties +from 2 input files and one input file doesn't have the +GNU_PROPERTY_X86_ISA_1_USED property, the output file shouldn't have +it neither. This patch removes the GNU_PROPERTY_X86_ISA_1_USED +property if an input file doesn't have it. + +This patch replaces the GNU_PROPERTY_X86_ISA_1_USED property with the +GNU_PROPERTY_X86_ISA_1_NEEDED property which is the minimum ISA +requirement. + +bfd/ + + PR ld/23486 + * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove + GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it. + (_bfd_x86_elf_link_setup_gnu_properties): Adding the + GNU_PROPERTY_X86_ISA_1_NEEDED, instead of + GNU_PROPERTY_X86_ISA_1_USED, property. + +ld/ + + PR ld/23486 + * testsuite/ld-i386/i386.exp: Run PR ld/23486 tests. + * testsuite/ld-x86-64/x86-64.exp: Likewise. + * testsuite/ld-i386/pr23486a.d: New file. + * testsuite/ld-i386/pr23486b.d: Likewise. + * testsuite/ld-x86-64/pr23486a-x32.d: Likewise. + * testsuite/ld-x86-64/pr23486a.d: Likewise. + * testsuite/ld-x86-64/pr23486a.s: Likewise. + * testsuite/ld-x86-64/pr23486b-x32.d: Likewise. + * testsuite/ld-x86-64/pr23486b.d: Likewise. + * testsuite/ld-x86-64/pr23486b.s: Likewise. + * testsuite/ld-i386/property-3.r: Remove "x86 ISA used". + * testsuite/ld-i386/property-4.r: Likewise. + * testsuite/ld-i386/property-5.r: Likewise. + * testsuite/ld-i386/property-x86-ibt3a.d: Likewise. + * testsuite/ld-i386/property-x86-ibt3b.d: Likewise. + * testsuite/ld-i386/property-x86-shstk3a.d: Likewise. + * testsuite/ld-i386/property-x86-shstk3b.d: Likewise. + * testsuite/ld-x86-64/property-3.r: Likewise. + * testsuite/ld-x86-64/property-4.r: Likewise. + * testsuite/ld-x86-64/property-5.r: Likewise. + * testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise. + * testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise. + * testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise. + * testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise. + * testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise. + * testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise. + * testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise. + * testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise. + +(cherry picked from commit f7309df20c4e787041cedc4a6aced89c15259e54) +--- + bfd/elfxx-x86.c | 25 ++++++++++++--- + ld/testsuite/ld-i386/i386.exp | 2 ++ + ld/testsuite/ld-i386/pr23486a.d | 10 ++++++ + ld/testsuite/ld-i386/pr23486b.d | 10 ++++++ + ld/testsuite/ld-i386/property-3.r | 1 - + ld/testsuite/ld-i386/property-4.r | 1 - + ld/testsuite/ld-i386/property-5.r | 1 - + ld/testsuite/ld-i386/property-x86-ibt3a.d | 5 ++- + ld/testsuite/ld-i386/property-x86-ibt3b.d | 5 ++- + ld/testsuite/ld-i386/property-x86-shstk3a.d | 5 ++- + ld/testsuite/ld-i386/property-x86-shstk3b.d | 5 ++- + ld/testsuite/ld-x86-64/pr23486a-x32.d | 10 ++++++ + ld/testsuite/ld-x86-64/pr23486a.d | 10 ++++++ + ld/testsuite/ld-x86-64/pr23486a.s | 30 +++++++++++++++++ + ld/testsuite/ld-x86-64/pr23486b-x32.d | 10 ++++++ + ld/testsuite/ld-x86-64/pr23486b.d | 10 ++++++ + ld/testsuite/ld-x86-64/pr23486b.s | 30 +++++++++++++++++ + ld/testsuite/ld-x86-64/property-3.r | 1 - + ld/testsuite/ld-x86-64/property-4.r | 1 - + ld/testsuite/ld-x86-64/property-5.r | 1 - + .../ld-x86-64/property-x86-ibt3a-x32.d | 5 ++- + ld/testsuite/ld-x86-64/property-x86-ibt3a.d | 5 ++- + .../ld-x86-64/property-x86-ibt3b-x32.d | 5 ++- + ld/testsuite/ld-x86-64/property-x86-ibt3b.d | 5 ++- + .../ld-x86-64/property-x86-shstk3a-x32.d | 5 ++- + ld/testsuite/ld-x86-64/property-x86-shstk3a.d | 5 ++- + .../ld-x86-64/property-x86-shstk3b-x32.d | 5 ++- + ld/testsuite/ld-x86-64/property-x86-shstk3b.d | 5 ++- + ld/testsuite/ld-x86-64/x86-64.exp | 4 +++ + 31 files changed, 211 insertions(+), 47 deletions(-) + create mode 100644 ld/testsuite/ld-i386/pr23486a.d + create mode 100644 ld/testsuite/ld-i386/pr23486b.d + create mode 100644 ld/testsuite/ld-x86-64/pr23486a-x32.d + create mode 100644 ld/testsuite/ld-x86-64/pr23486a.d + create mode 100644 ld/testsuite/ld-x86-64/pr23486a.s + create mode 100644 ld/testsuite/ld-x86-64/pr23486b-x32.d + create mode 100644 ld/testsuite/ld-x86-64/pr23486b.d + create mode 100644 ld/testsuite/ld-x86-64/pr23486b.s + +--- a/bfd/elfxx-x86.c ++++ b/bfd/elfxx-x86.c +@@ -2407,12 +2407,27 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info, + switch (pr_type) + { + case GNU_PROPERTY_X86_ISA_1_USED: ++ if (aprop == NULL || bprop == NULL) ++ { ++ /* Only one of APROP and BPROP can be NULL. */ ++ if (aprop != NULL) ++ { ++ /* Remove this property since the other input file doesn't ++ have it. */ ++ aprop->pr_kind = property_remove; ++ updated = TRUE; ++ } ++ break; ++ } ++ goto or_property; ++ + case GNU_PROPERTY_X86_ISA_1_NEEDED: + if (aprop != NULL && bprop != NULL) + { ++or_property: + number = aprop->u.number; + aprop->u.number = number | bprop->u.number; +- /* Remove the property if ISA bits are empty. */ ++ /* Remove the property if all bits are empty. */ + if (aprop->u.number == 0) + { + aprop->pr_kind = property_remove; +@@ -2428,14 +2443,14 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info, + { + if (aprop->u.number == 0) + { +- /* Remove APROP if ISA bits are empty. */ ++ /* Remove APROP if all bits are empty. */ + aprop->pr_kind = property_remove; + updated = TRUE; + } + } + else + { +- /* Return TRUE if APROP is NULL and ISA bits of BPROP ++ /* Return TRUE if APROP is NULL and all bits of BPROP + aren't empty to indicate that BPROP should be added + to ABFD. */ + updated = bprop->u.number != 0; +@@ -2582,9 +2597,9 @@ _bfd_x86_elf_link_setup_gnu_properties + { + /* If the separate code program header is needed, make sure + that the first read-only PT_LOAD segment has no code by +- adding a GNU_PROPERTY_X86_ISA_1_USED note. */ ++ adding a GNU_PROPERTY_X86_ISA_1_NEEDED note. */ + prop = _bfd_elf_get_property (ebfd, +- GNU_PROPERTY_X86_ISA_1_USED, ++ GNU_PROPERTY_X86_ISA_1_NEEDED, + 4); + prop->u.number = GNU_PROPERTY_X86_ISA_1_486; + prop->pr_kind = property_number; +diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp +index 6d794fe653..78dad02579 100644 +--- a/ld/testsuite/ld-i386/i386.exp ++++ b/ld/testsuite/ld-i386/i386.exp +@@ -462,6 +462,8 @@ run_dump_test "pr23189" + run_dump_test "pr23194" + run_dump_test "pr23372a" + run_dump_test "pr23372b" ++run_dump_test "pr23486a" ++run_dump_test "pr23486b" + + if { !([istarget "i?86-*-linux*"] + || [istarget "i?86-*-gnu*"] +diff --git a/ld/testsuite/ld-i386/pr23486a.d b/ld/testsuite/ld-i386/pr23486a.d +new file mode 100644 +index 0000000000..41a6dcf7d5 +--- /dev/null ++++ b/ld/testsuite/ld-i386/pr23486a.d +@@ -0,0 +1,10 @@ ++#source: ../ld-x86-64/pr23486a.s ++#source: ../ld-x86-64/pr23486b.s ++#as: --32 ++#ld: -r -m elf_i386 ++#readelf: -n ++ ++Displaying notes found in: .note.gnu.property ++ Owner Data size Description ++ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586 +diff --git a/ld/testsuite/ld-i386/pr23486b.d b/ld/testsuite/ld-i386/pr23486b.d +new file mode 100644 +index 0000000000..08019b7274 +--- /dev/null ++++ b/ld/testsuite/ld-i386/pr23486b.d +@@ -0,0 +1,10 @@ ++#source: ../ld-x86-64/pr23486b.s ++#source: ../ld-x86-64/pr23486a.s ++#as: --32 ++#ld: -r -m elf_i386 ++#readelf: -n ++ ++Displaying notes found in: .note.gnu.property ++ Owner Data size Description ++ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586 +diff --git a/ld/testsuite/ld-i386/property-3.r b/ld/testsuite/ld-i386/property-3.r +index 0ed91f5922..d03203c1e5 100644 +--- a/ld/testsuite/ld-i386/property-3.r ++++ b/ld/testsuite/ld-i386/property-3.r +@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property + Owner Data size Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x800000 +- x86 ISA used: 586, SSE + x86 ISA needed: i486, 586 + #pass +diff --git a/ld/testsuite/ld-i386/property-4.r b/ld/testsuite/ld-i386/property-4.r +index cb2bc15d9a..da295eb6c7 100644 +--- a/ld/testsuite/ld-i386/property-4.r ++++ b/ld/testsuite/ld-i386/property-4.r +@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property + Owner Data size Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x800000 +- x86 ISA used: i486, 586, SSE + x86 ISA needed: i486, 586, SSE + #pass +diff --git a/ld/testsuite/ld-i386/property-5.r b/ld/testsuite/ld-i386/property-5.r +index 552965058c..e4141594b3 100644 +--- a/ld/testsuite/ld-i386/property-5.r ++++ b/ld/testsuite/ld-i386/property-5.r +@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property + Owner Data size Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x900000 +- x86 ISA used: i486, 586, SSE + x86 ISA needed: i486, 586, SSE + #pass +diff --git a/ld/testsuite/ld-i386/property-x86-ibt3a.d b/ld/testsuite/ld-i386/property-x86-ibt3a.d +index 4bb35b00fb..0aedea1614 100644 +--- a/ld/testsuite/ld-i386/property-x86-ibt3a.d ++++ b/ld/testsuite/ld-i386/property-x86-ibt3a.d +@@ -6,6 +6,5 @@ + + Displaying notes found in: .note.gnu.property + Owner Data size Description +- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 +- Properties: x86 ISA used: i486, 586, SSE2, SSE3 +- x86 ISA needed: 586, SSE, SSE3, SSE4_1 ++ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1 +diff --git a/ld/testsuite/ld-i386/property-x86-ibt3b.d b/ld/testsuite/ld-i386/property-x86-ibt3b.d +index 418d58a8f7..bd69ac6478 100644 +--- a/ld/testsuite/ld-i386/property-x86-ibt3b.d ++++ b/ld/testsuite/ld-i386/property-x86-ibt3b.d +@@ -6,6 +6,5 @@ + + Displaying notes found in: .note.gnu.property + Owner Data size Description +- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 +- Properties: x86 ISA used: i486, 586, SSE2, SSE3 +- x86 ISA needed: 586, SSE, SSE3, SSE4_1 ++ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1 +diff --git a/ld/testsuite/ld-i386/property-x86-shstk3a.d b/ld/testsuite/ld-i386/property-x86-shstk3a.d +index e261038f60..76d2a39f2c 100644 +--- a/ld/testsuite/ld-i386/property-x86-shstk3a.d ++++ b/ld/testsuite/ld-i386/property-x86-shstk3a.d +@@ -6,6 +6,5 @@ + + Displaying notes found in: .note.gnu.property + Owner Data size Description +- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 +- Properties: x86 ISA used: i486, 586, SSE2, SSE3 +- x86 ISA needed: 586, SSE, SSE3, SSE4_1 ++ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1 +diff --git a/ld/testsuite/ld-i386/property-x86-shstk3b.d b/ld/testsuite/ld-i386/property-x86-shstk3b.d +index 25f3d2361e..e770ecffa5 100644 +--- a/ld/testsuite/ld-i386/property-x86-shstk3b.d ++++ b/ld/testsuite/ld-i386/property-x86-shstk3b.d +@@ -6,6 +6,5 @@ + + Displaying notes found in: .note.gnu.property + Owner Data size Description +- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 +- Properties: x86 ISA used: i486, 586, SSE2, SSE3 +- x86 ISA needed: 586, SSE, SSE3, SSE4_1 ++ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1 +diff --git a/ld/testsuite/ld-x86-64/pr23486a-x32.d b/ld/testsuite/ld-x86-64/pr23486a-x32.d +new file mode 100644 +index 0000000000..6d9fa68cdb +--- /dev/null ++++ b/ld/testsuite/ld-x86-64/pr23486a-x32.d +@@ -0,0 +1,10 @@ ++#source: pr23486a.s ++#source: pr23486b.s ++#as: --x32 ++#ld: -r -m elf32_x86_64 ++#readelf: -n ++ ++Displaying notes found in: .note.gnu.property ++ Owner Data size Description ++ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586 +diff --git a/ld/testsuite/ld-x86-64/pr23486a.d b/ld/testsuite/ld-x86-64/pr23486a.d +new file mode 100644 +index 0000000000..dc2b7bf760 +--- /dev/null ++++ b/ld/testsuite/ld-x86-64/pr23486a.d +@@ -0,0 +1,10 @@ ++#source: pr23486a.s ++#source: pr23486b.s ++#as: --64 -defsym __64_bit__=1 ++#ld: -r -m elf_x86_64 ++#readelf: -n ++ ++Displaying notes found in: .note.gnu.property ++ Owner Data size Description ++ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586 +diff --git a/ld/testsuite/ld-x86-64/pr23486a.s b/ld/testsuite/ld-x86-64/pr23486a.s +new file mode 100644 +index 0000000000..a07d0c7ced +--- /dev/null ++++ b/ld/testsuite/ld-x86-64/pr23486a.s +@@ -0,0 +1,30 @@ ++ .section ".note.gnu.property", "a" ++.ifdef __64_bit__ ++ .p2align 3 ++.else ++ .p2align 2 ++.endif ++ .long 1f - 0f /* name length. */ ++ .long 4f - 1f /* data length. */ ++ /* NT_GNU_PROPERTY_TYPE_0 */ ++ .long 5 /* note type. */ ++0: ++ .asciz "GNU" /* vendor name. */ ++1: ++.ifdef __64_bit__ ++ .p2align 3 ++.else ++ .p2align 2 ++.endif ++ /* GNU_PROPERTY_X86_ISA_1_USED */ ++ .long 0xc0000000 /* pr_type. */ ++ .long 3f - 2f /* pr_datasz. */ ++2: ++ .long 0xa ++3: ++.ifdef __64_bit__ ++ .p2align 3 ++.else ++ .p2align 2 ++.endif ++4: +diff --git a/ld/testsuite/ld-x86-64/pr23486b-x32.d b/ld/testsuite/ld-x86-64/pr23486b-x32.d +new file mode 100644 +index 0000000000..0445e69d82 +--- /dev/null ++++ b/ld/testsuite/ld-x86-64/pr23486b-x32.d +@@ -0,0 +1,10 @@ ++#source: pr23486b.s ++#source: pr23486a.s ++#as: --x32 ++#ld: -r -m elf32_x86_64 ++#readelf: -n ++ ++Displaying notes found in: .note.gnu.property ++ Owner Data size Description ++ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586 +diff --git a/ld/testsuite/ld-x86-64/pr23486b.d b/ld/testsuite/ld-x86-64/pr23486b.d +new file mode 100644 +index 0000000000..dc2b7bf760 +--- /dev/null ++++ b/ld/testsuite/ld-x86-64/pr23486b.d +@@ -0,0 +1,10 @@ ++#source: pr23486a.s ++#source: pr23486b.s ++#as: --64 -defsym __64_bit__=1 ++#ld: -r -m elf_x86_64 ++#readelf: -n ++ ++Displaying notes found in: .note.gnu.property ++ Owner Data size Description ++ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586 +diff --git a/ld/testsuite/ld-x86-64/pr23486b.s b/ld/testsuite/ld-x86-64/pr23486b.s +new file mode 100644 +index 0000000000..c5167eeb65 +--- /dev/null ++++ b/ld/testsuite/ld-x86-64/pr23486b.s +@@ -0,0 +1,30 @@ ++ .section ".note.gnu.property", "a" ++.ifdef __64_bit__ ++ .p2align 3 ++.else ++ .p2align 2 ++.endif ++ .long 1f - 0f /* name length. */ ++ .long 4f - 1f /* data length. */ ++ /* NT_GNU_PROPERTY_TYPE_0 */ ++ .long 5 /* note type. */ ++0: ++ .asciz "GNU" /* vendor name. */ ++1: ++.ifdef __64_bit__ ++ .p2align 3 ++.else ++ .p2align 2 ++.endif ++ /* GNU_PROPERTY_X86_ISA_1_NEEDED */ ++ .long 0xc0000001 /* pr_type. */ ++ .long 3f - 2f /* pr_datasz. */ ++2: ++ .long 0x3 ++3: ++.ifdef __64_bit__ ++ .p2align 3 ++.else ++ .p2align 2 ++.endif ++4: +diff --git a/ld/testsuite/ld-x86-64/property-3.r b/ld/testsuite/ld-x86-64/property-3.r +index 0ed91f5922..d03203c1e5 100644 +--- a/ld/testsuite/ld-x86-64/property-3.r ++++ b/ld/testsuite/ld-x86-64/property-3.r +@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property + Owner Data size Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x800000 +- x86 ISA used: 586, SSE + x86 ISA needed: i486, 586 + #pass +diff --git a/ld/testsuite/ld-x86-64/property-4.r b/ld/testsuite/ld-x86-64/property-4.r +index cb2bc15d9a..da295eb6c7 100644 +--- a/ld/testsuite/ld-x86-64/property-4.r ++++ b/ld/testsuite/ld-x86-64/property-4.r +@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property + Owner Data size Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x800000 +- x86 ISA used: i486, 586, SSE + x86 ISA needed: i486, 586, SSE + #pass +diff --git a/ld/testsuite/ld-x86-64/property-5.r b/ld/testsuite/ld-x86-64/property-5.r +index 552965058c..e4141594b3 100644 +--- a/ld/testsuite/ld-x86-64/property-5.r ++++ b/ld/testsuite/ld-x86-64/property-5.r +@@ -3,6 +3,5 @@ Displaying notes found in: .note.gnu.property + Owner Data size Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: stack size: 0x900000 +- x86 ISA used: i486, 586, SSE + x86 ISA needed: i486, 586, SSE + #pass +diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d b/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d +index 011426f5a4..4cec728dc7 100644 +--- a/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d ++++ b/ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d +@@ -6,6 +6,5 @@ + + Displaying notes found in: .note.gnu.property + Owner Data size Description +- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 +- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 +- x86 ISA needed: i486, 586, SSE2, SSE3 ++ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 +diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3a.d b/ld/testsuite/ld-x86-64/property-x86-ibt3a.d +index 1b4229a037..a8df49a351 100644 +--- a/ld/testsuite/ld-x86-64/property-x86-ibt3a.d ++++ b/ld/testsuite/ld-x86-64/property-x86-ibt3a.d +@@ -6,6 +6,5 @@ + + Displaying notes found in: .note.gnu.property + Owner Data size Description +- GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 +- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 +- x86 ISA needed: i486, 586, SSE2, SSE3 ++ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 +diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d b/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d +index 290ed6abf1..c112626711 100644 +--- a/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d ++++ b/ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d +@@ -6,6 +6,5 @@ + + Displaying notes found in: .note.gnu.property + Owner Data size Description +- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 +- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 +- x86 ISA needed: i486, 586, SSE2, SSE3 ++ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 +diff --git a/ld/testsuite/ld-x86-64/property-x86-ibt3b.d b/ld/testsuite/ld-x86-64/property-x86-ibt3b.d +index 1142e03272..f10dffdc2c 100644 +--- a/ld/testsuite/ld-x86-64/property-x86-ibt3b.d ++++ b/ld/testsuite/ld-x86-64/property-x86-ibt3b.d +@@ -6,6 +6,5 @@ + + Displaying notes found in: .note.gnu.property + Owner Data size Description +- GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 +- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 +- x86 ISA needed: i486, 586, SSE2, SSE3 ++ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 +diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d b/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d +index 819542d181..0147a3c7b6 100644 +--- a/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d ++++ b/ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d +@@ -6,6 +6,5 @@ + + Displaying notes found in: .note.gnu.property + Owner Data size Description +- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 +- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 +- x86 ISA needed: i486, 586, SSE2, SSE3 ++ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 +diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3a.d b/ld/testsuite/ld-x86-64/property-x86-shstk3a.d +index 4c5d0e0a18..1f8c2dc929 100644 +--- a/ld/testsuite/ld-x86-64/property-x86-shstk3a.d ++++ b/ld/testsuite/ld-x86-64/property-x86-shstk3a.d +@@ -6,6 +6,5 @@ + + Displaying notes found in: .note.gnu.property + Owner Data size Description +- GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 +- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 +- x86 ISA needed: i486, 586, SSE2, SSE3 ++ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 +diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d b/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d +index ba181e0bc5..7ca2539ca5 100644 +--- a/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d ++++ b/ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d +@@ -6,6 +6,5 @@ + + Displaying notes found in: .note.gnu.property + Owner Data size Description +- GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 +- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 +- x86 ISA needed: i486, 586, SSE2, SSE3 ++ GNU 0x0000000c NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 +diff --git a/ld/testsuite/ld-x86-64/property-x86-shstk3b.d b/ld/testsuite/ld-x86-64/property-x86-shstk3b.d +index 5216f385dd..f66a40e449 100644 +--- a/ld/testsuite/ld-x86-64/property-x86-shstk3b.d ++++ b/ld/testsuite/ld-x86-64/property-x86-shstk3b.d +@@ -6,6 +6,5 @@ + + Displaying notes found in: .note.gnu.property + Owner Data size Description +- GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0 +- Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1 +- x86 ISA needed: i486, 586, SSE2, SSE3 ++ GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 ++ Properties: x86 ISA needed: i486, 586, SSE2, SSE3 +diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp +index 6edb9e86f4..ae21e554ad 100644 +--- a/ld/testsuite/ld-x86-64/x86-64.exp ++++ b/ld/testsuite/ld-x86-64/x86-64.exp +@@ -403,6 +403,10 @@ run_dump_test "pr23372a" + run_dump_test "pr23372a-x32" + run_dump_test "pr23372b" + run_dump_test "pr23372b-x32" ++run_dump_test "pr23486a" ++run_dump_test "pr23486a-x32" ++run_dump_test "pr23486b" ++run_dump_test "pr23486b-x32" + + if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} { + return +-- +2.20.1 + diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index ebbddbb2190..e1ff92d00f4 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -8,13 +8,15 @@ , bison ? null , flex , texinfo -, perl }: let reuseLibs = enableShared && withAllTargets; - version = "2.34"; + # Remove gold-symbol-visibility patch when updating, the proper fix + # is now upstream. + # https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=330b90b5ffbbc20c5de6ae6c7f60c40fab2e7a4f;hp=99181ccac0fc7d82e7dabb05dc7466e91f1645d3 + version = "2.33.1"; basename = "binutils"; # The targetPrefix prepended to binary names to allow multiple binuntils on the # PATH to both be usable. @@ -29,7 +31,7 @@ let # HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM normal-src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl { url = "mirror://gnu/binutils/${basename}-${version}.tar.bz2"; - sha256 = "1rin1f5c7wm4n3piky6xilcrpf2s0n3dd5vqq8irrxkcic3i1w49"; + sha256 = "1cmd0riv37bqy9mwbg6n3523qgr8b3bbm5kwj19sjrasl4yq9d0c"; }); in @@ -62,6 +64,10 @@ stdenv.mkDerivation { # cross-compiling. ./always-search-rpath.patch + ] ++ lib.optionals (!stdenv.targetPlatform.isVc4) + [ + # https://sourceware.org/bugzilla/show_bug.cgi?id=22868 + ./gold-symbol-visibility.patch ] ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch; outputs = [ "out" "info" "man" ]; @@ -69,11 +75,9 @@ stdenv.mkDerivation { depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ bison - perl - texinfo ] ++ (lib.optionals stdenv.targetPlatform.isiOS [ autoreconfHook - ]) ++ lib.optionals stdenv.targetPlatform.isVc4 [ flex ]; + ]) ++ lib.optionals stdenv.targetPlatform.isVc4 [ texinfo flex ]; buildInputs = [ zlib gettext ]; inherit noSysDirs; diff --git a/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch b/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch new file mode 100644 index 00000000000..0fb05a482d1 --- /dev/null +++ b/pkgs/development/tools/misc/binutils/gold-symbol-visibility.patch @@ -0,0 +1,79 @@ +commit 8564af037f5c4c6d2744a89497691359205b2bbc +Author: Shea Levy +Date: Mon Mar 19 10:52:40 2018 -0400 + + Revert "Allow multiply-defined absolute symbols when they have the same value." + + This reverts commit 5dc824ed42cd173c1525f5abc76f4091f11a4dbc. + +diff --git a/gold/ChangeLog-2017 b/gold/ChangeLog-2017 +index b2a47710b5..d7ca1b48c0 100644 +--- a/gold/ChangeLog-2017 ++++ b/gold/ChangeLog-2017 +@@ -114,11 +114,6 @@ + (localedir): Define as @localedir@. + (gnulocaledir, gettextsrcdir): Use @datarootdir@. + +-2017-11-28 Cary Coutant +- +- * resolve.cc (Symbol_table::resolve): Allow multiply-defined absolute +- symbols when they have the same value. +- + 2017-11-28 Cary Coutant + + * object.h (class Sized_relobj_file): Remove discarded_eh_frame_shndx_. +diff --git a/gold/resolve.cc b/gold/resolve.cc +index 4a5784cf8b..803576bfed 100644 +--- a/gold/resolve.cc ++++ b/gold/resolve.cc +@@ -247,28 +247,18 @@ Symbol_table::resolve(Sized_symbol* to, + Object* object, const char* version, + bool is_default_version) + { +- bool to_is_ordinary; +- const unsigned int to_shndx = to->shndx(&to_is_ordinary); +- + // It's possible for a symbol to be defined in an object file + // using .symver to give it a version, and for there to also be + // a linker script giving that symbol the same version. We + // don't want to give a multiple-definition error for this + // harmless redefinition. ++ bool to_is_ordinary; + if (to->source() == Symbol::FROM_OBJECT + && to->object() == object +- && to->is_defined() + && is_ordinary ++ && to->is_defined() ++ && to->shndx(&to_is_ordinary) == st_shndx + && to_is_ordinary +- && to_shndx == st_shndx +- && to->value() == sym.get_st_value()) +- return; +- +- // Likewise for an absolute symbol defined twice with the same value. +- if (!is_ordinary +- && st_shndx == elfcpp::SHN_ABS +- && !to_is_ordinary +- && to_shndx == elfcpp::SHN_ABS + && to->value() == sym.get_st_value()) + return; + +@@ -360,8 +350,8 @@ Symbol_table::resolve(Sized_symbol* to, + && (sym.get_st_bind() == elfcpp::STB_WEAK + || to->binding() == elfcpp::STB_WEAK) + && orig_st_shndx != elfcpp::SHN_UNDEF ++ && to->shndx(&to_is_ordinary) != elfcpp::SHN_UNDEF + && to_is_ordinary +- && to_shndx != elfcpp::SHN_UNDEF + && sym.get_st_size() != 0 // Ignore weird 0-sized symbols. + && to->symsize() != 0 + && (sym.get_st_type() != to->type() +@@ -372,7 +362,7 @@ Symbol_table::resolve(Sized_symbol* to, + { + Symbol_location fromloc + = { object, orig_st_shndx, static_cast(sym.get_st_value()) }; +- Symbol_location toloc = { to->object(), to_shndx, ++ Symbol_location toloc = { to->object(), to->shndx(&to_is_ordinary), + static_cast(to->value()) }; + this->candidate_odr_violations_[to->name()].insert(fromloc); + this->candidate_odr_violations_[to->name()].insert(toloc); From e30f1e3c80dad49893b7921c393583f3a149bceb Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 29 Apr 2020 15:48:25 +0200 Subject: [PATCH 53/72] Revert "coreutils: set ac_cv_func_lchmod=no" This reverts commit c5e3472e2072ed0998571ce3961b8df65e2862cc. --- pkgs/tools/misc/coreutils/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index b39bef7cb2d..49edc002bec 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -79,7 +79,6 @@ stdenv.mkDerivation (rec { ++ optional (singleBinary != false) ("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}") ++ optional withOpenssl "--with-openssl" - ++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no" ++ optional stdenv.hostPlatform.isSunOS "ac_cv_func_inotify_init=no" ++ optional withPrefix "--program-prefix=g" ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc == "glibc") [ From 607c4d8bb8909f17e3083bb1504430eb7332a974 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 29 Apr 2020 15:48:26 +0200 Subject: [PATCH 54/72] Revert "binutils: 2.31.1 -> 2.33.1" This reverts commit efdb29597a76c526dc0d9a55f8adf2ec5c33b0ee. --- .../tools/misc/binutils/default.nix | 10 +++++-- .../tools/misc/binutils/no-plugins.patch | 26 +++++++++---------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index e1ff92d00f4..cd05ea354ca 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -16,7 +16,7 @@ let # Remove gold-symbol-visibility patch when updating, the proper fix # is now upstream. # https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=330b90b5ffbbc20c5de6ae6c7f60c40fab2e7a4f;hp=99181ccac0fc7d82e7dabb05dc7466e91f1645d3 - version = "2.33.1"; + version = "2.31.1"; basename = "binutils"; # The targetPrefix prepended to binary names to allow multiple binuntils on the # PATH to both be usable. @@ -31,7 +31,7 @@ let # HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM normal-src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl { url = "mirror://gnu/binutils/${basename}-${version}.tar.bz2"; - sha256 = "1cmd0riv37bqy9mwbg6n3523qgr8b3bbm5kwj19sjrasl4yq9d0c"; + sha256 = "1l34hn1zkmhr1wcrgf0d4z7r3najxnw3cx2y2fk7v55zjlk3ik7z"; }); in @@ -68,6 +68,12 @@ stdenv.mkDerivation { [ # https://sourceware.org/bugzilla/show_bug.cgi?id=22868 ./gold-symbol-visibility.patch + + # https://sourceware.org/bugzilla/show_bug.cgi?id=23428 + # un-break features so linking against musl doesn't produce crash-only binaries + ./0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch + ./0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch + ./0001-x86-Properly-add-X86_ISA_1_NEEDED-property.patch ] ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch; outputs = [ "out" "info" "man" ]; diff --git a/pkgs/development/tools/misc/binutils/no-plugins.patch b/pkgs/development/tools/misc/binutils/no-plugins.patch index 68cf51b7dd3..9624b7976b7 100644 --- a/pkgs/development/tools/misc/binutils/no-plugins.patch +++ b/pkgs/development/tools/misc/binutils/no-plugins.patch @@ -1,21 +1,19 @@ -diff --git a/bfd/plugin.c b/bfd/plugin.c -index 537ab60311..bfe7957f96 100644 ---- a/bfd/plugin.c -+++ b/bfd/plugin.c -@@ -386,6 +386,7 @@ load_plugin (bfd *abfd) +diff -ru binutils-2.27-orig/bfd/plugin.c binutils-2.27/bfd/plugin.c +--- binutils-2.27-orig/bfd/plugin.c 2016-10-14 17:46:30.791315555 +0200 ++++ binutils-2.27/bfd/plugin.c 2016-10-14 17:46:38.583298765 +0200 +@@ -333,6 +333,7 @@ if (plugin_program_name == NULL) return found; +#if 0 - /* Try not to search the same dir twice, by looking at st_dev and - st_ino for the dir. If we are on a file system that always sets - st_ino to zero or the actual st_ino is zero we might waste some -@@ -437,7 +438,7 @@ load_plugin (bfd *abfd) - if (found) - break; - } -- + plugin_dir = concat (BINDIR, "/../lib/bfd-plugins", NULL); + p = make_relative_prefix (plugin_program_name, + BINDIR, +@@ -364,6 +365,7 @@ + free (p); + if (d) + closedir (d); +#endif + return found; } - From 237ef3095c7604a36ab231d282fcfce02613130d Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 29 Apr 2020 16:48:50 +0200 Subject: [PATCH 55/72] Revert "libbfd: fix build" This reverts commit 7550ab98b0a305afda06121e6f135a7556b7e753. --- .../build-components-separately.patch | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/pkgs/development/tools/misc/binutils/build-components-separately.patch b/pkgs/development/tools/misc/binutils/build-components-separately.patch index 38fa4934a28..d3cd0d2131c 100644 --- a/pkgs/development/tools/misc/binutils/build-components-separately.patch +++ b/pkgs/development/tools/misc/binutils/build-components-separately.patch @@ -1,8 +1,19 @@ +From bc09a9236f67e710d545ac11bcdac7b55dbcc1a0 Mon Sep 17 00:00:00 2001 +From: John Ericson +Date: Thu, 12 Oct 2017 11:16:57 -0400 +Subject: [PATCH] Build components separately + +--- + bfd/configure.ac | 18 +++--------------- + opcodes/Makefile.am | 17 +++++++++++++---- + opcodes/configure.ac | 45 ++++++--------------------------------------- + 3 files changed, 22 insertions(+), 58 deletions(-) + diff --git a/bfd/configure.ac b/bfd/configure.ac -index c5bfbd5d..45ad4c26 100644 +index 9a183c1628..8728837384 100644 --- a/bfd/configure.ac +++ b/bfd/configure.ac -@@ -278,31 +278,19 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, +@@ -241,31 +241,19 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, LT_LIB_M @@ -22,26 +33,26 @@ index c5bfbd5d..45ad4c26 100644 - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" - fi - + # More hacks to build DLLs on Windows. case "${host}" in - # More hacks to build DLLs on Windows. *-*-cygwin*) SHARED_LDFLAGS="-no-undefined" - SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" + SHARED_LIBADD="-liberty -lintl -lcygwin -lkernel32" ;; - # Use built-in libintl on macOS, since it is not provided by libc. - *-*-darwin*) + # Hack to build or1k-src on OSX + or1k*-*-darwin*) - SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl" + SHARED_LIBADD="-liberty -lintl" ;; esac diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am -index 4f06074a..6836c589 100644 +index 925e7ff651..47b395c195 100644 --- a/opcodes/Makefile.am +++ b/opcodes/Makefile.am -@@ -51,7 +51,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir) +@@ -52,7 +52,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir) endif # This is where bfd.h lives. @@ -50,7 +61,7 @@ index 4f06074a..6836c589 100644 BUILD_LIBS = @BUILD_LIBS@ BUILD_LIB_DEPS = @BUILD_LIB_DEPS@ -@@ -301,7 +301,7 @@ OFILES = @BFD_MACHINES@ +@@ -303,7 +303,7 @@ OFILES = @BFD_MACHINES@ # development.sh is used to determine -Werror default. CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh @@ -59,7 +70,7 @@ index 4f06074a..6836c589 100644 disassemble.lo: disassemble.c if am__fastdepCC -@@ -322,12 +322,21 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c +@@ -324,12 +324,21 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c # old version of libbfd, or to pick up libbfd for the wrong architecture # if host != build. So for building with shared libraries we use a # hardcoded path to libbfd.so instead of relying on the entries in libbfd.la. @@ -84,10 +95,10 @@ index 4f06074a..6836c589 100644 # the build directory so that we don't have to convert all the # programs that use libopcodes.a simultaneously. This is a hack which diff --git a/opcodes/configure.ac b/opcodes/configure.ac -index 00be9c88..6e589ae4 100644 +index b9f5eb8a4f..ef2c2152b7 100644 --- a/opcodes/configure.ac +++ b/opcodes/configure.ac -@@ -86,6 +86,7 @@ AC_PROG_INSTALL +@@ -89,6 +89,7 @@ AC_PROG_INSTALL AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h) ACX_HEADER_STRING @@ -95,7 +106,7 @@ index 00be9c88..6e589ae4 100644 AC_CHECK_DECLS([basename, stpcpy]) -@@ -137,61 +138,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, +@@ -134,61 +135,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, LT_LIB_M @@ -162,3 +173,6 @@ index 00be9c88..6e589ae4 100644 ;; esac +-- +2.14.2 + From 4d9e007563aade0b3abdc26e71f3d16e59aa6462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 29 Apr 2020 23:08:15 +0200 Subject: [PATCH 56/72] nettle: 3.5.1 -> 3.6 https://lists.lysator.liu.se/pipermail/nettle-bugs/2020/008967.html Ed448 should now just work in knot-{dns,resolver}. --- pkgs/development/libraries/nettle/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/nettle/default.nix b/pkgs/development/libraries/nettle/default.nix index 36c9f0e6ac7..7c0c6476bd0 100644 --- a/pkgs/development/libraries/nettle/default.nix +++ b/pkgs/development/libraries/nettle/default.nix @@ -1,10 +1,10 @@ { callPackage, fetchurl, ... } @ args: callPackage ./generic.nix (args // rec { - version = "3.5.1"; + version = "3.6"; src = fetchurl { url = "mirror://gnu/nettle/nettle-${version}.tar.gz"; - sha256 = "06clvkdfxhlbagn4afssylmn5vrak59dlmnvy8b2xc31hycs3k3m"; + sha256 = "1wg3sprl0bzy49cmbwwm91vw67hk1x5i3ksdygsciyxz587hsk6j"; }; }) From b4a268911707d49caf3e3317b9a87bbc54973550 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 29 Apr 2020 20:26:21 +0200 Subject: [PATCH 57/72] liberation_ttf_v2: 2.00.4 -> 2.1.0 --- pkgs/data/fonts/liberation-fonts/default.nix | 67 ++++++++++++++++++ .../fonts/redhat-liberation-fonts/default.nix | 70 ------------------- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 68 insertions(+), 71 deletions(-) create mode 100644 pkgs/data/fonts/liberation-fonts/default.nix delete mode 100644 pkgs/data/fonts/redhat-liberation-fonts/default.nix diff --git a/pkgs/data/fonts/liberation-fonts/default.nix b/pkgs/data/fonts/liberation-fonts/default.nix new file mode 100644 index 00000000000..838a8d4c769 --- /dev/null +++ b/pkgs/data/fonts/liberation-fonts/default.nix @@ -0,0 +1,67 @@ +{ stdenv, fetchFromGitHub, fontforge, python3 }: +let + inherit (python3.pkgs) fonttools; + + common = + { version, repo, sha256, nativeBuildInputs, postPatch ? null }: + stdenv.mkDerivation rec { + pname = "liberation-fonts"; + inherit version; + + src = fetchFromGitHub { + owner = "liberationfonts"; + rev = version; + inherit repo sha256; + }; + + inherit nativeBuildInputs postPatch; + + installPhase = '' + find . -name '*.ttf' -exec install -m444 -Dt $out/share/fonts/truetype {} \; + + install -m444 -Dt $out/share/doc/${pname}-${version} AUTHORS || true + install -m444 -Dt $out/share/doc/${pname}-${version} ChangeLog || true + install -m444 -Dt $out/share/doc/${pname}-${version} COPYING || true + install -m444 -Dt $out/share/doc/${pname}-${version} License.txt || true + install -m444 -Dt $out/share/doc/${pname}-${version} README || true + ''; + + meta = with stdenv.lib; { + description = "Liberation Fonts, replacements for Times New Roman, Arial, and Courier New"; + longDescription = '' + The Liberation Fonts are intended to be replacements for the three most + commonly used fonts on Microsoft systems: Times New Roman, Arial, and + Courier New. Since 2012 they are based on croscore fonts. + + There are three sets: Sans (a substitute for Arial, Albany, Helvetica, + Nimbus Sans L, and Bitstream Vera Sans), Serif (a substitute for Times + New Roman, Thorndale, Nimbus Roman, and Bitstream Vera Serif) and Mono + (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L, and + Bitstream Vera Sans Mono). + ''; + + license = licenses.ofl; + homepage = "https://github.com/liberationfonts"; + maintainers = with maintainers; [ raskin ]; + }; + }; +in +{ + liberation_ttf_v1 = common { + repo = "liberation-1.7-fonts"; + version = "1.07.5"; + nativeBuildInputs = [ fontforge ]; + sha256 = "1ffl10mf78hx598sy9qr5m6q2b8n3mpnsj73bwixnd4985gsz56v"; + }; + liberation_ttf_v2 = common { + repo = "liberation-fonts"; + version = "2.1.0"; + nativeBuildInputs = [ fontforge fonttools ]; + postPatch = '' + substituteInPlace scripts/setisFixedPitch-fonttools.py --replace \ + 'font = ttLib.TTFont(fontfile)' \ + 'font = ttLib.TTFont(fontfile, recalcTimestamp=False)' + ''; + sha256 = "03xpzaas264x5n6qisxkhc68pkpn32m7y78qdm3rdkxdwi8mv8mz"; + }; +} diff --git a/pkgs/data/fonts/redhat-liberation-fonts/default.nix b/pkgs/data/fonts/redhat-liberation-fonts/default.nix deleted file mode 100644 index 1cb0eb349e4..00000000000 --- a/pkgs/data/fonts/redhat-liberation-fonts/default.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ stdenv, fetchFromGitHub, fontforge, python3 }: - -let - inherit (python3.pkgs) fonttools; - - common = - { version, repo, sha256, nativeBuildInputs, postPatch ? null }: - stdenv.mkDerivation rec { - pname = "liberation-fonts"; - inherit version; - - src = fetchFromGitHub { - owner = "liberationfonts"; - rev = version; - inherit repo sha256; - }; - - inherit nativeBuildInputs postPatch; - - installPhase = '' - find . -name '*.ttf' -exec install -m444 -Dt $out/share/fonts/truetype {} \; - - install -m444 -Dt $out/share/doc/${pname}-${version} AUTHORS || true - install -m444 -Dt $out/share/doc/${pname}-${version} ChangeLog || true - install -m444 -Dt $out/share/doc/${pname}-${version} COPYING || true - install -m444 -Dt $out/share/doc/${pname}-${version} License.txt || true - install -m444 -Dt $out/share/doc/${pname}-${version} README || true - ''; - - meta = with stdenv.lib; { - description = "Liberation Fonts, replacements for Times New Roman, Arial, and Courier New"; - longDescription = '' - The Liberation Fonts are intended to be replacements for the three most - commonly used fonts on Microsoft systems: Times New Roman, Arial, and - Courier New. Since 2012 they are based on croscore fonts. - - There are three sets: Sans (a substitute for Arial, Albany, Helvetica, - Nimbus Sans L, and Bitstream Vera Sans), Serif (a substitute for Times - New Roman, Thorndale, Nimbus Roman, and Bitstream Vera Serif) and Mono - (a substitute for Courier New, Cumberland, Courier, Nimbus Mono L, and - Bitstream Vera Sans Mono). - ''; - - license = licenses.ofl; - homepage = "https://github.com/liberationfonts"; - maintainers = [ - maintainers.raskin - ]; - }; - }; - -in { - liberation_ttf_v1 = common { - repo = "liberation-1.7-fonts"; - version = "1.07.5"; - nativeBuildInputs = [ fontforge ]; - sha256 = "1ffl10mf78hx598sy9qr5m6q2b8n3mpnsj73bwixnd4985gsz56v"; - }; - liberation_ttf_v2 = common { - repo = "liberation-fonts"; - version = "2.00.4"; - nativeBuildInputs = [ fontforge fonttools ]; - postPatch = '' - substituteInPlace scripts/setisFixedPitch-fonttools.py --replace \ - 'font = ttLib.TTFont(fontfile)' \ - 'font = ttLib.TTFont(fontfile, recalcTimestamp=False)' - ''; - sha256 = "14bn1zlhyr4qaz5z2sx4h115pnbd41ix1vky8fxm2lx76xrjjiaa"; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8e87f3e2ca0..160626492df 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17867,7 +17867,7 @@ in ledger-udev-rules = callPackage ../os-specific/linux/ledger-udev-rules {}; - inherit (callPackages ../data/fonts/redhat-liberation-fonts { }) + inherit (callPackages ../data/fonts/liberation-fonts { }) liberation_ttf_v1 liberation_ttf_v2 ; From 8f7387f2195da33dd0886a7b7dbcae0518725542 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 30 Apr 2020 20:12:30 +0200 Subject: [PATCH 58/72] gobject-introspection: Ensure the giDiscoverSelf is run before gappsWrapperArgsHook gappsWrapperArgsHook tries to collect GI_TYPELIB_PATH environment variable so if we want it to see the path giDiscoverSelf adds, we need to force the order. --- .../libraries/gobject-introspection/setup-hook.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gobject-introspection/setup-hook.sh b/pkgs/development/libraries/gobject-introspection/setup-hook.sh index a68d544cfbe..6bee47aeb09 100644 --- a/pkgs/development/libraries/gobject-introspection/setup-hook.sh +++ b/pkgs/development/libraries/gobject-introspection/setup-hook.sh @@ -18,7 +18,14 @@ giDiscoverSelf() { fi } -preFixupHooks+=(giDiscoverSelf) +# gappsWrapperArgsHook expects GI_TYPELIB_PATH variable to be set by this. +# Until we have dependency mechanism in generic builder, we need to use this ugly hack. +if [[ " ${preFixupPhases:-} " =~ " gappsWrapperArgsHook " ]]; then + preFixupPhases+=" " + preFixupPhases="${preFixupPhases/ gappsWrapperArgsHook / giDiscoverSelf gappsWrapperArgsHook }" +else + preFixupPhases+=" giDiscoverSelf" +fi _multioutMoveGlibGir() { moveToOutput share/gir-1.0 "${!outputDev}" From 4ea28e76c23d0d7ebbdb3196a8cbd9089bef02de Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Thu, 30 Apr 2020 21:50:14 +0200 Subject: [PATCH 59/72] cups: 2.3.1 -> 2.3.3 https://github.com/apple/cups/releases/tag/v2.3.3 Fixes: https://nvd.nist.gov/vuln/detail/CVE-2019-8842 https://nvd.nist.gov/vuln/detail/CVE-2020-3898 --- pkgs/misc/cups/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index b16c0645cda..8736edd0e61 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { pname = "cups"; # After 2.2.6, CUPS requires headers only available in macOS 10.12+ - version = if stdenv.isDarwin then "2.2.6" else "2.3.1"; + version = if stdenv.isDarwin then "2.2.6" else "2.3.3"; passthru = { inherit version; }; @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { url = "https://github.com/apple/cups/releases/download/v${version}/cups-${version}-source.tar.gz"; sha256 = if version == "2.2.6" then "16qn41b84xz6khrr2pa2wdwlqxr29rrrkjfi618gbgdkq9w5ff20" - else "1kkpmj17205j8w9hdff2bfpk6lwdmr3gx0j4r35nhgvya24rvjhv"; + else "1vpk0b2vq830f8fvf9z8qjsm5k141i7pi8djbinpnr78pi4dj7r6"; }; outputs = [ "out" "lib" "dev" "man" ]; From fc6a4600f83bd1d3988a1d85d5b054bb023affdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Sun, 26 Apr 2020 17:17:39 +0200 Subject: [PATCH 60/72] llvm_6: mark as big-parallel LLVM builds frequently time out on hydra at least on AArch64. Marking big-parallel gives them more resources to finish quicker. --- pkgs/development/compilers/llvm/6/llvm.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/llvm/6/llvm.nix b/pkgs/development/compilers/llvm/6/llvm.nix index 9f3b5e5ba0d..22dbb75d2d5 100644 --- a/pkgs/development/compilers/llvm/6/llvm.nix +++ b/pkgs/development/compilers/llvm/6/llvm.nix @@ -147,6 +147,7 @@ stdenv.mkDerivation ({ enableParallelBuilding = true; + requiredSystemFeatures = [ "big-parallel" ]; meta = { description = "Collection of modular and reusable compiler and toolchain technologies"; homepage = "https://llvm.org/"; From 8c880d943410e203985dbc05d0dbe19d494a684d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Sun, 26 Apr 2020 17:18:55 +0200 Subject: [PATCH 61/72] llvm_7: mark as big-parallel LLVM builds frequently time out on hydra at least on AArch64. Marking big-parallel gives them more resources to finish quicker. --- pkgs/development/compilers/llvm/7/llvm.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/llvm/7/llvm.nix b/pkgs/development/compilers/llvm/7/llvm.nix index 55485418e4f..0a85d862f20 100644 --- a/pkgs/development/compilers/llvm/7/llvm.nix +++ b/pkgs/development/compilers/llvm/7/llvm.nix @@ -168,6 +168,7 @@ in stdenv.mkDerivation ({ enableParallelBuilding = true; + requiredSystemFeatures = [ "big-parallel" ]; meta = { description = "Collection of modular and reusable compiler and toolchain technologies"; homepage = "https://llvm.org/"; From 4b3c3e10a6245e551bf0862eaf7d0543367807c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Sun, 26 Apr 2020 17:19:12 +0200 Subject: [PATCH 62/72] llvm_8: mark as big-parallel LLVM builds frequently time out on hydra at least on AArch64. Marking big-parallel gives them more resources to finish quicker. --- pkgs/development/compilers/llvm/8/llvm.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/llvm/8/llvm.nix b/pkgs/development/compilers/llvm/8/llvm.nix index 43615fc675d..61ed24ba842 100644 --- a/pkgs/development/compilers/llvm/8/llvm.nix +++ b/pkgs/development/compilers/llvm/8/llvm.nix @@ -143,6 +143,7 @@ in stdenv.mkDerivation ({ enableParallelBuilding = true; + requiredSystemFeatures = [ "big-parallel" ]; meta = { description = "Collection of modular and reusable compiler and toolchain technologies"; homepage = "https://llvm.org/"; From 7c27e8749d193061f95befc15def3d766a6ff484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Sun, 26 Apr 2020 17:19:31 +0200 Subject: [PATCH 63/72] llvm_9: mark as big-parallel LLVM builds frequently time out on hydra at least on AArch64. Marking big-parallel gives them more resources to finish quicker. --- pkgs/development/compilers/llvm/9/llvm.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/llvm/9/llvm.nix b/pkgs/development/compilers/llvm/9/llvm.nix index f69f45b858b..0344caa5e8a 100644 --- a/pkgs/development/compilers/llvm/9/llvm.nix +++ b/pkgs/development/compilers/llvm/9/llvm.nix @@ -160,6 +160,7 @@ in stdenv.mkDerivation (rec { enableParallelBuilding = true; + requiredSystemFeatures = [ "big-parallel" ]; meta = { description = "Collection of modular and reusable compiler and toolchain technologies"; homepage = "https://llvm.org/"; From ed2ac0dcfaa5ed5028bce88d7ff47c4e1af4345b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benno=20F=C3=BCnfst=C3=BCck?= Date: Tue, 28 Apr 2020 10:51:04 +0200 Subject: [PATCH 64/72] llvm_10: mark as big-parallel LLVM builds frequently time out on hydra at least on AArch64. Marking big-parallel gives them more resources to finish quicker. --- pkgs/development/compilers/llvm/10/llvm.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/llvm/10/llvm.nix b/pkgs/development/compilers/llvm/10/llvm.nix index 648c9fdefc3..82e4605a2f5 100644 --- a/pkgs/development/compilers/llvm/10/llvm.nix +++ b/pkgs/development/compilers/llvm/10/llvm.nix @@ -159,6 +159,7 @@ in stdenv.mkDerivation (rec { enableParallelBuilding = true; + requiredSystemFeatures = [ "big-parallel" ]; meta = { description = "Collection of modular and reusable compiler and toolchain technologies"; homepage = "https://llvm.org/"; From 90c503237a242aaa043cd1b3ddbb81c92a36a9ae Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Thu, 30 Apr 2020 18:21:03 -0700 Subject: [PATCH 65/72] libvorbis: fix 404'ing patch Also use full commit for the other patch, just in case there's ever a collision, as unlikely as that may be. --- pkgs/development/libraries/libvorbis/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libvorbis/default.nix b/pkgs/development/libraries/libvorbis/default.nix index c867b73c317..28c5536d626 100644 --- a/pkgs/development/libraries/libvorbis/default.nix +++ b/pkgs/development/libraries/libvorbis/default.nix @@ -12,12 +12,12 @@ stdenv.mkDerivation rec { patches = [ (fetchpatch { - url = "https://gitlab.xiph.org/xiph/vorbis/uploads/a68cf70fa10c8081a633f77b5c6576b7/0001-CVE-2017-14160-make-sure-we-don-t-overflow.patch"; - sha256 = "0v21p59cb3z77ch1v6q5dcrd733h91f3m8ifnd7kkkr8gzn17d5x"; + url = "https://gitlab.xiph.org/xiph/vorbis/commit/018ca26dece618457dd13585cad52941193c4a25.patch"; + sha256 = "18k4vp0nmrxxpis641ylnw6dgwxrymh5bf74njr6v8dizmmz1bkj"; name = "CVE-2017-14160+CVE-2018-10393.patch"; }) (fetchpatch { - url = "https://gitlab.xiph.org/xiph/vorbis/commit/112d3bd0aaa.diff"; + url = "https://gitlab.xiph.org/xiph/vorbis/commit/112d3bd0aaacad51305e1464d4b381dabad0e88b.diff"; sha256 = "1k77y3q36npy8mkkz40f6cb46l2ldrwyrd191m29s8rnbhnafdf7"; name = "CVE-2018-10392.patch"; }) From 2e9c802cee80e28c1c582cc870a64ad7c389532d Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Thu, 30 Apr 2020 19:57:49 +0200 Subject: [PATCH 66/72] re2c: 1.2.1 -> 1.3 --- pkgs/development/tools/parsing/re2c/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/parsing/re2c/default.nix b/pkgs/development/tools/parsing/re2c/default.nix index dddd407d0da..11c46e781d0 100644 --- a/pkgs/development/tools/parsing/re2c/default.nix +++ b/pkgs/development/tools/parsing/re2c/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "re2c"; - version = "1.2.1"; + version = "1.3"; src = fetchFromGitHub { owner = "skvadrik"; repo = "re2c"; rev = version; - sha256 = "1qj0ck9msb9h8g9qb1lr57jmlj8x68ini3y3ccdifjjahhhr0hd4"; + sha256 = "0aqlf2h6i2m3dq11dkq89p4w4c9kp4x66s5rhp84gmpz5xqv1x5h"; }; nativeBuildInputs = [ autoreconfHook ]; From 7263c895edaa502348eb645bf3c339ea0de185f5 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Thu, 30 Apr 2020 19:57:55 +0200 Subject: [PATCH 67/72] re2c: add patch for CVE-2020-11958 https://nvd.nist.gov/vuln/detail/CVE-2020-11958 --- pkgs/development/tools/parsing/re2c/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/parsing/re2c/default.nix b/pkgs/development/tools/parsing/re2c/default.nix index 11c46e781d0..482beeff122 100644 --- a/pkgs/development/tools/parsing/re2c/default.nix +++ b/pkgs/development/tools/parsing/re2c/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook }: +{ stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }: stdenv.mkDerivation rec { pname = "re2c"; @@ -11,6 +11,14 @@ stdenv.mkDerivation rec { sha256 = "0aqlf2h6i2m3dq11dkq89p4w4c9kp4x66s5rhp84gmpz5xqv1x5h"; }; + patches = [ + (fetchpatch { + name = "CVE-2020-11958.patch"; + url = "https://github.com/skvadrik/re2c/commit/c4603ba5ce229db83a2a4fb93e6d4b4e3ec3776a.patch"; + sha256 = "1d95ahxk92g7k87sda9gxgmr3blyfzwd2y7h9jxj8zkd74knd9zh"; + }) + ]; + nativeBuildInputs = [ autoreconfHook ]; doCheck = true; From b6474577b04a86a27a555dafa676670fb3902ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 29 Apr 2020 15:43:45 +0100 Subject: [PATCH 68/72] python3.pkgs.certifi: 2019.11.28 -> 2020.4.5.1 --- pkgs/development/python-modules/certifi/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/certifi/default.nix b/pkgs/development/python-modules/certifi/default.nix index 04ae5a78bdb..94619956cff 100644 --- a/pkgs/development/python-modules/certifi/default.nix +++ b/pkgs/development/python-modules/certifi/default.nix @@ -5,13 +5,17 @@ buildPythonPackage rec { pname = "certifi"; - version = "2019.11.28"; + version = "2020.4.5.1"; src = fetchPypi { inherit pname version; - sha256 = "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f"; + sha256 = "06b5gfs7wmmipln8f3z928d2mmx2j4b3x7pnqmj6cvmyfh8v7z2i"; }; + pythonImportsCheck = [ "certifi" ]; + + dontUseSetuptoolsCheck = true; + meta = { homepage = "https://certifi.io/"; description = "Python package for providing Mozilla's CA Bundle"; From 3fd0b28f55e71c00138b65f5c64b108e31c176f6 Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 24 Apr 2020 17:09:48 -0700 Subject: [PATCH 69/72] gawk: 5.0.1 -> 5.1.0 --- pkgs/tools/text/gawk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index 58dea610c39..73e2b8a6de4 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -19,11 +19,11 @@ let inherit (stdenv.lib) optional; in stdenv.mkDerivation rec { - name = "gawk-5.0.1"; + name = "gawk-5.1.0"; src = fetchurl { url = "mirror://gnu/gawk/${name}.tar.xz"; - sha256 = "15570p7g2x54asvr2fsc56sxzmm08fbk4mzpcs5n92fp9vq8cklf"; + sha256 = "1gc2cccqy1x1bf6rhwlmd8q7dz7gnam6nwgl38bxapv6qm5flpyg"; }; # When we do build separate interactive version, it makes sense to always include man. From 15cd0bd993a46dfca8223876735cd3fe1228956e Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Tue, 28 Apr 2020 16:17:32 +0200 Subject: [PATCH 70/72] openblas: 0.3.8 -> 0.3.9 --- pkgs/development/libraries/science/math/openblas/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index f6a40204587..53c98046993 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -96,12 +96,12 @@ let in stdenv.mkDerivation rec { pname = "openblas"; - version = "0.3.8"; + version = "0.3.9"; src = fetchFromGitHub { owner = "xianyi"; repo = "OpenBLAS"; rev = "v${version}"; - sha256 = "0s017qqi4n6jzrxl9cyx625wj26smnyn5g8s699s7h8v1srlrw6p"; + sha256 = "0nq51j45shb32n6086xff3x374kx5qhr2cwjzvppx4s2z0ahflal"; }; inherit blas64; From 56de5bed5f1e8af8db7893fb3b456184bf1b63a2 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 5 Apr 2020 16:16:00 +0000 Subject: [PATCH 71/72] glew: 2.1.0 -> 2.2.0 --- pkgs/development/libraries/glew/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/glew/default.nix b/pkgs/development/libraries/glew/default.nix index 8f237199a65..80a7759c574 100644 --- a/pkgs/development/libraries/glew/default.nix +++ b/pkgs/development/libraries/glew/default.nix @@ -4,11 +4,11 @@ with stdenv.lib; stdenv.mkDerivation rec { - name = "glew-2.1.0"; + name = "glew-2.2.0"; src = fetchurl { url = "mirror://sourceforge/glew/${name}.tgz"; - sha256 = "159wk5dc0ykjbxvag5i1m2mhp23zkk6ra04l26y3jc3nwvkr3ph4"; + sha256 = "1qak8f7g1iswgswrgkzc7idk7jmqgwrs58fhg2ai007v7j4q5z6l"; }; outputs = [ "bin" "out" "dev" "doc" ]; From 1825ecc5ede0b5e3caeec9a61e9bdfab7b4ec769 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 1 Apr 2020 09:14:15 +0000 Subject: [PATCH 72/72] c-blosc: 1.17.1 -> 1.18.1 --- pkgs/development/libraries/c-blosc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/c-blosc/default.nix b/pkgs/development/libraries/c-blosc/default.nix index d3bb3479911..85905778e80 100644 --- a/pkgs/development/libraries/c-blosc/default.nix +++ b/pkgs/development/libraries/c-blosc/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "c-blosc"; - version = "1.17.1"; + version = "1.18.1"; src = fetchFromGitHub { owner = "Blosc"; repo = "c-blosc"; rev = "v${version}"; - sha256 = "1asp3xmbvdnz1mj1pl1ykzz61cybvkxz3cdn43zh1z0x1qlgwm80"; + sha256 = "1ywq8j70149859vvs19wgjq89d6xsvvmvm2n1dmkzpchxgrvnw70"; }; buildInputs = [ cmake ];