summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/analysis/checkov/default.nix4
-rw-r--r--pkgs/development/tools/analysis/coan/default.nix4
-rw-r--r--pkgs/development/tools/analysis/codeql/default.nix1
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix3
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_1/default.nix3
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_3/default.nix3
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_4/default.nix3
-rw-r--r--pkgs/development/tools/build-managers/bloop/default.nix3
-rw-r--r--pkgs/development/tools/build-managers/conan/default.nix7
-rw-r--r--pkgs/development/tools/build-managers/wafHook/setup-hook.sh4
-rw-r--r--pkgs/development/tools/ccloud-cli/default.nix2
-rw-r--r--pkgs/development/tools/confluent-cli/default.nix2
-rw-r--r--pkgs/development/tools/database/litecli/default.nix4
-rw-r--r--pkgs/development/tools/database/sqldeveloper/default.nix2
-rw-r--r--pkgs/development/tools/easyjson/default.nix11
-rw-r--r--pkgs/development/tools/easyjson/deps.nix11
-rw-r--r--pkgs/development/tools/git-series/default.nix46
-rw-r--r--pkgs/development/tools/minizinc/default.nix4
-rw-r--r--pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch137
-rw-r--r--pkgs/development/tools/misc/binutils/0001-libtool.m4-update-macos-version-detection-block.patch47
-rw-r--r--pkgs/development/tools/misc/binutils/CVE-2020-35448.patch77
-rw-r--r--pkgs/development/tools/misc/binutils/CVE-2021-3487.patch73
-rw-r--r--pkgs/development/tools/misc/binutils/CVE-2021-45078.patch239
-rw-r--r--pkgs/development/tools/misc/binutils/bfd-elf-Dont-read-non-existing-secondary-relocs.patch26
-rw-r--r--pkgs/development/tools/misc/binutils/build-components-separately.patch67
-rw-r--r--pkgs/development/tools/misc/binutils/default.nix221
-rw-r--r--pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch23
-rw-r--r--pkgs/development/tools/misc/binutils/gold-Update-GNU_PROPERTY_X86_XXX-macros.patch292
-rw-r--r--pkgs/development/tools/misc/clojure-lsp/default.nix6
-rw-r--r--pkgs/development/tools/misc/libtool/libtool2-macos11.patch32
-rw-r--r--pkgs/development/tools/misc/libtool/libtool2.nix26
-rw-r--r--pkgs/development/tools/mold/default.nix4
-rw-r--r--pkgs/development/tools/ocaml/dune/3.nix4
-rw-r--r--pkgs/development/tools/pigeon/default.nix22
-rw-r--r--pkgs/development/tools/pigeon/deps.nix66
-rw-r--r--pkgs/development/tools/quicktemplate/default.nix6
-rw-r--r--pkgs/development/tools/rust/cbindgen/default.nix6
-rw-r--r--pkgs/development/tools/rust/racer/default.nix12
-rw-r--r--pkgs/development/tools/statik/default.nix2
39 files changed, 448 insertions, 1057 deletions
diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix
index d1173e4cbf3..73f32a356f4 100644
--- a/pkgs/development/tools/analysis/checkov/default.nix
+++ b/pkgs/development/tools/analysis/checkov/default.nix
@@ -32,13 +32,13 @@ with py.pkgs;
 
 buildPythonApplication rec {
   pname = "checkov";
-  version = "2.0.1065";
+  version = "2.0.1068";
 
   src = fetchFromGitHub {
     owner = "bridgecrewio";
     repo = pname;
     rev = version;
-    hash = "sha256-q51do9Kbl85p+wOMnFM4QpjezHll8sTmw8vffWcQrRE=";
+    hash = "sha256-/WJiGWBGcVDoiX+FnEbIFaMRxQSnJTqLqHbKlEoCqWU=";
   };
 
   nativeBuildInputs = with py.pkgs; [
diff --git a/pkgs/development/tools/analysis/coan/default.nix b/pkgs/development/tools/analysis/coan/default.nix
index 3ef6c2b8459..b7261705545 100644
--- a/pkgs/development/tools/analysis/coan/default.nix
+++ b/pkgs/development/tools/analysis/coan/default.nix
@@ -11,6 +11,10 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ perl ];
 
+  NIX_CFLAGS_COMPILE = [
+    "-std=c++11"
+  ];
+
   enableParallelBuilding = true;
 
   postInstall = ''
diff --git a/pkgs/development/tools/analysis/codeql/default.nix b/pkgs/development/tools/analysis/codeql/default.nix
index abc2dc24474..2584965499e 100644
--- a/pkgs/development/tools/analysis/codeql/default.nix
+++ b/pkgs/development/tools/analysis/codeql/default.nix
@@ -43,6 +43,7 @@ stdenv.mkDerivation rec {
     description = "Semantic code analysis engine";
     homepage = "https://codeql.github.com";
     maintainers = [ maintainers.dump_stack ];
+    platforms = [ "x86_64-linux" ];
     license = licenses.unfree;
   };
 }
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix
index 0ecf6300eb2..9f2fb8b40f4 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix
@@ -112,7 +112,8 @@ let
 
     src = srcDepsSet."java_tools_javac11_${system}-v4.0.zip";
 
-    nativeBuildInputs = [ autoPatchelfHook unzip ];
+    nativeBuildInputs = [ unzip ]
+      ++ lib.optional stdenv.isLinux autoPatchelfHook;
     buildInputs = [ gcc-unwrapped ];
 
     sourceRoot = ".";
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix
index 3adf52ec905..0402fb85f26 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix
@@ -112,7 +112,8 @@ let
 
     src = srcDepsSet."java_tools_javac11_${system}-v6.1.zip";
 
-    nativeBuildInputs = [ autoPatchelfHook unzip ];
+    nativeBuildInputs = [ unzip ]
+      ++ lib.optional stdenv.isLinux autoPatchelfHook;
     buildInputs = [ gcc-unwrapped ];
 
     sourceRoot = ".";
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix
index 3c71c8cc089..3a5c9e2e76f 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix
@@ -117,7 +117,8 @@ let
 
     src = srcDepsSet."java_tools_javac11_${system}-v10.0.zip";
 
-    nativeBuildInputs = [ autoPatchelfHook unzip ];
+    nativeBuildInputs = [ unzip ]
+      ++ lib.optional stdenv.isLinux autoPatchelfHook;
     buildInputs = [ gcc-unwrapped ];
 
     sourceRoot = ".";
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix
index 72c971d1334..79bb378534b 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix
@@ -142,7 +142,8 @@ let
 
     src = srcDepsSet."java_tools_javac11_${system}-v10.6.zip";
 
-    nativeBuildInputs = [ autoPatchelfHook unzip ];
+    nativeBuildInputs = [ unzip ]
+      ++ lib.optional stdenv.isLinux autoPatchelfHook;
     buildInputs = [ gcc-unwrapped ];
 
     sourceRoot = ".";
diff --git a/pkgs/development/tools/build-managers/bloop/default.nix b/pkgs/development/tools/build-managers/bloop/default.nix
index ab8c5856a1a..0649b0c86c6 100644
--- a/pkgs/development/tools/build-managers/bloop/default.nix
+++ b/pkgs/development/tools/build-managers/bloop/default.nix
@@ -66,7 +66,8 @@ stdenv.mkDerivation rec {
   };
 
   dontUnpack = true;
-  nativeBuildInputs = [ autoPatchelfHook installShellFiles makeWrapper ];
+  nativeBuildInputs = [ installShellFiles makeWrapper ]
+    ++ lib.optional stdenv.isLinux autoPatchelfHook;
   buildInputs = [ stdenv.cc.cc.lib zlib ];
   propagatedBuildInputs = [ jre ];
 
diff --git a/pkgs/development/tools/build-managers/conan/default.nix b/pkgs/development/tools/build-managers/conan/default.nix
index e4a616f9995..8978a0635c8 100644
--- a/pkgs/development/tools/build-managers/conan/default.nix
+++ b/pkgs/development/tools/build-managers/conan/default.nix
@@ -48,6 +48,13 @@ let newPython = python3.override {
         sha256 = "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b";
       };
     });
+    distro = super.distro.overridePythonAttrs (oldAttrs: rec {
+      version = "1.5.0";
+      src = oldAttrs.src.override {
+        inherit version;
+        sha256 = "14nz51cqlnxmgfqqilxyvjwwa5xfivdvlm0d0b1qzgcgwdm7an0f";
+      };
+    });
   };
 };
 
diff --git a/pkgs/development/tools/build-managers/wafHook/setup-hook.sh b/pkgs/development/tools/build-managers/wafHook/setup-hook.sh
index 6cea8fcc2ea..e2f6714a32d 100644
--- a/pkgs/development/tools/build-managers/wafHook/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/wafHook/setup-hook.sh
@@ -10,6 +10,10 @@ wafConfigurePhase() {
         wafConfigureFlags="${prefixKey:---prefix=}$prefix $wafConfigureFlags"
     fi
 
+    if [ -n "${PKG_CONFIG}" ]; then
+      export PKGCONFIG="${PKG_CONFIG}"
+    fi
+
     local flagsArray=(
         "${flagsArray[@]}"
         $wafConfigureFlags "${wafConfigureFlagsArray[@]}"
diff --git a/pkgs/development/tools/ccloud-cli/default.nix b/pkgs/development/tools/ccloud-cli/default.nix
index 5814ab90e6d..2a3d1de41a1 100644
--- a/pkgs/development/tools/ccloud-cli/default.nix
+++ b/pkgs/development/tools/ccloud-cli/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
       sha256 = "0936hipcl37w4mzzsnjlz4q1z4j9094i4irigzqwg14gdbs7p11s";
     });
 
-  nativeBuildInputs = [ autoPatchelfHook ];
+  nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
 
   dontStrip = stdenv.isDarwin;
 
diff --git a/pkgs/development/tools/confluent-cli/default.nix b/pkgs/development/tools/confluent-cli/default.nix
index 9664a75703a..059a3272038 100644
--- a/pkgs/development/tools/confluent-cli/default.nix
+++ b/pkgs/development/tools/confluent-cli/default.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
       sha256 = "1wvy7x56cc7imycf0d83mxcqzdvv56cc0zbp913xgghjn9dl2z7a";
     });
 
-  nativeBuildInputs = [ autoPatchelfHook ];
+  nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
 
   dontStrip = stdenv.isDarwin;
 
