about summary refs log tree commit diff
path: root/pkgs/development/interpreters/php-xdebug/default.nix
blob: 5a242f3c85a4176140b1b8003d1c2ad840bac55b (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
{ stdenv, fetchurl, php, autoconf, automake }:

stdenv.mkDerivation {
  name = "php-xdebug-2.0.5";

  src = fetchurl {
    url = "http://xdebug.org/files/xdebug-2.0.5.tgz";
    sha256 = "1cmq7c36gj8n41mfq1wba5rij8j77yqhydpcsbcysk1zchg68f26";
  };

  buildInputs = [ php autoconf automake ];

  configurePhase = ''
    phpize
    ./configure --prefix=$out
  '';

  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;
  };
}