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/cpplint/default.nix22
-rw-r--r--pkgs/development/tools/build-managers/boot/builder.sh2
-rw-r--r--pkgs/development/tools/build-managers/buck2/default.nix4
-rw-r--r--pkgs/development/tools/build-managers/buck2/hashes.json10
-rw-r--r--pkgs/development/tools/build-managers/meson/default.nix13
-rw-r--r--pkgs/development/tools/build-managers/meson/setup-hook.sh31
-rw-r--r--pkgs/development/tools/build-managers/scons/common.nix2
-rw-r--r--pkgs/development/tools/build-managers/scons/setup-hook.sh22
-rw-r--r--pkgs/development/tools/continuous-integration/buildbot/master.nix2
-rw-r--r--pkgs/development/tools/continuous-integration/dagger/default.nix44
-rw-r--r--pkgs/development/tools/misc/automake/builder.sh2
-rw-r--r--pkgs/development/tools/misc/indent/darwin.patch15
-rw-r--r--pkgs/development/tools/misc/indent/default.nix33
-rw-r--r--pkgs/development/tools/misc/lttng-ust/default.nix4
-rw-r--r--pkgs/development/tools/moq/default.nix4
-rw-r--r--pkgs/development/tools/mysql-shell/innovation.nix130
-rw-r--r--pkgs/development/tools/parsing/antlr/builder.sh2
-rw-r--r--pkgs/development/tools/rust/maturin/default.nix6
18 files changed, 247 insertions, 101 deletions
diff --git a/pkgs/development/tools/analysis/cpplint/default.nix b/pkgs/development/tools/analysis/cpplint/default.nix
index 7be303a52a4..87344d747bf 100644
--- a/pkgs/development/tools/analysis/cpplint/default.nix
+++ b/pkgs/development/tools/analysis/cpplint/default.nix
@@ -1,18 +1,34 @@
-{ lib, python3Packages, fetchFromGitHub }:
+{ lib, python3Packages, fetchFromGitHub, fetchpatch }:
 
 python3Packages.buildPythonApplication rec {
   pname = "cpplint";
   version = "1.5.5";
+  format = "setuptools";
 
   # Fetch from github instead of pypi, since the test cases are not in the pypi archive
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = version;
-    sha256 = "sha256-JXz2Ufo7JSceZVqYwCRkuAsOR08znZlIUk8GCLAyiI4=";
+    hash = "sha256-JXz2Ufo7JSceZVqYwCRkuAsOR08znZlIUk8GCLAyiI4=";
   };
 
-  patches = [ ./0001-Remove-pytest-runner-version-pin.patch ];
+  patches = [
+    ./0001-Remove-pytest-runner-version-pin.patch
+
+    # The patch below stops using the sre_compile module, which was deprecated
+    # in Python 3.11 and replaces it with re.compile. Upstream is unsure if it
+    # should use re.compile or re._compiler.compile, so we should monitor the
+    # thread for updates.
+    #
+    #   https://github.com/cpplint/cpplint/pull/214
+    #
+    (fetchpatch {
+      name = "python-3.11-compatibility.patch";
+      url = "https://github.com/cpplint/cpplint/commit/e84e84f53915ae2a9214e756cf89c573a73bbcd3.patch";
+      hash = "sha256-u57AFWaVmGFSsvSGq1x9gZmTsuZPqXvTC7mTfyb2164=";
+    })
+  ];
 
   postPatch = ''
     patchShebangs cpplint_unittest.py
diff --git a/pkgs/development/tools/build-managers/boot/builder.sh b/pkgs/development/tools/build-managers/boot/builder.sh
index e007cbac958..4506e3f0f86 100644
--- a/pkgs/development/tools/build-managers/boot/builder.sh
+++ b/pkgs/development/tools/build-managers/boot/builder.sh
@@ -1,4 +1,4 @@
-if [ -e .attrs.sh ]; then source .attrs.sh; fi
+if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
 source $stdenv/setup
 
 boot_bin=$out/bin/boot
