mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
df68759142
Cleaning the mldonkey expression to build with the ocaml native compiler in some platforms, and with the bytecode in others. Removing the flag to support ocaml-3.11.1, as it is included in this new version of mldonkey. svn path=/nixpkgs/branches/stdenv-updates/; revision=19487
30 lines
914 B
Nix
30 lines
914 B
Nix
{stdenv, fetchurl, ocaml, zlib, bzip2, ncurses, file, gd, libpng }:
|
|
|
|
stdenv.mkDerivation (rec {
|
|
name = "mldonkey-3.0.1";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/mldonkey/${name}.tar.bz2";
|
|
sha256 = "09zk53rfdkjipf5sl37rypzi2mx0a5v57vsndj22zajkqr4l0zds";
|
|
};
|
|
|
|
meta = {
|
|
description = "Client for many p2p networks, with multiple frontends";
|
|
homepage = http://mldonkey.sourceforge.net/;
|
|
};
|
|
|
|
buildInputs = [ ocaml zlib ncurses bzip2 file gd libpng ];
|
|
configureFlags = [ "--disable-gui" ];
|
|
} // (if (stdenv.system != "i686-linux" && stdenv.system != "x86_64-linux") then
|
|
{
|
|
# 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;
|
|
} else {}))
|