diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3d6b1be0..79fbfb35 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -75,6 +75,10 @@ jobs: if: ${{ steps.params.outputs.major < 8 && matrix.archs.arch == 'x86_64-linux' }} run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-redis3 + - name: Build Mcrypt extension + if: ${{ steps.params.outputs.major < 7 }} + run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-mcrypt + - name: Build MySQL extension if: ${{ steps.params.outputs.major < 7 }} run: nix-build -A outputs.checks.${{ matrix.archs.arch }}.${{ steps.params.outputs.attr }}-mysql diff --git a/checks.nix b/checks.nix index b322f85d..96323ad0 100644 --- a/checks.nix +++ b/checks.nix @@ -13,6 +13,12 @@ let drv = { php, ... }: php; }; + mcrypt = { + description = "Build Mcrypt extension"; + enabled = { php, lib, ... }: lib.versionOlder php.version "7"; + drv = { php, ... }: php.extensions.mcrypt; + }; + imagick = { description = "Build Imagick extension"; drv = { php, ... }: php.extensions.imagick; diff --git a/pkgs/package-overrides.nix b/pkgs/package-overrides.nix index c59a8136..27c0ab77 100644 --- a/pkgs/package-overrides.nix +++ b/pkgs/package-overrides.nix @@ -398,6 +398,15 @@ in else prev.extensions.mbstring; + mcrypt = + if lib.versionOlder prev.php.version "7.0" then + prev.mkExtension { + name = "mcrypt"; + configureFlags = [ "--with-mcrypt=${pkgs.libmcrypt.outPath}" ]; + } + else + throw "php.extensions.mcrypt requires PHP version < 7.0."; + memcached = if lib.versionOlder prev.php.version "7.0" then prev.extensions.memcached.overrideAttrs (attrs: {