diff --git a/pkgs/development/tools/database/litecli/default.nix b/pkgs/development/tools/database/litecli/default.nix
index b2a96ab0dc5..a1c35c88ee8 100644
--- a/pkgs/development/tools/database/litecli/default.nix
+++ b/pkgs/development/tools/database/litecli/default.nix
@@ -4,12 +4,12 @@
 
 python3Packages.buildPythonApplication rec {
   pname = "litecli";
-  version = "1.6.0";
+  version = "1.8.0";
   disabled = python3Packages.pythonOlder "3.4";
 
   src = python3Packages.fetchPypi {
     inherit pname version;
-    sha256 = "sha256-TSdOFHW007syOEg4gwvEqDiJkrfLgRmqjP/H/6oBZ/k=";
+    sha256 = "sha256-AvaSdHlwRlw7rN/o8GjcXZbyXVsrEh+XF37wVTBEED4=";
   };
 
   propagatedBuildInputs = with python3Packages; [
diff --git a/pkgs/development/tools/database/sqldeveloper/default.nix b/pkgs/development/tools/database/sqldeveloper/default.nix
index da43a4daf7d..655156c176c 100644
--- a/pkgs/development/tools/database/sqldeveloper/default.nix
+++ b/pkgs/development/tools/database/sqldeveloper/default.nix
@@ -62,7 +62,7 @@ in
 
     makeWrapper $out/libexec/sqldeveloper/bin/sqldeveloper $out/bin/sqldeveloper \
       --set JAVA_HOME ${jdk.home} \
-      --run "cd $out/libexec/sqldeveloper/bin"
+      --chdir "$out/libexec/sqldeveloper/bin"
   '';
 
   meta = with lib; {
diff --git a/pkgs/development/tools/easyjson/default.nix b/pkgs/development/tools/easyjson/default.nix
index 75bfc1d4c14..270d63ed2a7 100644
--- a/pkgs/development/tools/easyjson/default.nix
+++ b/pkgs/development/tools/easyjson/default.nix
@@ -1,21 +1,22 @@
 { lib, buildGoPackage, fetchFromGitHub }:
 
-buildGoPackage {
+buildGoPackage rec {
   pname = "easyjson";
-  version = "unstable-2019-06-26";
+  version = "0.7.7";
   goPackagePath = "github.com/mailru/easyjson";
+  goDeps = ./deps.nix;
 
   src = fetchFromGitHub {
     owner = "mailru";
     repo = "easyjson";
-    rev = "b2ccc519800e761ac8000b95e5d57c80a897ff9e";
-    sha256 = "0q85h383mhbkcjm2vqm72bi8n2252fv3c56q3lclzb8n2crnjcdk";
+    rev = "v${version}";
+    sha256 = "0clifkvvy8f45rv3cdyv58dglzagyvfcqb63wl6rij30c5j2pzc1";
   };
 
   meta = with lib; {
     homepage = "https://github.com/mailru/easyjson";
     description = "Fast JSON serializer for golang";
     license = licenses.mit;
-    maintainers = with maintainers; [ chiiruno ];
+    maintainers = with maintainers; [ Madouura ];
   };
 }
diff --git a/pkgs/development/tools/easyjson/deps.nix b/pkgs/development/tools/easyjson/deps.nix
new file mode 100644
index 00000000000..d5d7e1f15bc
--- /dev/null
+++ b/pkgs/development/tools/easyjson/deps.nix
@@ -0,0 +1,11 @@
+[
+  {
+    goPackagePath = "github.com/josharian/intern";
+    fetch = {
+      type = "git";
+      url = "https://github.com/josharian/intern";
+      rev = "8e6ff32b3e7c0b018c43953085fe2ac330fe9acd";
+      sha256 = "1za48ppvwd5vg8vv25ldmwz1biwpb3p6qhf8vazhsfdg9m07951c";
+    };
+  }
+]
diff --git a/pkgs/development/tools/git-series/default.nix b/pkgs/development/tools/git-series/default.nix
index 752cefad3c2..31d1c635512 100644
--- a/pkgs/development/tools/git-series/default.nix
+++ b/pkgs/development/tools/git-series/default.nix
@@ -1,54 +1,36 @@
-{ lib, fetchFromGitHub, fetchpatch, rustPlatform
-, openssl, cmake, perl, pkg-config, zlib, curl, libgit2, libssh2
+{ lib, rustPlatform, fetchFromGitHub
+, pkg-config, openssl, zlib, curl, libgit2, libssh2
 }:
 
-with rustPlatform;
-
-buildRustPackage rec {
-  version = "0.9.1";
+rustPlatform.buildRustPackage rec {
   pname = "git-series";
+  version = "unstable-2019-10-15";
 
   src = fetchFromGitHub {
     owner = "git-series";
     repo = "git-series";
-    rev = version;
-    sha256 = "07mgq5h6r1gf3jflbv2khcz32bdazw7z1s8xcsafdarnm13ps014";
+    rev = "c570a015e15214be46a7fd06ba08526622738e20";
+    sha256 = "1i0m2b7ma6xvkg95k57gaj1wpc1rfvka6h8jr5hglxmqqbz6cb6w";
   };
 
-  cargoSha256 = "0870f4rd98fbmyl8524ivfg3xf4qpzb1x68q1idnl47mmf68pyx8";
-
-  cargoPatches = [
-    (fetchpatch {
-      url = "https://github.com/Mic92/git-series/commit/3aa30a47d74ebf90b444dccdf8c153f07f119483.patch";
-      sha256 = "06v8br9skvy75kcw2zgbswxyk82sqzc8smkbqpzmivxlc2i9rnh0";
-    })
-    # Update Cargo.lock to allow using OpenSSL 1.1
-    (fetchpatch {
-      url = "https://github.com/edef1c/git-series/commit/11fe70ffcc18200e5f2a159c36aab070e8ff4228.patch";
-      sha256 = "0clwllf9mrhq86dhzyyhkw1q2ggpgqpw7s05dvp3gj9zhfsyya4s";
-    })
-    # Cargo.lock: Update url, which fixes incompatibility with NLL
-    (fetchpatch {
-      url = "https://github.com/edef1c/git-series/commit/27ff2ecf2d615dae1113709eca0e43596de12ac4.patch";
-      sha256 = "1byjbdcx56nd0bbwz078bl340rk334mb34cvaa58h76byvhpkw10";
-    })
-  ];
+  cargoSha256 = "1hmx14z3098c98achgii0jkcm4474iw762rmib77amcsxj73zzdh";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ openssl zlib curl libgit2 libssh2 ];
 
   LIBGIT2_SYS_USE_PKG_CONFIG = true;
   LIBSSH2_SYS_USE_PKG_CONFIG = true;
-  nativeBuildInputs = [ cmake pkg-config perl ];
-  buildInputs = [ openssl zlib curl libgit2 libssh2 ];
 
-  postBuild = ''
+  postInstall = ''
     install -D "$src/git-series.1" "$out/man/man1/git-series.1"
   '';
 
   meta = with lib; {
     description = "A tool to help with formatting git patches for review on mailing lists";
     longDescription = ''
-          git series tracks changes to a patch series over time. git
-          series also tracks a cover letter for the patch series,
-          formats the series for email, and prepares pull requests.
+      git series tracks changes to a patch series over time. git
+      series also tracks a cover letter for the patch series,
+      formats the series for email, and prepares pull requests.
     '';
     homepage = "https://github.com/git-series/git-series";
 
diff --git a/pkgs/development/tools/minizinc/default.nix b/pkgs/development/tools/minizinc/default.nix
index 131c899dcfb..b74add360be 100644
--- a/pkgs/development/tools/minizinc/default.nix
+++ b/pkgs/development/tools/minizinc/default.nix
@@ -1,7 +1,7 @@
 { lib, stdenv, fetchFromGitHub, cmake, flex, bison }:
 stdenv.mkDerivation rec {
   pname = "minizinc";
-  version = "2.6.1";
+  version = "2.6.2";
 
   nativeBuildInputs = [ cmake flex bison ];
 
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
     owner = "MiniZinc";
     repo = "libminizinc";
     rev = version;
-    sha256 = "sha256-JCR2wvtMNyHBIIqrH5eBc0CIOVyo8mnPUZXtwjJt3sw=";
+    sha256 = "sha256-0yOZZJMDMmIBCJ2ZU3AfGvFSANqHNFN+UHYMI0nogOQ=";
   };
 
   meta = with lib; {
diff --git a/pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch b/pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch
new file mode 100644
index 00000000000..f9c6e88d97b
--- /dev/null
+++ b/pkgs/development/tools/misc/binutils/0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch
@@ -0,0 +1,137 @@
+From beca4a2c25ee86e4020f8b8bddc4d8e0ed3430b3 Mon Sep 17 00:00:00 2001
+From: Andrew Childs <andrew.childs@bibo.com.ph>
+Date: Tue, 22 Feb 2022 11:28:04 +0900
+Subject: [PATCH] Revert "libtool.m4: fix nm BSD flag detection"
+
+This reverts commit bef9ef8ca0f941d743c77cc55b5fe7985990b2a7.
+---
+ ChangeLog  |  9 ------
+ libtool.m4 | 88 ++++++++++++++++++++++++++----------------------------
+ 2 files changed, 43 insertions(+), 54 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 18e8b6835da..c12f07403c3 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -375,15 +375,6 @@
+ 
+ 	* src-release.sh (GDB_SUPPPORT_DIRS): Add libbacktrace.
+ 
+-2021-09-27  Nick Alcock  <nick.alcock@oracle.com>
+-
+-	PR libctf/27967
+-	* libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided
+-	NM, if there is one.  Run nm on itself, not on /dev/null, to avoid
+-	errors from nms that refuse to work on non-regular files.  Remove
+-	other workarounds for this problem.  Strip out blank lines from the
+-	nm output.
+-
+ 2021-09-27  Nick Alcock  <nick.alcock@oracle.com>
+ 
+ 	PR libctf/27967
+diff --git a/libtool.m4 b/libtool.m4
+index a216bb14e99..7a711249304 100644
+--- a/libtool.m4
++++ b/libtool.m4
+@@ -3200,55 +3200,53 @@ _LT_DECL([], [file_magic_cmd], [1],
+ 
+ # LT_PATH_NM
+ # ----------
+-# find the pathname to a BSD- or MS-compatible name lister, and any flags
+-# needed to make it compatible
++# find the pathname to a BSD- or MS-compatible name lister
+ AC_DEFUN([LT_PATH_NM],
+ [AC_REQUIRE([AC_PROG_CC])dnl
+ AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+ [if test -n "$NM"; then
+-   # Let the user override the nm to test.
+-   lt_nm_to_check="$NM"
+- else
+-   lt_nm_to_check="${ac_tool_prefix}nm"
+-   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+-     lt_nm_to_check="$lt_nm_to_check nm"
+-   fi
+- fi
+- for lt_tmp_nm in $lt_nm_to_check; do
+-   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+-   for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+-     IFS="$lt_save_ifs"
+-     test -z "$ac_dir" && ac_dir=.
+-     case "$lt_tmp_nm" in
+-     */*|*\\*) tmp_nm="$lt_tmp_nm";;
+-     *) tmp_nm="$ac_dir/$lt_tmp_nm";;
+-     esac
+-     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+-       # Check to see if the nm accepts a BSD-compat flag.
+-       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+-       #   nm: unknown option "B" ignored
+-       case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
+-       *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
+-	 break
+-	 ;;
+-       *)
+-	 case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
+-	 *$tmp_nm*)
+-	   lt_cv_path_NM="$tmp_nm -p"
+-	   break
+-	   ;;
+-	 *)
+-	   lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+-	   continue # so that we can try to find one that supports BSD flags
+-	   ;;
+-	 esac
+-	 ;;
+-       esac
+-     fi
+-   done
+-   IFS="$lt_save_ifs"
+- done
+- : ${lt_cv_path_NM=no}])
++  # Let the user override the test.
++  lt_cv_path_NM="$NM"
++else
++  lt_nm_to_check="${ac_tool_prefix}nm"
++  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
++    lt_nm_to_check="$lt_nm_to_check nm"
++  fi
++  for lt_tmp_nm in $lt_nm_to_check; do
++    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
++    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
++      IFS="$lt_save_ifs"
++      test -z "$ac_dir" && ac_dir=.
++      tmp_nm="$ac_dir/$lt_tmp_nm"
++      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
++	# Check to see if the nm accepts a BSD-compat flag.
++	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
++	#   nm: unknown option "B" ignored
++	# Tru64's nm complains that /dev/null is an invalid object file
++	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
++	*/dev/null* | *'Invalid file or object type'*)
++	  lt_cv_path_NM="$tmp_nm -B"
++	  break
++	  ;;
++	*)
++	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
++	  */dev/null*)
++	    lt_cv_path_NM="$tmp_nm -p"
++	    break
++	    ;;
++	  *)
++	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
++	    continue # so that we can try to find one that supports BSD flags
++	    ;;
++	  esac
++	  ;;
++	esac
++      fi
++    done
++    IFS="$lt_save_ifs"
++  done
++  : ${lt_cv_path_NM=no}
++fi])
+ if test "$lt_cv_path_NM" != "no"; then
+   NM="$lt_cv_path_NM"
+ else
+-- 
+2.34.1
+
diff --git a/pkgs/development/tools/misc/binutils/0001-libtool.m4-update-macos-version-detection-block.patch b/pkgs/development/tools/misc/binutils/0001-libtool.m4-update-macos-version-detection-block.patch
new file mode 100644
index 00000000000..e601be3a330
--- /dev/null
+++ b/pkgs/development/tools/misc/binutils/0001-libtool.m4-update-macos-version-detection-block.patch
@@ -0,0 +1,47 @@
+From 33a8dc728eb5da3e1d3439c96810d1f6b2660b89 Mon Sep 17 00:00:00 2001
+From: Andrew Childs <andrew.childs@bibo.com.ph>
+Date: Tue, 22 Feb 2022 12:24:46 +0900
+Subject: [PATCH] libtool.m4: update macos version detection block
+
+Includes upstream change
+9e8c882517082fe5755f2524d23efb02f1522490
+---
+ libtool.m4 | 21 ++++++++-------------
+ 1 file changed, 8 insertions(+), 13 deletions(-)
+
+diff --git a/libtool.m4 b/libtool.m4
+index 7a711249304..f452efb4300 100644
+--- a/libtool.m4
++++ b/libtool.m4
+@@ -996,20 +996,15 @@ _LT_EOF
+     ])
+     case $host_os in
+     rhapsody* | darwin1.[[012]])
+-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
++      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+     darwin1.*)
+-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+-    darwin*) # darwin 5.x on
+-      # if running on 10.5 or later, the deployment target defaults
+-      # to the OS version, if on x86, and 10.4, the deployment
+-      # target defaults to 10.4. Don't you love it?
+-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+-	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+-	10.[[012]][[,.]]*)
+-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+-	10.*)
+-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
++      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
++    darwin*)
++      case $MACOSX_DEPLOYMENT_TARGET,$host in
++        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
++          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
++        *)
++          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+       esac
+     ;;
+   esac
+-- 
+2.34.1
+
diff --git a/pkgs/development/tools/misc/binutils/CVE-2020-35448.patch b/pkgs/development/tools/misc/binutils/CVE-2020-35448.patch
deleted file mode 100644
index 2eba7b51849..00000000000
--- a/pkgs/development/tools/misc/binutils/CVE-2020-35448.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 8642dafaef21aa6747cec01df1977e9c52eb4679 Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Fri, 4 Sep 2020 19:19:18 +0930
-Subject: [PATCH] PR26574, heap buffer overflow in
- _bfd_elf_slurp_secondary_reloc_section
-
-A horribly fuzzed object with section headers inside the ELF header.
-Disallow that, and crazy reloc sizes.
-
-	PR 26574
-	* elfcode.h (elf_object_p): Sanity check section header offset.
-	* elf.c (_bfd_elf_slurp_secondary_reloc_section): Sanity check
-	sh_entsize.
----
- bfd/elf.c     | 4 +++-
- bfd/elfcode.h | 8 ++++----
- 3 files changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/bfd/elf.c b/bfd/elf.c
-index ac2095f787d..5a02f8dc309 100644
---- a/bfd/elf.c
-+++ b/bfd/elf.c
-@@ -12576,7 +12576,9 @@ _bfd_elf_slurp_secondary_reloc_section (bfd *      abfd,
-       Elf_Internal_Shdr * hdr = & elf_section_data (relsec)->this_hdr;
- 
-       if (hdr->sh_type == SHT_SECONDARY_RELOC
--	  && hdr->sh_info == (unsigned) elf_section_data (sec)->this_idx)
-+	  && hdr->sh_info == (unsigned) elf_section_data (sec)->this_idx
-+	  && (hdr->sh_entsize == ebd->s->sizeof_rel
-+	      || hdr->sh_entsize == ebd->s->sizeof_rela))
- 	{
- 	  bfd_byte * native_relocs;
- 	  bfd_byte * native_reloc;
-diff --git a/bfd/elfcode.h b/bfd/elfcode.h
-index 2ed2f135c34..606ff64fd4d 100644
---- a/bfd/elfcode.h
-+++ b/bfd/elfcode.h
-@@ -571,7 +571,7 @@ elf_object_p (bfd *abfd)
- 
-   /* If this is a relocatable file and there is no section header
-      table, then we're hosed.  */
--  if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_type == ET_REL)
-+  if (i_ehdrp->e_shoff < sizeof (x_ehdr) && i_ehdrp->e_type == ET_REL)
-     goto got_wrong_format_error;
- 
-   /* As a simple sanity check, verify that what BFD thinks is the
-@@ -581,7 +581,7 @@ elf_object_p (bfd *abfd)
-     goto got_wrong_format_error;
- 
-   /* Further sanity check.  */
--  if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_shnum != 0)
-+  if (i_ehdrp->e_shoff < sizeof (x_ehdr) && i_ehdrp->e_shnum != 0)
-     goto got_wrong_format_error;
- 
-   ebd = get_elf_backend_data (abfd);
-@@ -618,7 +618,7 @@ elf_object_p (bfd *abfd)
-       && ebd->elf_osabi != ELFOSABI_NONE)
-     goto got_wrong_format_error;
- 
--  if (i_ehdrp->e_shoff != 0)
-+  if (i_ehdrp->e_shoff >= sizeof (x_ehdr))
-     {
-       file_ptr where = (file_ptr) i_ehdrp->e_shoff;
- 
-@@ -819,7 +819,7 @@ elf_object_p (bfd *abfd)
- 	}
-     }
- 
--  if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff != 0)
-+  if (i_ehdrp->e_shstrndx != 0 && i_ehdrp->e_shoff >= sizeof (x_ehdr))
-     {
-       unsigned int num_sec;
- 
--- 
-2.27.0
-
-
diff --git a/pkgs/development/tools/misc/binutils/CVE-2021-3487.patch b/pkgs/development/tools/misc/binutils/CVE-2021-3487.patch
deleted file mode 100644
index 004271bd45a..00000000000
--- a/pkgs/development/tools/misc/binutils/CVE-2021-3487.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From: Nick Clifton <nickc@redhat.com>
-Date: Thu, 26 Nov 2020 17:08:33 +0000 (+0000)
-Subject: Prevent a memory allocation failure when parsing corrupt DWARF debug sections.
-X-Git-Tag: binutils-2_36~485
-X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff_plain;h=647cebce12a6b0a26960220caff96ff38978cf24;hp=239ca5e497dda2c151009d664d500086a5c2173a
-
-Prevent a memory allocation failure when parsing corrupt DWARF debug sections.
-
-	PR 26946
-	* dwarf2.c (read_section): Check for debug sections with excessive
-	sizes.
----
-
-diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
-index 977bf43a6a1..8bbfc81d3e7 100644
---- a/bfd/dwarf2.c
-+++ b/bfd/dwarf2.c
-@@ -531,22 +531,24 @@ read_section (bfd *	      abfd,
- 	      bfd_byte **     section_buffer,
- 	      bfd_size_type * section_size)
- {
--  asection *msec;
-   const char *section_name = sec->uncompressed_name;
-   bfd_byte *contents = *section_buffer;
--  bfd_size_type amt;
- 
-   /* The section may have already been read.  */
-   if (contents == NULL)
-     {
-+      bfd_size_type amt;
-+      asection *msec;
-+      ufile_ptr filesize;
-+
-       msec = bfd_get_section_by_name (abfd, section_name);
--      if (! msec)
-+      if (msec == NULL)
- 	{
- 	  section_name = sec->compressed_name;
- 	  if (section_name != NULL)
- 	    msec = bfd_get_section_by_name (abfd, section_name);
- 	}
--      if (! msec)
-+      if (msec == NULL)
- 	{
- 	  _bfd_error_handler (_("DWARF error: can't find %s section."),
- 			      sec->uncompressed_name);
-@@ -554,12 +556,23 @@ read_section (bfd *	      abfd,
- 	  return FALSE;
- 	}
- 
--      *section_size = msec->rawsize ? msec->rawsize : msec->size;
-+      amt = bfd_get_section_limit_octets (abfd, msec);
-+      filesize = bfd_get_file_size (abfd);
-+      if (amt >= filesize)
-+	{
-+	  /* PR 26946 */
-+	  _bfd_error_handler (_("DWARF error: section %s is larger than its filesize! (0x%lx vs 0x%lx)"),
-+			      section_name, (long) amt, (long) filesize);
-+	  bfd_set_error (bfd_error_bad_value);
-+	  return FALSE;
-+	}
-+      *section_size = amt;
-       /* Paranoia - alloc one extra so that we can make sure a string
- 	 section is NUL terminated.  */
--      amt = *section_size + 1;
-+      amt += 1;
-       if (amt == 0)
- 	{
-+	  /* Paranoia - this should never happen.  */
- 	  bfd_set_error (bfd_error_no_memory);
- 	  return FALSE;
- 	}
-
diff --git a/pkgs/development/tools/misc/binutils/CVE-2021-45078.patch b/pkgs/development/tools/misc/binutils/CVE-2021-45078.patch
deleted file mode 100644
index af1c95fac80..00000000000
--- a/pkgs/development/tools/misc/binutils/CVE-2021-45078.patch
+++ /dev/null
@@ -1,239 +0,0 @@
-based on upstream https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=161e87d12167b1e36193385485c1f6ce92f74f02;hp=d5c94731766bf4f276146fd29c1df8eebc2aaf69
-
-adapted by ris to apply to 2.35.2 (simply capitalizing booleans)
-
-diff --git a/binutils/stabs.c b/binutils/stabs.c
-index 274bfb0e7fa..83ee3ea5fa4 100644
---- a/binutils/stabs.c
-+++ b/binutils/stabs.c
-@@ -202,7 +202,7 @@ static debug_type stab_find_type (void *, struct stab_handle *, const int *);
- static bool stab_record_type
-   (void *, struct stab_handle *, const int *, debug_type);
- static debug_type stab_xcoff_builtin_type
--  (void *, struct stab_handle *, int);
-+  (void *, struct stab_handle *, unsigned int);
- static debug_type stab_find_tagged_type
-   (void *, struct stab_handle *, const char *, int, enum debug_type_kind);
- static debug_type *stab_demangle_argtypes
-@@ -3496,166 +3496,167 @@ stab_record_type (void *dhandle ATTRIBUTE_UNUSED, struct stab_handle *info,
- 
- static debug_type
- stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info,
--			 int typenum)
-+			 unsigned int typenum)
- {
-   debug_type rettype;
-   const char *name;
- 
--  if (typenum >= 0 || typenum < -XCOFF_TYPE_COUNT)
-+  typenum = -typenum - 1;
-+  if (typenum >= XCOFF_TYPE_COUNT)
-     {
--      fprintf (stderr, _("Unrecognized XCOFF type %d\n"), typenum);
-+      fprintf (stderr, _("Unrecognized XCOFF type %d\n"), -typenum - 1);
-       return DEBUG_TYPE_NULL;
-     }
--  if (info->xcoff_types[-typenum] != NULL)
--    return info->xcoff_types[-typenum];
-+  if (info->xcoff_types[typenum] != NULL)
-+    return info->xcoff_types[typenum];
- 
--  switch (-typenum)
-+  switch (typenum)
-     {
--    case 1:
-+    case 0:
-       /* The size of this and all the other types are fixed, defined
- 	 by the debugging format.  */
-       name = "int";
-       rettype = debug_make_int_type (dhandle, 4, FALSE);
-       break;
--    case 2:
-+    case 1:
-       name = "char";
-       rettype = debug_make_int_type (dhandle, 1, FALSE);
-       break;
--    case 3:
-+    case 2:
-       name = "short";
-       rettype = debug_make_int_type (dhandle, 2, FALSE);
-       break;
--    case 4:
-+    case 3:
-       name = "long";
-       rettype = debug_make_int_type (dhandle, 4, FALSE);
-       break;
--    case 5:
-+    case 4:
-       name = "unsigned char";
-       rettype = debug_make_int_type (dhandle, 1, TRUE);
-       break;
--    case 6:
-+    case 5:
-       name = "signed char";
-       rettype = debug_make_int_type (dhandle, 1, FALSE);
-       break;
--    case 7:
-+    case 6:
-       name = "unsigned short";
-       rettype = debug_make_int_type (dhandle, 2, TRUE);
-       break;
--    case 8:
-+    case 7:
-       name = "unsigned int";
-       rettype = debug_make_int_type (dhandle, 4, TRUE);
-       break;
--    case 9:
-+    case 8:
-       name = "unsigned";
-       rettype = debug_make_int_type (dhandle, 4, TRUE);
-       break;
--    case 10:
-+    case 9:
-       name = "unsigned long";
-       rettype = debug_make_int_type (dhandle, 4, TRUE);
-       break;
--    case 11:
-+    case 10:
-       name = "void";
-       rettype = debug_make_void_type (dhandle);
-       break;
--    case 12:
-+    case 11:
-       /* IEEE single precision (32 bit).  */
-       name = "float";
-       rettype = debug_make_float_type (dhandle, 4);
-       break;
--    case 13:
-+    case 12:
-       /* IEEE double precision (64 bit).  */
-       name = "double";
-       rettype = debug_make_float_type (dhandle, 8);
-       break;
--    case 14:
-+    case 13:
-       /* This is an IEEE double on the RS/6000, and different machines
- 	 with different sizes for "long double" should use different
- 	 negative type numbers.  See stabs.texinfo.  */
-       name = "long double";
-       rettype = debug_make_float_type (dhandle, 8);
-       break;
--    case 15:
-+    case 14:
-       name = "integer";
-       rettype = debug_make_int_type (dhandle, 4, FALSE);
-       break;
--    case 16:
-+    case 15:
-       name = "boolean";
-       rettype = debug_make_bool_type (dhandle, 4);
-       break;
--    case 17:
-+    case 16:
-       name = "short real";
-       rettype = debug_make_float_type (dhandle, 4);
-       break;
--    case 18:
-+    case 17:
-       name = "real";
-       rettype = debug_make_float_type (dhandle, 8);
-       break;
--    case 19:
-+    case 18:
-       /* FIXME */
-       name = "stringptr";
-       rettype = NULL;
-       break;
--    case 20:
-+    case 19:
-       /* FIXME */
-       name = "character";
-       rettype = debug_make_int_type (dhandle, 1, TRUE);
-       break;
--    case 21:
-+    case 20:
-       name = "logical*1";
-       rettype = debug_make_bool_type (dhandle, 1);
-       break;
--    case 22:
-+    case 21:
-       name = "logical*2";
-       rettype = debug_make_bool_type (dhandle, 2);
-       break;
--    case 23:
-+    case 22:
-       name = "logical*4";
-       rettype = debug_make_bool_type (dhandle, 4);
-       break;
--    case 24:
-+    case 23:
-       name = "logical";
-       rettype = debug_make_bool_type (dhandle, 4);
-       break;
--    case 25:
-+    case 24:
-       /* Complex type consisting of two IEEE single precision values.  */
-       name = "complex";
-       rettype = debug_make_complex_type (dhandle, 8);
-       break;
--    case 26:
-+    case 25:
-       /* Complex type consisting of two IEEE double precision values.  */
-       name = "double complex";
-       rettype = debug_make_complex_type (dhandle, 16);
-       break;
--    case 27:
-+    case 26:
-       name = "integer*1";
-       rettype = debug_make_int_type (dhandle, 1, FALSE);
-       break;
--    case 28:
-+    case 27:
-       name = "integer*2";
-       rettype = debug_make_int_type (dhandle, 2, FALSE);
-       break;
--    case 29:
-+    case 28:
-       name = "integer*4";
-       rettype = debug_make_int_type (dhandle, 4, FALSE);
-       break;
--    case 30:
-+    case 29:
-       /* FIXME */
-       name = "wchar";
-       rettype = debug_make_int_type (dhandle, 2, FALSE);
-       break;
--    case 31:
-+    case 30:
-       name = "long long";
-       rettype = debug_make_int_type (dhandle, 8, FALSE);
-       break;
--    case 32:
-+    case 31:
-       name = "unsigned long long";
-       rettype = debug_make_int_type (dhandle, 8, TRUE);
-       break;
--    case 33:
-+    case 32:
-       name = "logical*8";
-       rettype = debug_make_bool_type (dhandle, 8);
-       break;
--    case 34:
-+    case 33:
-       name = "integer*8";
-       rettype = debug_make_int_type (dhandle, 8, FALSE);
-       break;
-@@ -3664,9 +3665,7 @@ stab_xcoff_builtin_type (void *dhandle, struct stab_handle *info,
-     }
- 
-   rettype = debug_name_type (dhandle, name, rettype);
--
--  info->xcoff_types[-typenum] = rettype;
--
-+  info->xcoff_types[typenum] = rettype;
-   return rettype;
- }
- 
--- 
-2.27.0
-
diff --git a/pkgs/development/tools/misc/binutils/bfd-elf-Dont-read-non-existing-secondary-relocs.patch b/pkgs/development/tools/misc/binutils/bfd-elf-Dont-read-non-existing-secondary-relocs.patch
deleted file mode 100644
index c166066c980..00000000000
--- a/pkgs/development/tools/misc/binutils/bfd-elf-Dont-read-non-existing-secondary-relocs.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-X-Git-Url: https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=bfd%2Felf.c;h=af62aadc3d446cd5b1f0201b207c90c22e7809b1;hp=36733e080dd9d9be28b576b246aaf5bd8c8569c7;hb=84fd26d8209e99fc3a432dd0b09b6c053de1ce65;hpb=abe2a28aaa7a2bfd0f3061c72a98eb898976b721
-
-diff --git a/bfd/elf.c b/bfd/elf.c
-index 36733e080dd..af62aadc3d4 100644
---- a/bfd/elf.c
-+++ b/bfd/elf.c
-@@ -2454,6 +2454,8 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
- 		     "for section %pA found - ignoring"),
- 		   abfd, name, target_sect);
- 	      }
-+	    else
-+	      esdt->has_secondary_relocs = TRUE;
- 	    goto success;
- 	  }
- 
-@@ -12587,6 +12589,9 @@ _bfd_elf_slurp_secondary_reloc_section (bfd *       abfd,
- #endif
-     r_sym = elf32_r_sym;
-   
-+  if (!elf_section_data (sec)->has_secondary_relocs)
-+    return TRUE;
-+
-   /* Discover if there are any secondary reloc sections
-      associated with SEC.  */
-   for (relsec = abfd->sections; relsec != NULL; relsec = relsec->next)
-
diff --git a/pkgs/development/tools/misc/binutils/build-components-separately.patch b/pkgs/development/tools/misc/binutils/build-components-separately.patch
index 38fa4934a28..0b4162d8488 100644
--- a/pkgs/development/tools/misc/binutils/build-components-separately.patch
+++ b/pkgs/development/tools/misc/binutils/build-components-separately.patch
@@ -1,8 +1,8 @@
 diff --git a/bfd/configure.ac b/bfd/configure.ac
-index c5bfbd5d..45ad4c26 100644
+index fec067b2135..377e1f5443f 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,
+@@ -292,30 +292,16 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
  
  LT_LIB_M
  
@@ -21,24 +21,22 @@ index c5bfbd5d..45ad4c26 100644
 -  if test -n "$x"; then
 -    SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
 -  fi
+-fi
 -
+ SHARED_LIBADD="$SHARED_LIBADD $LIBINTL"
+ 
+-if test "$enable_shared" = "yes"; then
    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*)
