aboutsummaryrefslogtreecommitdiff
path: root/pkgs/webapps/phpldapadmin/default.nix
blob: 70fd19af50816dd22db9af0b8ba3fd012efbe8ce (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ config ? "/etc/phpldapadmin/config.php", fetchurl, stdenv, optipng }:
stdenv.mkDerivation rec {
  version = "1.2.3";
  name = "phpldapadmin-${version}";
  src = fetchurl {
    url = "https://downloads.sourceforge.net/project/phpldapadmin/phpldapadmin-php5/${version}/${name}.tgz";
    sha256 = "0n7dhp2a7n1krmnik3pb969jynsmhghmxviivnckifkprv1zijmf";
  };
  patches = [
    ./ldap-php5_5.patch
    ./ldap-disable-mcrypt.patch
    ./ldap-php7_2.patch
    ./ldap-sort-in-templates.patch
    ./ldap-align-button.patch
    ];
  buildInputs = [ optipng ];
  buildPhase = ''
    find -name '*.png' -exec optipng -quiet -force -fix {} \;
  '';
  installPhase = ''
    cp -a . $out
    ln -sf ${config} $out/config/config.php
  '';
}