diff --git a/pkgs/development/tools/build-managers/buck2/default.nix b/pkgs/development/tools/build-managers/buck2/default.nix
index 7fa99a96226..5ae28b1512c 100644
--- a/pkgs/development/tools/build-managers/buck2/default.nix
+++ b/pkgs/development/tools/build-managers/buck2/default.nix
@@ -38,7 +38,7 @@ let
   buildHashes = builtins.fromJSON (builtins.readFile ./hashes.json);
 
   # our version of buck2; this should be a git tag
-  version = "2023-10-01";
+  version = "2023-10-15";
 
   # the platform-specific, statically linked binary — which is also
   # zstd-compressed
@@ -63,7 +63,7 @@ let
   # tooling
   prelude-src =
     let
-      prelude-hash = "75aa81a92edd2bf477538f9a3f0fe6a47e811842";
+      prelude-hash = "880be565178cf1e08ce9badef52b215f91e48479";
       name = "buck2-prelude-${version}.tar.gz";
       hash = buildHashes."_prelude";
       url = "https://github.com/facebook/buck2-prelude/archive/${prelude-hash}.tar.gz";
diff --git a/pkgs/development/tools/build-managers/buck2/hashes.json b/pkgs/development/tools/build-managers/buck2/hashes.json
index 53df40eb622..b444cfeeae0 100644
--- a/pkgs/development/tools/build-managers/buck2/hashes.json
+++ b/pkgs/development/tools/build-managers/buck2/hashes.json
@@ -1,7 +1,7 @@
 { "_comment": "@generated by pkgs/development/tools/build-managers/buck2/update.sh"
-, "_prelude": "sha256-SshYnziEP/2jdoeLZYkQOvH56VBOJZaf0TUt++tLO1U="
-, "x86_64-linux": "sha256-eztjSDjgtXZWeDSPsKNSUGlIR+g8DsByIjDpcGNXB2s="
-, "x86_64-darwin": "sha256-buC0mShgDPU1+oeuNdjP6hNq1MoJDIPaEHCGL+Rcsr8="
-, "aarch64-linux": "sha256-52Ld12TzC51OutjZY+idpd7GhFr2tPksz1pda4F9Zag="
-, "aarch64-darwin": "sha256-b9peYBF9FZbSdMiwC8E/+y15pWlFe37/Euj5v8q3v1E="
+, "_prelude": "sha256-mm9jU74rsLpiMzuDmSih6tzY4+NOiR15j+W96BVe/OI="
+, "x86_64-linux": "sha256-qxymUjsSwCf6ev5TwlkWVGtMc9tj6Vt4yMIPaLHFAMM="
+, "x86_64-darwin": "sha256-DGfpByvL4gmP+CR7VLCZS8IGSJ3esHhuKxHUfXJb/6k="
+, "aarch64-linux": "sha256-zc9LEYmpVJttCTI6Qxm25KZRX8CJVJzVtSbouw0LB6g="
+, "aarch64-darwin": "sha256-HUzpKJQN/22IQYmHLhW0fVQs0f86rREMTlp+yOfK0+Y="
 }
diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix
index aa09a5d2358..f6002a7607c 100644
--- a/pkgs/development/tools/build-managers/meson/default.nix
+++ b/pkgs/development/tools/build-managers/meson/default.nix
@@ -18,13 +18,13 @@
 
 python3.pkgs.buildPythonApplication rec {
   pname = "meson";
-  version = "1.2.0";
+  version = "1.2.2";
 
   src = fetchFromGitHub {
     owner = "mesonbuild";
     repo = "meson";
     rev = "refs/tags/${version}";
-    hash = "sha256-bJAmkE+sL9DqKpcjZdBf4/z9lz+m/o0Z87hlAwbVbTY=";
+    hash = "sha256-SujnalAooIlzKZcjt0E4tSBO0J5QRkSE0X1PVpnbIF4=";
   };
 
   patches = [
@@ -75,6 +75,15 @@ python3.pkgs.buildPythonApplication rec {
         "docs/yaml/objects/dep.yaml"
       ];
     })