--    SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl"
-+    SHARED_LIBADD="-liberty -lintl"
+-    SHARED_LIBADD="-L`pwd`/../libiberty -liberty $SHARED_LIBADD -lcygwin -lkernel32"
++    SHARED_LIBADD="-liberty $SHARED_LIBADD -lcygwin -lkernel32"
    ;;
    esac
  
 diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am
-index 4f06074a..6836c589 100644
+index 0e04b4c05c4..848a02662e7 100644
 --- a/opcodes/Makefile.am
 +++ b/opcodes/Makefile.am
 @@ -51,7 +51,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir)
@@ -50,7 +48,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,10 +57,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
- # 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.
+@@ -327,9 +327,18 @@ libopcodes_la_SOURCES =  dis-buf.c disassemble.c dis-init.c
 -libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@
 +libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ libtool-soversion
  libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@
@@ -84,18 +79,19 @@ 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 e564f067334..5da62a3d58b 100644
 --- a/opcodes/configure.ac
 +++ b/opcodes/configure.ac
-@@ -86,6 +86,7 @@ AC_PROG_INSTALL
+@@ -98,6 +98,8 @@ BFD_64_BIT
+ AC_SUBST(HDEFINES)
+ AC_PROG_INSTALL
  
- AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h)
- ACX_HEADER_STRING
 +GCC_HEADER_STDINT(bfd_stdint.h)
