about summary refs log tree commit diff
path: root/pkgs/applications/networking/p2p/mldonkey/default.nix
blob: 02a5e22eb23fe486d4f7eafcce875f41c67e6f2e (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
{stdenv, fetchurl, ocaml, zlib, ncurses, gd, libpng}:

stdenv.mkDerivation {
  name = "mldonkey-3.0.0";
  
  src = fetchurl {
    url = mirror://sourceforge/mldonkey/mldonkey-3.0.0.tar.bz2;
    sha256 = "0zzvcfnbhxk8axfch5fbkd9j2ks67nbb1ndjjarxvrza78g5y8r7";
  };
  
  meta = {
    description = "Client for many p2p networks, with multiple frontends";
    homepage = http://mldonkey.sourceforge.net/;
  };

  buildInputs = [ ocaml zlib ncurses gd libpng ];
  configureFlags = [ "--disable-gui" "--enable-ocamlver=3.11.1" ];

  # Byte code compilation (the ocaml opt compiler is not supported in many platforms)
  buildPhase = "make mlnet.byte";
  installPhase = ''
    ensureDir $out/bin
    cp mlnet.byte $out/bin/mlnet
  '';

  # ocaml bytecode selfcontained binaries loose the bytecode if stripped
  dontStrip = true;
}