+
+    # Revert patch breaking mesa build on bindgen:
+    #   https://github.com/mesonbuild/meson/issues/12326
+    (fetchpatch {
+      name = "bindgen-flags-revert.patch";
+      url = "https://github.com/mesonbuild/meson/commit/d5546bdceaa2f3040d16a33fcbd824ba94b8cfde.patch";
+      hash = "sha256-qOSiWGkjfxJmUfXmqV05yl7wTgAIE0Z7qZqTko9f/LE=";
+      revert = true;
+    })
   ];
 
   setupHook = ./setup-hook.sh;
diff --git a/pkgs/development/tools/build-managers/meson/setup-hook.sh b/pkgs/development/tools/build-managers/meson/setup-hook.sh
index 6305a405af2..21faac529c6 100644
--- a/pkgs/development/tools/build-managers/meson/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/meson/setup-hook.sh
@@ -28,14 +28,39 @@ mesonConfigurePhase() {
         echo "meson: enabled parallel building"
     fi
 
-    if ! [[ -v enableParallelInstalling ]]; then
-        enableParallelInstalling=1
-        echo "meson: enabled parallel installing"
+    if [[ ${checkPhase-ninjaCheckPhase} = ninjaCheckPhase && -z $dontUseMesonCheck ]]; then
+        checkPhase=mesonCheckPhase
+    fi
+    if [[ ${installPhase-ninjaInstallPhase} = ninjaInstallPhase && -z $dontUseMesonInstall ]]; then
+        installPhase=mesonInstallPhase
     fi
 
     runHook postConfigure
 }
 
+mesonCheckPhase() {
+    runHook preCheck
+
+    local flagsArray=($mesonCheckFlags "${mesonCheckFlagsArray[@]}")
+
+    echoCmd 'check flags' "${flagsArray[@]}"
+    meson test --no-rebuild "${flagsArray[@]}"
+
+    runHook postCheck
+}
+
+mesonInstallPhase() {
+    runHook preInstall
+
+    # shellcheck disable=SC2086
+    local flagsArray=($mesonInstallFlags "${mesonInstallFlagsArray[@]}")
+
+    echoCmd 'install flags' "${flagsArray[@]}"
+    meson install --no-rebuild "${flagsArray[@]}"
+
+    runHook postInstall
+}
+
 if [ -z "${dontUseMesonConfigure-}" -a -z "${configurePhase-}" ]; then
     setOutputFlags=
     configurePhase=mesonConfigurePhase
diff --git a/pkgs/development/tools/build-managers/scons/common.nix b/pkgs/development/tools/build-managers/scons/common.nix
index 5b0aff8072c..64890d12cea 100644
--- a/pkgs/development/tools/build-managers/scons/common.nix
+++ b/pkgs/development/tools/build-managers/scons/common.nix
@@ -57,6 +57,6 @@ python.pkgs.buildPythonApplication rec {
     changelog = "https://raw.githubusercontent.com/SConsProject/scons/rel_${version}/src/CHANGES.txt";
     license = licenses.mit;
     platforms = platforms.all;
-    maintainers = [ ];
+    maintainers = with lib.maintainers; [ AndersonTorres ];
   };
 }