- 
++
  AC_CHECK_DECLS([basename, stpcpy])
  
-@@ -137,61 +138,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
+ # Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
+@@ -148,44 +150,21 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed,
  
  LT_LIB_M
  
@@ -122,7 +118,7 @@ index 00be9c88..6e589ae4 100644
 -SHARED_LIBADD=
 +SHARED_LIBADD=-liberty
  SHARED_DEPENDENCIES=
- if test "$enable_shared" = "yes"; then
+-if test "$enable_shared" = "yes"; then
 -# When building a shared libopcodes, link against the pic version of libiberty
 -# so that apps that use libopcodes won't need libiberty just to satisfy any
 -# libopcodes references.
@@ -131,32 +127,27 @@ index 00be9c88..6e589ae4 100644
  # Note that linking against libbfd as we do here, which is itself linked
  # against libiberty, may not satisfy all the libopcodes libiberty references
  # since libbfd may not pull in the entirety of libiberty.
+ # Also, jam libintl into the right place in all of this: after libiberty,
+ # which uses it, but before -lcygwin, which it uses.
 -changequote(,)dnl
 -  x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
 -changequote([,])dnl
 -  if test -n "$x"; then
 -    SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
 -  fi
--
+-fi
+ 
+ SHARED_LIBADD="$SHARED_LIBADD $LIBINTL"
+ 
+@@ -193,11 +172,10 @@ if test "$enable_shared" = "yes"; then
    case "${host}" in
      *-*-cygwin*)
        SHARED_LDFLAGS="-no-undefined"
--      SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin"
-+      SHARED_LIBADD="-lbfd -liberty -lintl -lcygwin"
+-      SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty $SHARED_LIBADD"
++      SHARED_LIBADD="-lbfd -liberty $SHARED_LIBADD"
        ;;
--   *-*-darwin*)
--     SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}"
--     SHARED_DEPENDENCIES="../bfd/libbfd.la"
--     ;;
      *)
--      case "$host_vendor" in
--        hp)
--          SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}"
--	  ;;
--	*)
--          SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}"
--	  ;;
--      esac
+-      SHARED_LIBADD="../bfd/libbfd.la ${SHARED_LIBADD}"
 -      SHARED_DEPENDENCIES="../bfd/libbfd.la"
 +      SHARED_LIBADD="-lbfd ${SHARED_LIBADD}"
        ;;
diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix
index ff89f1ad493..93b018b0d8b 100644
--- a/pkgs/development/tools/misc/binutils/default.nix
+++ b/pkgs/development/tools/misc/binutils/default.nix
@@ -2,65 +2,78 @@ let
   execFormatIsELF = platform: platform.parsed.kernel.execFormat.name == "elf";
 in
 
