summary refs log tree commit diff
path: root/pkgs/development/interpreters/php-xdebug/default.nix
blob: 99c5ad663af44e435a962f755926e63d610b7455 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ stdenv, fetchurl, php, autoconf, automake }:

stdenv.mkDerivation rec {
  version = "2.2.3";
  name = "php-xdebug-${version}";

  src = fetchurl {
    url = "http://xdebug.org/files/xdebug-2.2.3.tgz";
    sha256 = "076px4ax3qcqr3mmhi9jjkfhn7pcymrpda4hzy6kgn3flhnqfldk";
  };

  buildInputs = [ php autoconf automake ];

  configurePhase = ''
    phpize
    ./configure --prefix=$out
  '' + stdenv.lib.optionalString stdenv.isDarwin ''
    # looks for this file for some reason -- isn't needed
    touch unix.h
  '';

  buildPhase = ''
    make && make test
  '';

  installPhase = ''
    mkdir -p $out/lib/xdebug
    cp modules/xdebug.so $out/lib
    cp LICENSE $out/lib/xdebug
  '';

  meta = {
    description = "PHP debugger and profiler extension";
    homepage = http://xdebug.org/;
    license = "xdebug"; # based on PHP-3
    maintainers = [ stdenv.lib.maintainers.marcweber ];
    platforms = stdenv.lib.platforms.linux;
  };
}