Skip to content

Commit

Permalink
php56.extensions.mcrypt: init
Browse files Browse the repository at this point in the history
Adds check for mcrypt
  • Loading branch information
nickkadutskyi authored and jtojnar committed Jul 11, 2024
1 parent 4dcb106 commit 5c2a9bf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions checks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 9 additions & 0 deletions pkgs/package-overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 5c2a9bf

Please sign in to comment.