-{ stdenv, lib, buildPackages
-, fetchFromGitHub, fetchurl, zlib, autoreconfHook, gettext
-# Enabling all targets increases output size to a multiple.
-, withAllTargets ? false, libbfd, libopcodes
-, enableShared ? !stdenv.hostPlatform.isStatic
-, noSysDirs
-, gold ? execFormatIsELF stdenv.targetPlatform
-, bison ? null
+{ stdenv
+, autoreconfHook
+, autoconf269, automake, libtool
+, bison
+, buildPackages
+, fetchFromGitHub
+, fetchurl
 , flex
-, texinfo
+, gettext
+, lib
+, noSysDirs
 , perl
 , substitute
+, texinfo
+, zlib
+
+, enableGold ? execFormatIsELF stdenv.targetPlatform
+, enableShared ? !stdenv.hostPlatform.isStatic
+  # WARN: Enabling all targets increases output size to a multiple.
+, withAllTargets ? false, libbfd, libopcodes
 }:
 
-# configure silently disables ld.gold if it's unsupported,
-# so we need to make sure that intent matches result ourselves.
-assert gold -> execFormatIsELF stdenv.targetPlatform;
+# WARN: configure silently disables ld.gold if it's unsupported, so we need to
+# make sure that intent matches result ourselves.
+assert enableGold -> execFormatIsELF stdenv.targetPlatform;
 
-# Note: this package is used for bootstrapping fetchurl, and thus
-# cannot use fetchpatch! All mutable patches (generated by GitHub or
-# cgit) that are needed here should be included directly in Nixpkgs as
-# files.
 
 let
-  reuseLibs = enableShared && withAllTargets;
-
-  version = "2.35.2";
-  basename = "binutils";
-  # The targetPrefix prepended to binary names to allow multiple binuntils on the
-  # PATH to both be usable.
-  targetPrefix = lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
-                  "${stdenv.targetPlatform.config}-";
-  vc4-binutils-src = fetchFromGitHub {
-    owner = "itszor";
-    repo = "binutils-vc4";
-    rev = "708acc851880dbeda1dd18aca4fd0a95b2573b36";
-    sha256 = "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63";
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  version = "2.38";
+
+  srcs = {
+    normal = fetchurl {
+      url = "mirror://gnu/binutils/binutils-${version}.tar.bz2";
+      sha256 = "sha256-Bw7HHPB3pqWOC5WfBaCaNQFTeMLYpR6Q866r/jBZDvg=";
+    };
+    vc4-none = fetchFromGitHub {
+      owner = "itszor";
+      repo = "binutils-vc4";
+      rev = "708acc851880dbeda1dd18aca4fd0a95b2573b36";
+      sha256 = "1kdrz6fki55lm15rwwamn74fnqpy0zlafsida2zymk76n3656c63";
+    };
   };
-  # 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 = "sha256-z6dkTb7PRZHhNutAfBwdoWV4vSsD8MLorNzroZS7nWE=";
-  });
+
+  #INFO: The targetPrefix prepended to binary names to allow multiple binuntils
+  # on the PATH to both be usable.
+  targetPrefix = lib.optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-";
 in
 
 stdenv.mkDerivation {
-  pname = targetPrefix + basename;
+  pname = targetPrefix + "binutils";
   inherit version;
 
-  src = if stdenv.targetPlatform.isVc4 then vc4-binutils-src else normal-src;
+  # HACK: Ensure that we preserve source from bootstrap binutils to not rebuild LLVM
+  src = stdenv.__bootPackages.binutils-unwrapped.src
+    or srcs.${targetPlatform.system}
+    or srcs.normal;
 
+  # WARN: this package is used for bootstrapping fetchurl, and thus cannot use
+  # fetchpatch! All mutable patches (generated by GitHub or cgit) that are
+  # needed here should be included directly in Nixpkgs as files.
   patches = [
     # Make binutils output deterministic by default.
     ./deterministic.patch
 
-    # Help bfd choose between elf32-littlearm, elf32-littlearm-symbian, and
-    # elf32-littlearm-vxworks in favor of the first.
-    # https://github.com/NixOS/nixpkgs/pull/30484#issuecomment-345472766
-    ./disambiguate-arm-targets.patch
+
+    # Breaks nm BSD flag detection
+    ./0001-Revert-libtool.m4-fix-nm-BSD-flag-detection.patch
+
+    # Required for newer macos versions
+    ./0001-libtool.m4-update-macos-version-detection-block.patch
 
     # For some reason bfd ld doesn't search DT_RPATH when cross-compiling. It's
     # not clear why this behavior was decided upon but it has the unfortunate
@@ -69,40 +82,24 @@ stdenv.mkDerivation {
     # override this behavior, forcing ld to search DT_RPATH even when
     # cross-compiling.
     ./always-search-rpath.patch
-
-    # Fix quadratic slowdown in `strip` performance.
-    # See #129467 and https://sourceware.org/bugzilla/show_bug.cgi?id=28058
-    # Remove when we're on binutils > 2.36.1.
-    # The patch is downloaded from
-    #     https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff_plain;f=bfd/elf.c;h=af62aadc3d446cd5b1f0201b207c90c22e7809b1;hp=36733e080dd9d9be28b576b246aaf5bd8c8569c7;hb=84fd26d8209e99fc3a432dd0b09b6c053de1ce65;hpb=abe2a28aaa7a2bfd0f3061c72a98eb898976b721
-    # which is the 2.36 backport (using `TRUE` instead of `true` of binutils master commit:
-    #     https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=956ea65cd707707c0f725930214cbc781367a831
-    ./bfd-elf-Dont-read-non-existing-secondary-relocs.patch
-
-    # Fix building plv8’s v8.
-    # https://github.com/NixOS/nixpkgs/issues/134190
-    # Obtained from: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=586e30940e640f67bd55bd72e1d1355a4faf8079
-    ./gold-Update-GNU_PROPERTY_X86_XXX-macros.patch
-
-    ./CVE-2020-35448.patch
-    ./CVE-2021-3487.patch
-    ./CVE-2021-45078.patch
-  ] ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch
-    ++ # This patch was suggested by Nick Clifton to fix
-       # https://sourceware.org/bugzilla/show_bug.cgi?id=16177
-       # It can be removed when that 7-year-old bug is closed.
-       # This binutils bug causes GHC to emit broken binaries on armv7, and
-       # indeed GHC will refuse to compile with a binutils suffering from it. See
-       # this comment for more information:
-       # https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333
-       lib.optional (stdenv.targetPlatform.isAarch32 && stdenv.hostPlatform.system != stdenv.targetPlatform.system) ./R_ARM_COPY.patch
-    ++ lib.optional stdenv.targetPlatform.isWindows ./windres-locate-gcc.patch
-    ++ lib.optional stdenv.targetPlatform.isMips64n64
-       # this patch is from debian:
-       # https://sources.debian.org/data/main/b/binutils/2.38-3/debian/patches/mips64-default-n64.diff
-       (if stdenv.targetPlatform.isMusl
-        then substitute { src = ./mips64-default-n64.patch; replacements = [ "--replace" "gnuabi64" "muslabi64" ]; }
-        else ./mips64-default-n64.patch);
+  ]
+  ++ lib.optional targetPlatform.isiOS ./support-ios.patch
+  # This patch was suggested by Nick Clifton to fix
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+  # It can be removed when that 7-year-old bug is closed.
+  # This binutils bug causes GHC to emit broken binaries on armv7, and indeed
+  # GHC will refuse to compile with a binutils suffering from it. See this
+  # comment for more information:
+  # https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333
+  ++ lib.optional (targetPlatform.isAarch32 && hostPlatform.system != targetPlatform.system) ./R_ARM_COPY.patch
+  ++ lib.optional stdenv.targetPlatform.isWindows ./windres-locate-gcc.patch
+  ++ lib.optional stdenv.targetPlatform.isMips64n64
+     # this patch is from debian:
+     # https://sources.debian.org/data/main/b/binutils/2.38-3/debian/patches/mips64-default-n64.diff
+     (if stdenv.targetPlatform.isMusl
+      then substitute { src = ./mips64-default-n64.patch; replacements = [ "--replace" "gnuabi64" "muslabi64" ]; }
+      else ./mips64-default-n64.patch)
+  ;
 
   outputs = [ "out" "info" "man" ];
 
@@ -111,14 +108,26 @@ stdenv.mkDerivation {
     bison
     perl
     texinfo
-  ] ++ (lib.optionals stdenv.targetPlatform.isiOS [
-    autoreconfHook
-  ]) ++ lib.optionals stdenv.targetPlatform.isVc4 [ flex ];
+  ]
+  ++ lib.optionals targetPlatform.isiOS [ autoreconfHook ]
+  ++ lib.optionals buildPlatform.isDarwin [ autoconf269 automake gettext libtool ]
+  ++ lib.optionals targetPlatform.isVc4 [ flex ]
+  ;
+
   buildInputs = [ zlib gettext ];
 
   inherit noSysDirs;
 
-  preConfigure = ''
+  preConfigure = (lib.optionalString buildPlatform.isDarwin ''
+    for i in */configure.ac; do
+      pushd "$(dirname "$i")"
+      echo "Running autoreconf in $PWD"
+      # autoreconf doesn't work, don't know why
+      # autoreconf ''${autoreconfFlags:---install --force --verbose}
+      autoconf
+      popd
+    done
+  '') + ''
     # Clear the default library search path.
     if test "$noSysDirs" = "1"; then
         echo 'NATIVE_LIB_DIRS=' >> ld/configure.tgt