diff --git a/pkgs/development/tools/build-managers/scons/setup-hook.sh b/pkgs/development/tools/build-managers/scons/setup-hook.sh
index 67358ee843d..bfd8f3cc07b 100644
--- a/pkgs/development/tools/build-managers/scons/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/scons/setup-hook.sh
@@ -1,3 +1,5 @@
+# shellcheck shell=bash disable=SC2206
+
 sconsBuildPhase() {
     runHook preBuild
 
@@ -15,7 +17,7 @@ sconsBuildPhase() {
       $buildFlags ${buildFlagsArray[@]}
     )
 
-    echoCmd 'build flags' "${flagsArray[@]}"
+    echoCmd 'scons build flags' "${flagsArray[@]}"
     scons "${flagsArray[@]}"
 
     runHook postBuild
@@ -39,7 +41,7 @@ sconsInstallPhase() {
         ${installTargets:-install}
     )
 
-    echoCmd 'install flags' "${flagsArray[@]}"
+    echoCmd 'scons install flags' "${flagsArray[@]}"
     scons "${flagsArray[@]}"
 
     runHook postInstall
@@ -50,9 +52,9 @@ sconsCheckPhase() {
 
     if [ -z "${checkTarget:-}" ]; then
         if scons -n check >/dev/null 2>&1; then
-            checkTarget=check
+            checkTarget="check"
         elif scons -n test >/dev/null 2>&1; then
-            checkTarget=test
+            checkTarget="test"
         fi
     fi
 
@@ -65,21 +67,21 @@ sconsCheckPhase() {
             ${checkFlagsArray[@]}
         )
 
-        echoCmd 'check flags' "${flagsArray[@]}"
+        echoCmd 'scons check flags' "${flagsArray[@]}"
         scons "${flagsArray[@]}"
     fi
 
     runHook postCheck
 }
 
-if [ -z "${buildPhase-}" ]; then
+if [ -z "${dontUseSconsBuild-}" ] && [ -z "${buildPhase-}" ]; then
     buildPhase=sconsBuildPhase
 fi
 
-if [ -z "${dontUseSconsInstall-}" -a -z "${installPhase-}" ]; then
-    installPhase=sconsInstallPhase
+if [ -z "${dontUseSconsCheck-}" ] && [ -z "${checkPhase-}" ]; then
+    checkPhase=sconsCheckPhase
 fi
 
-if [ -z "${checkPhase-}" ]; then
-    checkPhase=sconsCheckPhase
+if [ -z "${dontUseSconsInstall-}" ] && [ -z "${installPhase-}" ]; then
+    installPhase=sconsInstallPhase
 fi
diff --git a/pkgs/development/tools/continuous-integration/buildbot/master.nix b/pkgs/development/tools/continuous-integration/buildbot/master.nix
index a025de299cc..b89f4e4d288 100644
--- a/pkgs/development/tools/continuous-integration/buildbot/master.nix
+++ b/pkgs/development/tools/continuous-integration/buildbot/master.nix
@@ -66,7 +66,7 @@ let
   package = buildPythonApplication rec {
     pname = "buildbot";
     version = "3.9.2";
-    format = "setuptools";
+    format = "pyproject";
 
     disabled = pythonOlder "3.7";
 
diff --git a/pkgs/development/tools/continuous-integration/dagger/default.nix b/pkgs/development/tools/continuous-integration/dagger/default.nix
deleted file mode 100644
index 2b35ac4837e..00000000000
--- a/pkgs/development/tools/continuous-integration/dagger/default.nix
+++ /dev/null
@@ -1,44 +0,0 @@
-{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles, testers, dagger }:
-
-buildGoModule rec {
-  pname = "dagger";
-  version = "0.8.8";
-
-  src = fetchFromGitHub {
-    owner = "dagger";
-    repo = "dagger";
-    rev = "v${version}";
-    hash = "sha256-EHAQRmBgQEM0ypfUwuaoPnoKsQb1S+tarO1nHdmY5RI=";
-  };
-
-  vendorHash = "sha256-fUNet9P6twEJP4eYooiHZ6qaJ3jEkJUwQ2zPzk3+eIs=";
-  proxyVendor = true;
-
-  subPackages = [
-    "cmd/dagger"
-  ];
-
-  ldflags = [ "-s" "-w" "-X github.com/dagger/dagger/engine.Version=${version}" ];
-
-  nativeBuildInputs = [ installShellFiles ];
-
-  postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
-    installShellCompletion --cmd dagger \
-      --bash <($out/bin/dagger completion bash) \
-      --fish <($out/bin/dagger completion fish) \
-      --zsh <($out/bin/dagger completion zsh)
-  '';
-
-  passthru.tests.version = testers.testVersion {
-    package = dagger;
-    command = "dagger version";
-    version = "v${version}";
-  };
-
-  meta = with lib; {
-    description = "A portable devkit for CICD pipelines";
-    homepage = "https://dagger.io";
-    license = licenses.asl20;
-    maintainers = with maintainers; [ jfroche sagikazarmark ];
-  };
-}
diff --git a/pkgs/development/tools/misc/automake/builder.sh b/pkgs/development/tools/misc/automake/builder.sh
index 0cb1d5d61e3..b08e7251e9e 100644
--- a/pkgs/development/tools/misc/automake/builder.sh
+++ b/pkgs/development/tools/misc/automake/builder.sh
@@ -1,4 +1,4 @@
-if [ -e .attrs.sh ]; then source .attrs.sh; fi
+if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
 source $stdenv/setup
 
 # Wrap the given `aclocal' program, appending extra `-I' flags
diff --git a/pkgs/development/tools/misc/indent/darwin.patch b/pkgs/development/tools/misc/indent/darwin.patch
deleted file mode 100644
index 5458a0d93bf..00000000000
--- a/pkgs/development/tools/misc/indent/darwin.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/config.h.in b/config.h.in
-index 07e6fce..0c57e2a 100644
---- a/config.h.in
-+++ b/config.h.in
-@@ -432,8 +432,8 @@
- # endif
- # define _GL_EXTERN_INLINE extern
- #else
--# define _GL_INLINE static _GL_UNUSED
--# define _GL_EXTERN_INLINE static _GL_UNUSED
-+# define _GL_INLINE static
-+# define _GL_EXTERN_INLINE static
- #endif
- 
- #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
diff --git a/pkgs/development/tools/misc/indent/default.nix b/pkgs/development/tools/misc/indent/default.nix
index a94a907c102..f1f9fbac8f7 100644
--- a/pkgs/development/tools/misc/indent/default.nix
+++ b/pkgs/development/tools/misc/indent/default.nix
@@ -1,20 +1,41 @@
-{ lib, stdenv, fetchurl, texinfo, buildPackages, pkgsStatic }:
+{ lib
+, stdenv
+, fetchurl
+, fetchpatch
+, libintl
+, texinfo
+, buildPackages
+, pkgsStatic
+}:
 
 stdenv.mkDerivation rec {
   pname = "indent";
-  version = "2.2.12";
+  version = "2.2.13";
 
   src = fetchurl {
     url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
-    sha256 = "12xvcd16cwilzglv9h7sgh4h1qqjd1h8s48ji2dla58m4706hzg7";
+    hash = "sha256-nmRjT8TOZ5eyBLy4iXzhT90KtIyldpb3h2fFnK5XgJU=";
   };
 
-  patches = [ ./darwin.patch ];
+  patches = [
+    (fetchpatch {
+      name = "CVE-2023-40305.part-1.patch";
+      url = "https://git.savannah.gnu.org/cgit/indent.git/patch/?id=df4ab2d19e247d059e0025789ba513418073ab6f";
+      hash = "sha256-OLXBlYTdEuFK8SIsyC5Xr/hHWlvXiRqY2h79w+H5pGk=";
+    })
+    (fetchpatch {
+      name = "CVE-2023-40305.part-2.patch";
+      url = "https://git.savannah.gnu.org/cgit/indent.git/patch/?id=2685cc0bef0200733b634932ea7399b6cf91b6d7";
+      hash = "sha256-t+QF7N1aqQ28J2O8esZ2bc5K042cUuZR4MeMeuWIgPw=";
+    })
+  ];
+
   makeFlags = [ "AR=${stdenv.cc.targetPrefix}ar" ];
 
   strictDeps = true;
   nativeBuildInputs = [ texinfo ];
-  pkgsBuildBuild = [ buildPackages.stdenv.cc ]; # needed when cross-compiling
+  buildInputs = [ libintl ];
+  depsBuildBuild = [ buildPackages.stdenv.cc ]; # needed when cross-compiling
 
   env.NIX_CFLAGS_COMPILE = toString (
     lib.optional stdenv.cc.isClang "-Wno-implicit-function-declaration"
@@ -23,6 +44,8 @@ stdenv.mkDerivation rec {
 
   hardeningDisable = [ "format" ];
 
+  doCheck = true;
+
   passthru.tests.static = pkgsStatic.indent;
   meta = {
     homepage = "https://www.gnu.org/software/indent/";
diff --git a/pkgs/development/tools/misc/lttng-ust/default.nix b/pkgs/development/tools/misc/lttng-ust/default.nix
index 3bace16de56..0c19b59c5c3 100644
--- a/pkgs/development/tools/misc/lttng-ust/default.nix
+++ b/pkgs/development/tools/misc/lttng-ust/default.nix
@@ -1,4 +1,4 @@
 import ./generic.nix {
-  version = "2.13.1";
-  sha256 = "sha256-Vme/Amnh5i4tnLl0xFb/huBAG9eqO/yNX9uXIzJJ7dw=";
+  version = "2.13.6";
+  sha256 = "sha256-5+BFlt1zrHqpnifNAA+UnbsP7VG9KQmfmwiiXB3wztU=";
 }
diff --git a/pkgs/development/tools/moq/default.nix b/pkgs/development/tools/moq/default.nix
index 6707cf7300d..f057a92de3c 100644
--- a/pkgs/development/tools/moq/default.nix
+++ b/pkgs/development/tools/moq/default.nix
@@ -2,13 +2,13 @@
 
 buildGoModule rec {
   pname = "moq";
-  version = "0.3.2";
+  version = "0.3.3";
 
   src = fetchFromGitHub {
     owner = "matryer";
     repo = "moq";
     rev = "v${version}";
-    sha256 = "sha256-T+vBzhc9XafCeXsW4/24vOn4U7N1t0S8DXkPNav7I94=";
+    sha256 = "sha256-TOFWaPJ+XfgiQCVRXze29TG7Zfur0SV4mQNdgVIGj5o=";
   };
 
   vendorHash = "sha256-lfs61YK5HmUd3/qA4o9MiWeTFhu4MTAkNH+f0iGlRe0=";
diff --git a/pkgs/development/tools/mysql-shell/innovation.nix b/pkgs/development/tools/mysql-shell/innovation.nix
new file mode 100644
index 00000000000..dda169be32d
--- /dev/null
+++ b/pkgs/development/tools/mysql-shell/innovation.nix
@@ -0,0 +1,130 @@
+{ lib
+, stdenv
+, pkg-config
+, cmake
+, fetchurl
+, git
+, cctools
+, developer_cmds
+, DarwinTools
+, makeWrapper
+, CoreServices
+, bison
+, openssl
+, protobuf
+, curl
+, zlib
+, libssh
+, zstd
+, lz4
+, boost
+, readline
+, libtirpc
+, rpcsvc-proto
+, libedit
+, libevent
+, icu
+, re2
+, ncurses
+, libfido2
+, python3
+, cyrus_sasl
+, openldap
+, antlr
+}:
+
+let
+  pythonDeps = with python3.pkgs; [ certifi paramiko pyyaml ];
+
+  mysqlShellVersion = "8.1.1";
+  mysqlServerVersion = "8.1.0";
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "mysql-shell-innovation";
+  version = mysqlShellVersion;
+
+  srcs = [
+    (fetchurl {
+      url = "https://cdn.mysql.com//Downloads/MySQL-${lib.versions.majorMinor mysqlServerVersion}/mysql-${mysqlServerVersion}.tar.gz";
+      hash = "sha256-PdAXqUBzSqkHlqTGXhJeZxL2S7u+M4jTZGneqoe1mes=";
+    })
+    (fetchurl {
+      url = "https://cdn.mysql.com//Downloads/MySQL-Shell/mysql-shell-${finalAttrs.version}-src.tar.gz";
+      hash = "sha256-X7A2h9PWgQgNg7h64oD+Th/KsqP3UGpJ2etaP2B0VuY=";
+    })
+  ];
+
+  sourceRoot = "mysql-shell-${finalAttrs.version}-src";
+
+  postUnpack = ''
+    mv mysql-${mysqlServerVersion} mysql
+  '';
+
+  postPatch = ''
+    substituteInPlace ../mysql/cmake/libutils.cmake --replace /usr/bin/libtool libtool
+    substituteInPlace ../mysql/cmake/os/Darwin.cmake --replace /usr/bin/libtool libtool
+
+    substituteInPlace cmake/libutils.cmake --replace /usr/bin/libtool libtool
+  '';
+
+  nativeBuildInputs = [ pkg-config cmake git bison makeWrapper ]
+    ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ]
+    ++ lib.optionals stdenv.isDarwin [ cctools developer_cmds DarwinTools ];
+
+  buildInputs = [
+    boost
+    curl
+    libedit
+    libssh
+    lz4
+    openssl
+    protobuf
+    readline
+    zlib
+    zstd
+    libevent
+    icu
+    re2
+    ncurses
+    libfido2
+    cyrus_sasl
+    openldap
+    python3
+    antlr.runtime.cpp
+  ] ++ pythonDeps
+  ++ lib.optionals stdenv.isLinux [ libtirpc ]
+  ++ lib.optionals stdenv.isDarwin [ CoreServices ];
+
+  preConfigure = ''
+    # Build MySQL
+    echo "Building mysqlclient mysqlxclient"
+
+    cmake -DWITH_BOOST=system -DWITH_SYSTEM_LIBS=ON -DWITH_ROUTER=OFF -DWITH_UNIT_TESTS=OFF \
+      -DFORCE_UNSUPPORTED_COMPILER=1 -S ../mysql -B ../mysql/build
+
+    cmake --build ../mysql/build --parallel ''${NIX_BUILD_CORES:-1} --target mysqlclient mysqlxclient
+  '';
+
+  cmakeFlags = [
+    "-DMYSQL_SOURCE_DIR=../mysql"
+    "-DMYSQL_BUILD_DIR=../mysql/build"
+    "-DMYSQL_CONFIG_EXECUTABLE=../../mysql/build/scripts/mysql_config"
+    "-DWITH_ZSTD=system"
+    "-DWITH_LZ4=system"
+    "-DWITH_ZLIB=system"
+    "-DWITH_PROTOBUF=${protobuf}"
+    "-DHAVE_PYTHON=1"
+  ];
+
+  postFixup = ''
+    wrapProgram $out/bin/mysqlsh --set PYTHONPATH "${lib.makeSearchPath python3.sitePackages pythonDeps}"
+  '';
+
+  meta = with lib; {
+    homepage = "https://dev.mysql.com/doc/mysql-shell/${lib.versions.majorMinor finalAttrs.version}/en/";
+    description = "A new command line scriptable shell for MySQL";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ aaronjheng ];
+    mainProgram = "mysqlsh";
+  };
+})
diff --git a/pkgs/development/tools/parsing/antlr/builder.sh b/pkgs/development/tools/parsing/antlr/builder.sh
index 55259b93212..c1d20845e6b 100644
--- a/pkgs/development/tools/parsing/antlr/builder.sh
+++ b/pkgs/development/tools/parsing/antlr/builder.sh
@@ -1,4 +1,4 @@
-if [ -e .attrs.sh ]; then source .attrs.sh; fi
+if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
 source $stdenv/setup
 
 tar zxvf $src
diff --git a/pkgs/development/tools/rust/maturin/default.nix b/pkgs/development/tools/rust/maturin/default.nix
index 4b66ecfa467..37cec14ee4c 100644
--- a/pkgs/development/tools/rust/maturin/default.nix
+++ b/pkgs/development/tools/rust/maturin/default.nix
@@ -9,16 +9,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "maturin";
-  version = "1.2.3";
+  version = "1.3.0";
 
   src = fetchFromGitHub {
     owner = "PyO3";
     repo = "maturin";
     rev = "v${version}";
-    hash = "sha256-hxtT5cL1PTXkTXGB0nVPhMI8Vlqrk4q2MHW0KGosFwc=";
+    hash = "sha256-MVmu9m+9XhWuPBEEoaYmsSbMFziSZaM5Gg5kOr1DT54=";
   };
 
-  cargoHash = "sha256-IZWh/Bp9TdB+flc1PXVkwrIdOr83TFk6X6O5M0FVaO4=";
+  cargoHash = "sha256-hrdrGFtL2vGczINnvDa4rclkXsNWnEqtTt3NVaRay8w=";
 
   buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ];