mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
php: Add mcrypt optional support
Use an override with mcrypt = true to enable libmcrypt support in php. The --disable-posix-threadsds mcrypt build option was required by php.
This commit is contained in:
parent
b42ba898e1
commit
8fd5fcbda5
@ -1,7 +1,11 @@
|
||||
{ stdenv, fetchurl, composableDerivation, autoconf, automake, flex, bison
|
||||
, apacheHttpd, mysql, libxml2, readline, zlib, curl, gd, postgresql, gettext
|
||||
, openssl, pkgconfig, sqlite, config, libiconv, libjpeg, libpng, freetype
|
||||
, libxslt }:
|
||||
, libxslt, libmcrypt }:
|
||||
|
||||
let
|
||||
libmcryptOverride = libmcrypt.override { disablePosixThreads = true; };
|
||||
in
|
||||
|
||||
composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed) version; in {
|
||||
|
||||
@ -116,6 +120,11 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
|
||||
buildInputs = [libxslt];
|
||||
};
|
||||
|
||||
mcrypt = {
|
||||
configureFlags = ["--with-mcrypt=${libmcrypt}"];
|
||||
buildInputs = [libmcryptOverride];
|
||||
};
|
||||
|
||||
/*
|
||||
php is build within this derivation in order to add the xdebug lines to the php.ini.
|
||||
So both Apache and command line php both use xdebug without having to configure anything.
|
||||
@ -148,6 +157,7 @@ composableDerivation.composableDerivation {} ( fixed : let inherit (fixed.fixed)
|
||||
mbstringSupport = config.php.mbstring or true;
|
||||
gdSupport = config.php.gd or true;
|
||||
xslSupport = config.php.xsl or false;
|
||||
mcryptSupport = config.php.mcrypt or false;
|
||||
};
|
||||
|
||||
configurePhase = ''
|
||||
|
@ -1,4 +1,6 @@
|
||||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, disablePosixThreads ? false }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libmcrypt-2.5.8";
|
||||
@ -10,7 +12,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [];
|
||||
|
||||
configureFlags = optional disablePosixThreads
|
||||
[ "--disable-posix-threads" ];
|
||||
|
||||
meta = {
|
||||
description = "MCrypt is a replacement for the old crypt() package and crypt(1) command, with extensions.";
|
||||
homepage = http://mcrypt.sourceforge.net;
|
||||
license = "GPL";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user