@@ -133,7 +142,8 @@ stdenv.mkDerivation {
 
   # As binutils takes part in the stdenv building, we don't want references
   # to the bootstrap-tools libgcc (as uses to happen on arm/mips)
-  NIX_CFLAGS_COMPILE = if stdenv.hostPlatform.isDarwin
+  NIX_CFLAGS_COMPILE =
+    if hostPlatform.isDarwin
     then "-Wno-string-plus-int -Wno-deprecated-declarations"
     else "-static-libgcc";
 
@@ -141,11 +151,7 @@ stdenv.mkDerivation {
 
   configurePlatforms = [ "build" "host" "target" ];
 
-  configureFlags =
-    (if enableShared then [ "--enable-shared" "--disable-static" ]
-                     else [ "--disable-shared" "--enable-static" ])
-  ++ lib.optional withAllTargets "--enable-targets=all"
-  ++ [
+  configureFlags = [
     "--enable-64-bit-bfd"
     "--with-system-zlib"
 
@@ -158,35 +164,40 @@ stdenv.mkDerivation {
     # RUNPATH can be overriden using LD_LIBRARY_PATH at runtime.
     "--enable-new-dtags"
 
-    # force target prefix. Some versions of binutils will make it empty
-    # if `--host` and `--target` are too close, even if Nixpkgs thinks
-    # the platforms are different (e.g. because not all the info makes
-    # the `config`). Other versions of binutils will always prefix if
-    # `--target` is passed, even if `--host` and `--target` are the same.
-    # The easiest thing for us to do is not leave it to chance, and force
-    # the program prefix to be what we want it to be.
+    # force target prefix. Some versions of binutils will make it empty if
+    # `--host` and `--target` are too close, even if Nixpkgs thinks the
+    # platforms are different (e.g. because not all the info makes the
+    # `config`). Other versions of binutils will always prefix if `--target` is
+    # passed, even if `--host` and `--target` are the same. The easiest thing
+    # for us to do is not leave it to chance, and force the program prefix to be
+    # what we want it to be.
     "--program-prefix=${targetPrefix}"
-  ] ++ lib.optionals gold [
-    "--enable-gold"
-    "--enable-plugins"
-  ];
-
-  doCheck = false; # fails
-
-  postFixup = lib.optionalString reuseLibs ''
+  ]
+  ++ lib.optionals withAllTargets [ "--enable-targets=all" ]
+  ++ lib.optionals enableGold [ "--enable-gold" "--enable-plugins" ]
+  ++ (if enableShared
+      then [ "--enable-shared" "--disable-static" ]
+      else [ "--disable-shared" "--enable-static" ])
+  ;
+
+  # Fails
+  doCheck = false;
+
+  postFixup = lib.optionalString (enableShared && withAllTargets) ''
     rm "$out"/lib/lib{bfd,opcodes}-${version}.so
     ln -s '${lib.getLib libbfd}/lib/libbfd-${version}.so' "$out/lib/"
     ln -s '${lib.getLib libopcodes}/lib/libopcodes-${version}.so' "$out/lib/"
   '';
 
-  # else fails with "./sanity.sh: line 36: $out/bin/size: not found"
-  doInstallCheck = stdenv.buildPlatform == stdenv.hostPlatform && stdenv.hostPlatform == stdenv.targetPlatform;
+  # INFO: Otherwise it fails with:
+  # `./sanity.sh: line 36: $out/bin/size: not found`
+  doInstallCheck = (buildPlatform == hostPlatform) && (hostPlatform == targetPlatform);
 
   enableParallelBuilding = true;
 
   passthru = {
     inherit targetPrefix;
-    hasGold = gold;
+    hasGold = enableGold;
     isGNU = true;
   };
 
@@ -200,11 +211,11 @@ stdenv.mkDerivation {
     '';
     homepage = "https://www.gnu.org/software/binutils/";
     license = licenses.gpl3Plus;
-    maintainers = with maintainers; [ ericson2314 ];
+    maintainers = with maintainers; [ ericson2314 lovesegfault ];
     platforms = platforms.unix;
 
-    /* Give binutils a lower priority than gcc-wrapper to prevent a
-       collision due to the ld/as wrappers/symlinks in the latter. */
+    # INFO: Give binutils a lower priority than gcc-wrapper to prevent a
+    # collision due to the ld/as wrappers/symlinks in the latter.
     priority = 10;
   };
 }
diff --git a/pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch b/pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch
deleted file mode 100644
index abbfa73da05..00000000000
--- a/pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
-index 9f956d3..f5b61f1 100644
---- a/bfd/elf32-arm.c
-+++ b/bfd/elf32-arm.c
-@@ -19585,7 +19585,10 @@ elf32_arm_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
- #undef  ELF_MAXPAGESIZE
- #define ELF_MAXPAGESIZE			0x1000
- 
-+/* Prioritize elf32-*arm (priority 1) over elf32-*arm-vxworks (priority 2) */
-+#define elf_match_priority 2
- #include "elf32-target.h"
-+#undef  elf_match_priority
- 
- 
- /* Merge backend specific data from an object file to the output
-@@ -19974,4 +19977,7 @@ elf32_arm_symbian_plt_sym_val (bfd_vma i, const asection *plt,
- #undef  ELF_MAXPAGESIZE
- #define ELF_MAXPAGESIZE			0x8000
- 
-+/* Prioritize elf32-*arm (priority 1) over elf32-*arm-symbian (priority 2) */
-+#define elf_match_priority 2
- #include "elf32-target.h"
-+#undef  elf_match_priority
diff --git a/pkgs/development/tools/misc/binutils/gold-Update-GNU_PROPERTY_X86_XXX-macros.patch b/pkgs/development/tools/misc/binutils/gold-Update-GNU_PROPERTY_X86_XXX-macros.patch
deleted file mode 100644
index c4eef87a0c8..00000000000
--- a/pkgs/development/tools/misc/binutils/gold-Update-GNU_PROPERTY_X86_XXX-macros.patch
+++ /dev/null
@@ -1,292 +0,0 @@
-From 586e30940e640f67bd55bd72e1d1355a4faf8079 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Tue, 13 Oct 2020 05:20:49 -0700
-Subject: [PATCH] gold: Update GNU_PROPERTY_X86_XXX macros
-
-This patch updates GNU_PROPERTY_X86_XXX macros for gold:
-
-1. GNU_PROPERTY_X86_UINT32_AND_XXX: A 4-byte unsigned integer property.
-A bit is set if it is set in all relocatable inputs:
-
- #define GNU_PROPERTY_X86_UINT32_AND_LO      0xc0000002
- #define GNU_PROPERTY_X86_UINT32_AND_HI      0xc0007fff
-
-2. GNU_PROPERTY_X86_UINT32_OR_XXX: A 4-byte unsigned integer property.
-A bit is set if it is set in any relocatable inputs:
-
- #define GNU_PROPERTY_X86_UINT32_OR_LO    0xc0008000
- #define GNU_PROPERTY_X86_UINT32_OR_HI    0xc000ffff
-
-3. GNU_PROPERTY_X86_UINT32_OR_AND_XXX: A 4-byte unsigned integer property.
-A bit is set if it is set in any relocatable inputs and the property is
-present in all relocatable inputs:
-
- #define GNU_PROPERTY_X86_UINT32_OR_AND_LO   0xc0010000
- #define GNU_PROPERTY_X86_UINT32_OR_AND_HI   0xc0017fff
-
-4. GNU_PROPERTY_X86_FEATURE_2_NEEDED, GNU_PROPERTY_X86_FEATURE_2_USED
-and GNU_PROPERTY_X86_FEATURE_2_XXX bits.
-
-GNU_PROPERTY_X86_FEATURE_1_AND is unchanged.  GNU_PROPERTY_X86_ISA_1_USED
-and GNU_PROPERTY_X86_ISA_1_NEEDED are updated to better support targeted
-processors since GNU_PROPERTY_X86_ISA_1_?86 aren't isn't very useful.
-A new set of GNU_PROPERTY_X86_ISA_1_XXX bits are defined.  The previous
-GNU_PROPERTY_X86_ISA_1_XXX macros are deprecated and renamed to
-GNU_PROPERTY_X86_COMPAT_ISA_1_XXX and GNU_PROPERTY_X86_COMPAT_2_ISA_1_XXX.
-
-elfcpp/
-
-	* elfcpp.h (GNU_PROPERTY_X86_ISA_1_USED): Renamed to ...
-	(GNU_PROPERTY_X86_COMPAT_ISA_1_USED): This.
-	(GNU_PROPERTY_X86_ISA_1_NEEDED): Renamed to ...
-	(GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED): This.
-	(GNU_PROPERTY_X86_UINT32_AND_LO): New.
-	(GNU_PROPERTY_X86_UINT32_AND_HI): Likewise.
-	(GNU_PROPERTY_X86_UINT32_OR_LO): Likewise.
-	(GNU_PROPERTY_X86_UINT32_OR_HI): Likewise.
-	(GNU_PROPERTY_X86_UINT32_OR_AND_LO): Likewise.
-	(GNU_PROPERTY_X86_UINT32_OR_AND_HI): Likewise.
-	(GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED): New.
-	(GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED): Likewise.
-	(GNU_PROPERTY_X86_FEATURE_1_AND): Updated to
-	(GNU_PROPERTY_X86_UINT32_AND_LO + 0).
-	(GNU_PROPERTY_X86_ISA_1_NEEDED): New.  Defined to
-	GNU_PROPERTY_X86_UINT32_OR_LO + 2.
-	(GNU_PROPERTY_X86_FEATURE_2_NEEDED): New.  Defined to
-	(GNU_PROPERTY_X86_UINT32_OR_LO + 1).
-	(GNU_PROPERTY_X86_ISA_1_USED): New.  Defined to
-	GNU_PROPERTY_X86_UINT32_OR_AND_LO + 2.
-	(GNU_PROPERTY_X86_FEATURE_2_USED): New.  Defined to
-	(GNU_PROPERTY_X86_UINT32_OR_AND_LO + 1).
-
-gold/
-
-	* x86_64.cc (Target_x86_64::Target_x86_64): Initialize
-	feature_2_used_, feature_2_needed_ and object_feature_2_used_.
-	(Target_x86_64::feature_2_used_): New data member.
-	(Target_x86_64::feature_2_needed_): Likewise.
-	(Target_x86_64::object_isa_1_used_): Likewise.
-	(Target_x86_64::record_gnu_property): Support
-	GNU_PROPERTY_X86_COMPAT_ISA_1_USED,
-	GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED,
-	GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED,
-	GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED,
-	GNU_PROPERTY_X86_FEATURE_2_USED and
-	GNU_PROPERTY_X86_FEATURE_2_NEEDED.
-	(Target_x86_64::merge_gnu_properties): Merge FEATURE_2_USED bits.
-	Initialize object_feature_2_used_.
-	(Target_x86_64::do_finalize_gnu_properties): Support
-	GNU_PROPERTY_X86_FEATURE_2_USED and
-	GNU_PROPERTY_X86_FEATURE_2_NEEDED.
-	* testsuite/gnu_property_a.S (GNU_PROPERTY_X86_ISA_1_USED): Set
-	to 0xc0010002.
-	(GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002.
-	* testsuite/gnu_property_b.S (GNU_PROPERTY_X86_ISA_1_USED): Set
-	to 0xc0010002.
-	(GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002.
-	* testsuite/gnu_property_c.S (GNU_PROPERTY_X86_ISA_1_USED): Set
-	to 0xc0010002.
-	(GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002.
-	* testsuite/gnu_property_test.sh: Updated.
----
- elfcpp/ChangeLog                    | [omitted]
- elfcpp/elfcpp.h                     | 18 ++++++++++++---
- gold/ChangeLog                      | [omitted]
- gold/testsuite/gnu_property_a.S     |  4 ++--
- gold/testsuite/gnu_property_b.S     |  4 ++--
- gold/testsuite/gnu_property_c.S     |  4 ++--
- gold/testsuite/gnu_property_test.sh |  4 ++--
- gold/x86_64.cc                      | 34 +++++++++++++++++++++++++++--
- 8 files changed, 110 insertions(+), 13 deletions(-)
-
-diff --git a/elfcpp/elfcpp.h b/elfcpp/elfcpp.h
-index 65d803c00e2..4b6ff94a654 100644
---- a/elfcpp/elfcpp.h
-+++ b/elfcpp/elfcpp.h
-@@ -1013,9 +1013,21 @@ enum
-   GNU_PROPERTY_STACK_SIZE = 1,
-   GNU_PROPERTY_NO_COPY_ON_PROTECTED = 2,
-   GNU_PROPERTY_LOPROC = 0xc0000000,
--  GNU_PROPERTY_X86_ISA_1_USED = 0xc0000000,
--  GNU_PROPERTY_X86_ISA_1_NEEDED = 0xc0000001,
--  GNU_PROPERTY_X86_FEATURE_1_AND = 0xc0000002,
-+  GNU_PROPERTY_X86_COMPAT_ISA_1_USED = 0xc0000000,
-+  GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED = 0xc0000001,
-+  GNU_PROPERTY_X86_UINT32_AND_LO = 0xc0000002,
-+  GNU_PROPERTY_X86_UINT32_AND_HI = 0xc0007fff,
-+  GNU_PROPERTY_X86_UINT32_OR_LO = 0xc0008000,
-+  GNU_PROPERTY_X86_UINT32_OR_HI = 0xc000ffff,
-+  GNU_PROPERTY_X86_UINT32_OR_AND_LO = 0xc0010000,
-+  GNU_PROPERTY_X86_UINT32_OR_AND_HI = 0xc0017fff,
-+  GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED = GNU_PROPERTY_X86_UINT32_OR_LO + 0,
-+  GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED = GNU_PROPERTY_X86_UINT32_OR_AND_LO + 0,
-+  GNU_PROPERTY_X86_FEATURE_1_AND = GNU_PROPERTY_X86_UINT32_AND_LO + 0,
-+  GNU_PROPERTY_X86_ISA_1_NEEDED = GNU_PROPERTY_X86_UINT32_OR_LO + 2,
-+  GNU_PROPERTY_X86_FEATURE_2_NEEDED = GNU_PROPERTY_X86_UINT32_OR_LO + 1,
-+  GNU_PROPERTY_X86_ISA_1_USED = GNU_PROPERTY_X86_UINT32_OR_AND_LO + 2,
-+  GNU_PROPERTY_X86_FEATURE_2_USED = GNU_PROPERTY_X86_UINT32_OR_AND_LO + 1,
-   GNU_PROPERTY_HIPROC = 0xdfffffff,
-   GNU_PROPERTY_LOUSER = 0xe0000000,
-   GNU_PROPERTY_HIUSER = 0xffffffff
-diff --git a/gold/testsuite/gnu_property_a.S b/gold/testsuite/gnu_property_a.S
-index 463bc8e52fe..5fbbbc9c4bb 100644
---- a/gold/testsuite/gnu_property_a.S
-+++ b/gold/testsuite/gnu_property_a.S
-@@ -1,8 +1,8 @@
- #define NT_GNU_PROPERTY_TYPE_0 5
- 
- #define GNU_PROPERTY_STACK_SIZE 1
--#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000
--#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001
-+#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002
-+#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002
- #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002
- 
- #if __SIZEOF_PTRDIFF_T__  == 8
-diff --git a/gold/testsuite/gnu_property_b.S b/gold/testsuite/gnu_property_b.S
-index 0c0c038ead1..7028f73d7ab 100644
---- a/gold/testsuite/gnu_property_b.S
-+++ b/gold/testsuite/gnu_property_b.S
-@@ -2,8 +2,8 @@
- 
- #define GNU_PROPERTY_STACK_SIZE 1
- #define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2
--#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000
--#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001
-+#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002
-+#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002
- #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002
- 
- #if __SIZEOF_PTRDIFF_T__  == 8
-diff --git a/gold/testsuite/gnu_property_c.S b/gold/testsuite/gnu_property_c.S
-index ace159a9a9d..c8cbd8bce28 100644
---- a/gold/testsuite/gnu_property_c.S
-+++ b/gold/testsuite/gnu_property_c.S
-@@ -2,8 +2,8 @@
- 
- #define GNU_PROPERTY_STACK_SIZE 1
- #define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2
--#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000
--#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001
-+#define GNU_PROPERTY_X86_ISA_1_USED 0xc0010002
-+#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0008002
- #define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002
- 
- #if __SIZEOF_PTRDIFF_T__  == 8
-diff --git a/gold/testsuite/gnu_property_test.sh b/gold/testsuite/gnu_property_test.sh
-index 1806d3474cc..a4096005b78 100755
---- a/gold/testsuite/gnu_property_test.sh
-+++ b/gold/testsuite/gnu_property_test.sh
-@@ -77,8 +77,8 @@ check_count gnu_property_test.stdout "^  NOTE" 2
- 
- check gnu_property_test.stdout "stack size: 0x111100"
- check gnu_property_test.stdout "no copy on protected"
--check gnu_property_test.stdout "x86 ISA used: i486, SSE2, SSE4_2, AVX512CD"
--check gnu_property_test.stdout "x86 ISA needed: i486, SSE2, SSE4_2, AVX512CD"
-+check gnu_property_test.stdout "x86 ISA used: x86-64-v2, <unknown: 10>, <unknown: 100>, <unknown: 1000>"
-+check gnu_property_test.stdout "x86 ISA needed: x86-64-v2, <unknown: 10>, <unknown: 100>, <unknown: 1000>"
- check gnu_property_test.stdout "x86 feature: IBT"
- 
- exit 0
-diff --git a/gold/x86_64.cc b/gold/x86_64.cc
-index 9cb2cf0a322..378bac16f78 100644
---- a/gold/x86_64.cc
-+++ b/gold/x86_64.cc
-@@ -706,8 +706,9 @@ class Target_x86_64 : public Sized_target<size, false>
-       rela_irelative_(NULL), copy_relocs_(elfcpp::R_X86_64_COPY),
-       got_mod_index_offset_(-1U), tlsdesc_reloc_info_(),
-       tls_base_symbol_defined_(false), isa_1_used_(0), isa_1_needed_(0),
--      feature_1_(0), object_isa_1_used_(0), object_feature_1_(0),
--      seen_first_object_(false)
-+      feature_1_(0), feature_2_used_(0), feature_2_needed_(0),
-+      object_isa_1_used_(0), object_feature_1_(0),
-+      object_feature_2_used_(0), seen_first_object_(false)
-   { }
- 
-   // Hook for a new output section.
-@@ -1382,6 +1383,8 @@ class Target_x86_64 : public Sized_target<size, false>
-   uint32_t isa_1_used_;
-   uint32_t isa_1_needed_;
-   uint32_t feature_1_;
-+  uint32_t feature_2_used_;
-+  uint32_t feature_2_needed_;
-   // Target-specific properties from the current object.
-   // These bits get ORed into ISA_1_USED_ after all properties for the object
-   // have been processed. But if either is all zeroes (as when the property
-@@ -1391,6 +1394,7 @@ class Target_x86_64 : public Sized_target<size, false>
-   // These bits get ANDed into FEATURE_1_ after all properties for the object
-   // have been processed.
-   uint32_t object_feature_1_;
-+  uint32_t object_feature_2_used_;
-   // Whether we have seen our first object, for use in initializing FEATURE_1_.
-   bool seen_first_object_;
- };
-@@ -1594,9 +1598,15 @@ Target_x86_64<size>::record_gnu_property(
- 
-   switch (pr_type)
-     {
-+    case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_USED:
-+    case elfcpp::GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED:
-+    case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED:
-+    case elfcpp::GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED:
-     case elfcpp::GNU_PROPERTY_X86_ISA_1_USED:
-     case elfcpp::GNU_PROPERTY_X86_ISA_1_NEEDED:
-     case elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND:
-+    case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED:
-+    case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED:
-       if (pr_datasz != 4)
- 	{
- 	  gold_warning(_("%s: corrupt .note.gnu.property section "
-@@ -1625,6 +1635,12 @@ Target_x86_64<size>::record_gnu_property(
-       // If we see multiple feature props in one object, OR them together.
-       this->object_feature_1_ |= val;
-       break;
-+    case elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED:
-+      this->object_feature_2_used_ |= val;
-+      break;
-+    case elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED:
-+      this->feature_2_needed_ |= val;
-+      break;
-     }
- }
- 
-@@ -1642,15 +1658,23 @@ Target_x86_64<size>::merge_gnu_properties(const Object*)
-       else if (this->isa_1_used_ != 0)
- 	this->isa_1_used_ |= this->object_isa_1_used_;
-       this->feature_1_ &= this->object_feature_1_;
-+      // If any object is missing the FEATURE_2_USED property, we must
-+      // omit it from the output file.
-+      if (this->object_feature_2_used_ == 0)
-+	this->feature_2_used_ = 0;
-+      else if (this->feature_2_used_ != 0)
-+	this->feature_2_used_ |= this->object_feature_2_used_;
-     }
-   else
-     {
-       this->isa_1_used_ = this->object_isa_1_used_;
-       this->feature_1_ = this->object_feature_1_;
-+      this->feature_2_used_ = this->object_feature_2_used_;
-       this->seen_first_object_ = true;
-     }
-   this->object_isa_1_used_ = 0;
-   this->object_feature_1_ = 0;
-+  this->object_feature_2_used_ = 0;
- }
- 
- static inline void
-@@ -1676,6 +1700,12 @@ Target_x86_64<size>::do_finalize_gnu_properties(Layout* layout) const
-   if (this->feature_1_ != 0)
-     add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_1_AND,
- 		 this->feature_1_);
-+  if (this->feature_2_used_ != 0)
-+    add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_USED,
-+		 this->feature_2_used_);
-+  if (this->feature_2_needed_ != 0)
-+    add_property(layout, elfcpp::GNU_PROPERTY_X86_FEATURE_2_NEEDED,
-+		 this->feature_2_needed_);
- }
- 
- // Write the first three reserved words of the .got.plt section.
--- 
-2.27.0
-
diff --git a/pkgs/development/tools/misc/clojure-lsp/default.nix b/pkgs/development/tools/misc/clojure-lsp/default.nix
index 307bcd273a4..4dc63d54f14 100644
--- a/pkgs/development/tools/misc/clojure-lsp/default.nix
+++ b/pkgs/development/tools/misc/clojure-lsp/default.nix
@@ -2,18 +2,18 @@
 
 buildGraalvmNativeImage rec {
   pname = "clojure-lsp";
-  version = "2022.03.31-20.00.20";
+  version = "2022.04.18-00.59.32";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = version;
-    sha256 = "sha256-UQA/BXf6hTTxZ504e1faPdS8mKYS8WrY5L/zgaGCxpU=";
+    sha256 = "sha256-14EsJIKYl8TWbDqM9PyVrbs/4EssqXp0EK70RrFz+RE=";
   };
 
   jar = fetchurl {
     url = "https://github.com/clojure-lsp/clojure-lsp/releases/download/${version}/clojure-lsp-standalone.jar";
-    sha256 = "e66689326c39ae74f0e8d9f5a8229c7ebebe010849870a47faf88e81cbaa37e0";
+    sha256 = "d78094b015bd9e671eea2eb89ca0bb3ec58d39802ad1bfdf875b50e1cdd4995e";
   };
 
   extraNativeImageBuildArgs = [
diff --git a/pkgs/development/tools/misc/libtool/libtool2-macos11.patch b/pkgs/development/tools/misc/libtool/libtool2-macos11.patch
deleted file mode 100644
index 1552ae7a949..00000000000
--- a/pkgs/development/tools/misc/libtool/libtool2-macos11.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
----
- m4/libtool.m4 | 13 ++++---------
- 1 file changed, 4 insertions(+), 9 deletions(-)
-
-diff --git a/m4/libtool.m4 b/m4/libtool.m4
-index f2d1f398..b971e8e7 100644
---- a/m4/libtool.m4
-+++ b/m4/libtool.m4
-@@ -1067,16 +1067,11 @@ _LT_EOF
-       _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
-     darwin1.*)
-       _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
--    darwin*) # darwin 5.x on
--      # if running on 10.5 or later, the deployment target defaults
--      # to the OS version, if on x86, and 10.4, the deployment
--      # target defaults to 10.4. Don't you love it?
--      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
--	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
--	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
--	10.[[012]][[,.]]*)
-+    darwin*)
-+      case ${MACOSX_DEPLOYMENT_TARGET},$host in
-+	10.[[012]],*|,*powerpc*)
- 	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
--	10.*)
-+	*)
- 	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-       esac
-     ;;
--- 
-2.24.3 (Apple Git-128)
diff --git a/pkgs/development/tools/misc/libtool/libtool2.nix b/pkgs/development/tools/misc/libtool/libtool2.nix
index 44e4c8665c8..3d15752fc0a 100644
--- a/pkgs/development/tools/misc/libtool/libtool2.nix
+++ b/pkgs/development/tools/misc/libtool/libtool2.nix
@@ -1,4 +1,6 @@
 { lib, stdenv, fetchurl, fetchpatch, autoconf, automake, m4, perl, help2man
+, runtimeShell
+, file
 }:
 
 # Note: this package is used for bootstrapping fetchurl, and thus
