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

stdenv.mkDerivation (rec {
  name = "mldonkey-3.1.5";
  
  src = fetchurl {
    url = "mirror://sourceforge/mldonkey/${name}.tar.bz2";
    sha256 = "1jqik6b09p27ckssppfiqpph7alxbgpnf9w1s0lalmi3qyyd9ybl";
  };
  
  meta = {
    description = "Client for many p2p networks, with multiple frontends";
    homepage = http://mldonkey.sourceforge.net/;
    license = stdenv.lib.licenses.gpl2;
  };

  buildInputs = [ ocaml zlib ncurses bzip2 file gd libpng libjpeg ];
  configureFlags = [ "--disable-gui" ];
} // (if !ocaml.nativeCompilers then
{
  # Byte code compilation (the ocaml opt compiler is not supported in some platforms)
  buildPhase = "make mlnet.byte";
  installPhase = ''
    mkdir -p $out/bin
    cp mlnet.byte $out/bin/mlnet
  '';

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