2010-06-19 03:19:39 +01:00
|
|
|
{ monolithic ? true # build monolithic amule
|
|
|
|
, daemon ? false # build amule daemon
|
|
|
|
, httpServer ? false # build web interface for the daemon
|
2013-12-09 23:25:54 +00:00
|
|
|
, client ? false # build amule remote gui
|
2010-06-19 03:19:39 +01:00
|
|
|
, fetchurl, stdenv, zlib, wxGTK, perl, cryptopp, libupnp, gettext, libpng ? null
|
2016-03-21 20:28:19 +00:00
|
|
|
, pkgconfig, makeWrapper, libX11 ? null }:
|
2007-10-06 16:59:35 +01:00
|
|
|
|
2010-06-19 03:19:39 +01:00
|
|
|
assert httpServer -> libpng != null;
|
2016-03-21 20:28:19 +00:00
|
|
|
assert client -> libX11 != null;
|
2010-06-19 03:19:39 +01:00
|
|
|
with stdenv;
|
|
|
|
let
|
|
|
|
# Enable/Disable Feature
|
|
|
|
edf = enabled: flag: if enabled then "--enable-" + flag else "--disable-" + flag;
|
2013-12-09 23:25:54 +00:00
|
|
|
in
|
2010-06-19 03:19:39 +01:00
|
|
|
mkDerivation rec {
|
2013-03-17 09:15:03 +00:00
|
|
|
name = "aMule-2.3.1";
|
2007-10-06 16:59:35 +01:00
|
|
|
|
2008-07-29 17:52:26 +01:00
|
|
|
src = fetchurl {
|
2013-03-17 09:15:03 +00:00
|
|
|
url = "mirror://sourceforge/amule/${name}.tar.xz";
|
|
|
|
sha256 = "0hvpx3c005nvxsfand5bwfxxiq3mv0mpykajfm2lkygjh1rw2383";
|
2008-07-29 17:52:26 +01:00
|
|
|
};
|
|
|
|
|
2010-03-30 09:20:29 +01:00
|
|
|
buildInputs =
|
2010-06-19 03:19:39 +01:00
|
|
|
[ zlib wxGTK perl cryptopp libupnp gettext pkgconfig makeWrapper ]
|
2016-03-21 20:28:19 +00:00
|
|
|
++ lib.optional httpServer libpng
|
|
|
|
++ lib.optional client libX11;
|
2008-07-29 17:52:26 +01:00
|
|
|
|
2013-03-17 09:15:03 +00:00
|
|
|
patches = [ ./gcc47.patch ]; # from Gentoo
|
|
|
|
|
2010-06-19 03:19:39 +01:00
|
|
|
configureFlags = ''
|
|
|
|
--with-crypto-prefix=${cryptopp}
|
|
|
|
--disable-debug
|
|
|
|
--enable-optimize
|
|
|
|
${edf monolithic "monolithic"}
|
|
|
|
${edf daemon "amule-daemon"}
|
|
|
|
${edf client "amule-gui"}
|
|
|
|
${edf httpServer "webserver"}
|
|
|
|
'';
|
2008-07-29 17:52:26 +01:00
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
sed -i "src/libs/ec/file_generator.pl" \
|
|
|
|
-es'|/usr/bin/perl|${perl}/bin/perl|g'
|
|
|
|
'';
|
2007-10-06 16:59:35 +01:00
|
|
|
|
2008-10-07 22:50:24 +01:00
|
|
|
# aMule will try to `dlopen' libupnp and libixml, so help it
|
|
|
|
# find them.
|
2010-06-19 03:19:39 +01:00
|
|
|
postInstall = lib.optionalString monolithic ''
|
|
|
|
wrapProgram "$out/bin/amule" --prefix LD_LIBRARY_PATH ":" "${libupnp}/lib"
|
2008-10-07 22:50:24 +01:00
|
|
|
'';
|
|
|
|
|
2007-10-06 16:59:35 +01:00
|
|
|
meta = {
|
2008-07-29 17:52:26 +01:00
|
|
|
homepage = http://amule.org/;
|
2013-10-05 15:22:46 +01:00
|
|
|
description = "Peer-to-peer client for the eD2K and Kademlia networks";
|
2008-07-29 17:52:26 +01:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
aMule is an eMule-like client for the eD2k and Kademlia
|
|
|
|
networks, supporting multiple platforms. Currently aMule
|
|
|
|
(officially) supports a wide variety of platforms and operating
|
|
|
|
systems, being compatible with more than 60 different
|
|
|
|
hardware+OS configurations. aMule is entirely free, its
|
|
|
|
sourcecode released under the GPL just like eMule, and includes
|
|
|
|
no adware or spyware as is often found in proprietary P2P
|
|
|
|
applications.
|
|
|
|
'';
|
|
|
|
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2010-03-30 09:20:29 +01:00
|
|
|
|
|
|
|
platforms = stdenv.lib.platforms.gnu; # arbitrary choice
|
2013-08-16 22:44:33 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.phreedom ];
|
2007-10-06 16:59:35 +01:00
|
|
|
};
|
|
|
|
}
|