@@ -8,20 +10,18 @@
 
 stdenv.mkDerivation rec {
   pname = "libtool";
-  version = "2.4.6";
+  version = "2.4.7";
 
   src = fetchurl {
     url = "mirror://gnu/libtool/${pname}-${version}.tar.gz";
-    sha256 = "1qq61k6lp1fp75xs398yzi6wvbx232l7xbyn3p13cnh27mflvgg3";
+    sha256 = "sha256-BOlsJATqcMWQxUbrpCAqThJyLGQAFsErmy8c49SB6ag=";
   };
 
   outputs = [ "out" "lib" ];
 
-  patches = [
-    # Suport macOS version 11.0
-    # https://lists.gnu.org/archive/html/libtool-patches/2020-06/msg00001.html
-    ./libtool2-macos11.patch
-  ];
+  # FILECMD was added in libtool 2.4.7; previous versions hardwired `/usr/bin/file`
+  #   https://lists.gnu.org/archive/html/autotools-announce/2022-03/msg00000.html
+  FILECMD = "${file}/bin/file";
 
   # Normally we'd use autoreconfHook, but that includes libtoolize.
   postPatch = ''
@@ -34,10 +34,18 @@ stdenv.mkDerivation rec {
     automake
     autoconf
     popd
+  '' +
+  # libtool commit da2e352735722917bf0786284411262195a6a3f6 changed
+  # the shebang from `/bin/sh` (which is a special sandbox exception)
+  # to `/usr/bin/env sh`, meaning that we now need to patch shebangs
+  # in libtoolize and ltmain.sh since `dontPatchShebangs` is set:
+  ''
+    substituteInPlace libtoolize.in       --replace '#! /usr/bin/env sh' '#!${runtimeShell}'
+    substituteInPlace build-aux/ltmain.in --replace '#! /usr/bin/env sh' '#!${runtimeShell}'
   '';
 
-  nativeBuildInputs = [ perl help2man m4 ] ++ [ autoconf automake ];
-  propagatedBuildInputs = [ m4 ];
+  nativeBuildInputs = [ autoconf automake help2man m4 perl ];
+  propagatedBuildInputs = [ m4 file ];
 
   # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the
   # "fixed" path in generated files!
diff --git a/pkgs/development/tools/mold/default.nix b/pkgs/development/tools/mold/default.nix
index db1c13da2f9..491afd68bbb 100644
--- a/pkgs/development/tools/mold/default.nix
+++ b/pkgs/development/tools/mold/default.nix
@@ -41,6 +41,8 @@ stdenv.mkDerivation rec {
     homepage = "https://github.com/rui314/mold";
     license = lib.licenses.agpl3Plus;
     maintainers = with maintainers; [ nitsky ];
-    broken = stdenv.isAarch64;
+    platforms = platforms.unix;
+    # error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
+    broken = stdenv.isAarch64 || stdenv.isDarwin;
   };
 }
diff --git a/pkgs/development/tools/ocaml/dune/3.nix b/pkgs/development/tools/ocaml/dune/3.nix
index f6f45944a81..a43c88671f8 100644
--- a/pkgs/development/tools/ocaml/dune/3.nix
+++ b/pkgs/development/tools/ocaml/dune/3.nix
@@ -6,11 +6,11 @@ else
 
 stdenv.mkDerivation rec {
   pname = "dune";
-  version = "3.0.3";
+  version = "3.1.0";
 
   src = fetchurl {
     url = "https://github.com/ocaml/dune/releases/download/${version}/fiber-${version}.tbz";
-    sha256 = "sha256-1QRJmhZY8Nmcrvv/1zhvLjHUbOynMWcVf+RobEHlcy8=";
+    sha256 = "sha256-B31SCwhFxW4Q7FhW18ZuvnofG+pKMCfRgvRLJSlRnYE=";
   };
 
   nativeBuildInputs = [ ocaml findlib ];
diff --git a/pkgs/development/tools/pigeon/default.nix b/pkgs/development/tools/pigeon/default.nix
index ae543533059..b94a9f4bfc3 100644
--- a/pkgs/development/tools/pigeon/default.nix
+++ b/pkgs/development/tools/pigeon/default.nix
@@ -1,18 +1,24 @@
-{ lib, buildGoPackage, fetchFromGitHub }:
-buildGoPackage {
-  pname = "pigeon";
-  version = "20190810-f3db42a662";
+{ lib, buildGoModule, fetchFromGitHub }:
 
-  goPackagePath = "github.com/mna/pigeon";
-  goDeps = ./deps.nix;
+buildGoModule rec {
+  pname = "pigeon";
+  version = "1.1.0";
 
   src = fetchFromGitHub {
     owner = "mna";
     repo = "pigeon";
-    rev = "f3db42a662eded7550fc7cd11605d05311dfa30f";
-    sha256 = "1n0zqidwbqqfslrirpbqw14ylgiry6ggcp9ll4h8rf1chqwk6dhv";
+    rev = "v${version}";
+    sha256 = "sha256-0Cp/OnFvVZj9UZgl3F5MCzemBaHI4smGWU46VQnhLOg=";
   };
 
+  vendorSha256 = "sha256-07zoQL4mLPSERBkZ3sz35Av7zdZsjTyGR8zbA86EEjU=";
+
+  proxyVendor = true;
+
+  subPackages = [ "." ];
+
+  doCheck = false;
+
   meta = {
     homepage = "https://github.com/mna/pigeon";
     description = "A PEG parser generator for Go";
diff --git a/pkgs/development/tools/pigeon/deps.nix b/pkgs/development/tools/pigeon/deps.nix
deleted file mode 100644
index d836dc43c7c..00000000000
--- a/pkgs/development/tools/pigeon/deps.nix
+++ /dev/null
@@ -1,66 +0,0 @@
-# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
-[
-  {
-    goPackagePath = "golang.org/x/crypto";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/crypto";
-      rev = "c2843e01d9a2";
-      sha256 = "01xgxbj5r79nmisdvpq48zfy8pzaaj90bn6ngd4nf33j9ar1dp8r";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/net";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/net";
-      rev = "3b0461eec859";
-      sha256 = "0l00c8l0a8xnv6qdpwfzxxsr58jggacgzdrwiprrfx2xqm37b6d5";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/sync";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/sync";
-      rev = "112230192c58";
-      sha256 = "05i2k43j2d0llq768hg5pf3hb2yhfzp9la1w5wp0rsnnzblr0lfn";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/sys";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/sys";
-      rev = "d0b11bdaac8a";
-      sha256 = "18yfsmw622l7gc5sqriv5qmck6903vvhivpzp8i3xfy3z33dybdl";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/text";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/text";
-      rev = "v0.3.0";
-      sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/tools";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/tools";
-      rev = "b29f5f60c37a";
-      sha256 = "118rvb59hc1fykbmif4008rbxw1p0dblc8dxkq96yaapd6p0vbpn";
-    };
-  }
-  {
-    goPackagePath = "golang.org/x/xerrors";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/xerrors";
-      rev = "a985d3407aa7";
-      sha256 = "00wzr5w8aadipgc3rkk8f11i41znskfj9ix5nhhaxyg7isrslgcj";
-    };
-  }
-]
diff --git a/pkgs/development/tools/quicktemplate/default.nix b/pkgs/development/tools/quicktemplate/default.nix
index 747a82740f4..2086464d7b3 100644
--- a/pkgs/development/tools/quicktemplate/default.nix
+++ b/pkgs/development/tools/quicktemplate/default.nix
@@ -2,13 +2,13 @@
 
 buildGoModule rec {
   pname = "quicktemplate";
-  version = "1.6.3";
+  version = "1.7.0";
 
   src = fetchFromGitHub {
     owner = "valyala";
     repo = "quicktemplate";
     rev = "v${version}";
-    sha256 = "mQhrQcKRDtcXha7FIwCIUwWfoPGIJ5YLbA4HdatIdn8=";
+    sha256 = "0xzsvhpllmzmyfg8sj1dpp02826j1plmyrdvqbwryzhf2ci33nqr";
   };
 
   vendorSha256 = null;
@@ -17,7 +17,7 @@ buildGoModule rec {
     homepage = "https://github.com/valyala/quicktemplate";
     description = "Fast, powerful, yet easy to use template engine for Go";
     license = licenses.mit;
-    maintainers = with maintainers; [ chiiruno ];
+    maintainers = with maintainers; [ Madouura ];
     mainProgram = "qtc";
   };
 }
diff --git a/pkgs/development/tools/rust/cbindgen/default.nix b/pkgs/development/tools/rust/cbindgen/default.nix
index 6e8f67bd0a5..a4f02023bb0 100644
--- a/pkgs/development/tools/rust/cbindgen/default.nix
+++ b/pkgs/development/tools/rust/cbindgen/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "rust-cbindgen";
-  version = "0.20.0";
+  version = "0.21.0";
 
   src = fetchFromGitHub {
     owner = "eqrion";
     repo = "cbindgen";
     rev = "v${version}";
-    sha256 = "sha256-BLiAFYkqVJSpeNPW7UF2PpAttd6ADGeQ9yneiVfNi4g=";
+    sha256 = "sha256-WvCGAjFxjaql/y35QfHyHvwbEL4pKtlc3JO2NecqQCM=";
   };
 
-  cargoSha256 = "sha256-P58qANcl0mYqJDP1QnSx560y8BLH+ePTZ+uHuix89R4=";
+  cargoSha256 = "sha256-Kl2/u+ttPn1k7f3+XRCord4u+c4QZ80/Okb40XeyeIk=";
 
   buildInputs = lib.optional stdenv.isDarwin Security;
 
diff --git a/pkgs/development/tools/rust/racer/default.nix b/pkgs/development/tools/rust/racer/default.nix
index f6717b36b20..3fd4f768384 100644
--- a/pkgs/development/tools/rust/racer/default.nix
+++ b/pkgs/development/tools/rust/racer/default.nix
@@ -2,14 +2,14 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "racer";
-  version = "2.1.48";
+  version = "2.2.1";
 
   src = fetchCrate {
     inherit pname version;
-    sha256 = "sha256-lat5s9+AMFI3VXiWqjLESZrtq3IwOZhlt+5BhYoonfA=";
+    sha256 = "sha256-uAVtJwOyhe1lPz+MUUFCgHJPVGuIk/lNUkQWiNdOZ5Y=";
   };
 
-  cargoSha256 = "sha256-jGsvCmrPGVzWdx7V3J4bBK+SF2o+icORmVKuwqYxdh4=";
+  cargoSha256 = "sha256-U2mI1y6t8CwxW/iPcPzxAafu61GNm/XLCKVGuyybV/4=";
 
   nativeBuildInputs = [ makeWrapper ];
   buildInputs = lib.optional stdenv.isDarwin Security;
@@ -32,6 +32,10 @@ rustPlatform.buildRustPackage rec {
     "--skip test_resolve_global_path_in_modules"
   ];
 
+  # [2022-04-06] Its test suite contains two function calls with the
+  # wrong number of arguments, breaking its build.
+  doCheck = false;
+
   doInstallCheck = true;
   installCheckPhase = ''
     $out/bin/racer --version
@@ -42,7 +46,5 @@ rustPlatform.buildRustPackage rec {
     homepage = "https://github.com/racer-rust/racer";
     license = licenses.mit;
     maintainers = with maintainers; [ jagajaga ];
-    # error[E0199]: implementing the trait `Step` is not unsafe
-    broken = true;
   };
 }
diff --git a/pkgs/development/tools/statik/default.nix b/pkgs/development/tools/statik/default.nix
index 48ceea24b70..6befb42c24d 100644
--- a/pkgs/development/tools/statik/default.nix
+++ b/pkgs/development/tools/statik/default.nix
@@ -24,6 +24,6 @@ buildGoModule rec {
     homepage = "https://github.com/rakyll/statik";
     description = "Embed files into a Go executable ";
     license = licenses.asl20;
-    maintainers = with maintainers; [ chiiruno ];
+    maintainers = with maintainers; [ Madouura ];
   };
 }