MySQL/MariaDB error when using Drupal Flake with PHP 7.4

Created on 20 January 2026, 1 day ago

I'm setting up Drupal Flake on a Drupal 8 project with PHP 7.4, as per these settings in my .env file:

```bash
PROJECT_NAME=phpsouthwales
PHP_VERSION=php74
```

After running `direnv allow`, I get this error:

evaluating derivation 'git+file:///home/opdavies/Code/repository/phpsouthwales-uk/master#devShells.x86_64-linux.default'direnv: ([/nix/store/a4gb5cva5rggpjld2xp6r4zlp149jbd4-direnv-2.37.1/bin/direnv export zsh]) is taking a while to execute. Use CTRL-C to give up.
error:
… while calling the 'derivationStrict' builtin
at :37:12:
36|
37| strict = derivationStrict drvAttrs;
| ^
38|

… while evaluating derivation 'nix-shell'
whose name attribute is located at /nix/store/0yj36irhwn225ywy1saz0gf5wr2ciz50-source/pkgs/stdenv/generic/make-derivation.nix:541:13

… while evaluating attribute 'nativeBuildInputs' of derivation 'nix-shell'
at /nix/store/0yj36irhwn225ywy1saz0gf5wr2ciz50-source/pkgs/stdenv/generic/make-derivation.nix:590:13:
589| depsBuildBuild = elemAt (elemAt dependencies 0) 0;
590| nativeBuildInputs = elemAt (elemAt dependencies 0) 1;
| ^
591| depsBuildTarget = elemAt (elemAt dependencies 0) 2;

(stack trace truncated; use '--show-trace' to show the full, detailed trace)

error: mysql-client has been replaced by mariadb.client

I've done some investigation and found this in .services/php-fpm.nix:

```nix
# Determine paths based on PHP version - several packages aren't available in php74
phpPaths =
if phpVersion == "php74" then [
php
php.packages.composer
finalPkgs.mysql-client
] ++ lib.optional (finalPkgs ? drush) finalPkgs.drush
else [
php
php.packages.composer
php.packages.phpstan
# codesniffer package is broken at the moment
# php.packages.php-codesniffer
finalPkgs.phpunit
finalPkgs.mariadb.client
];
```

I have it working by changing the following lines, but I wasn't sure if this a change that should be made within Drupal Flake itself:

```diff
- finalPkgs.mysql-client
+ finalPkgs.mariadb.client
```

If I run `refresh-flake`, I lose that change so I want to persist it somehow.

I'm using NixOS unstable, if that makes a difference.

I'm happy to create and submit a PR once there is a decided course of action.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom opdavies Wales

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024