3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/p2p/amule/default.nix

72 lines
2.3 KiB
Nix
Raw Normal View History

{ monolithic ? true # build monolithic amule
, daemon ? false # build amule daemon
, httpServer ? false # build web interface for the daemon
, client ? false # build amule remote gui
, fetchurl, stdenv, zlib, wxGTK, perl, cryptopp, libupnp, gettext, libpng ? null
2016-03-21 20:28:19 +00:00
, pkgconfig, makeWrapper, libX11 ? null }:
assert httpServer -> libpng != null;
2016-03-21 20:28:19 +00:00
assert client -> libX11 != null;
with stdenv;
mkDerivation rec {
2017-03-18 08:36:08 +00:00
name = "aMule-2.3.2";
src = fetchurl {
2013-03-17 09:15:03 +00:00
url = "mirror://sourceforge/amule/${name}.tar.xz";
2017-03-18 08:36:08 +00:00
sha256 = "0a1rd33hjl30qyzgb5y8m7dxs38asci3kjnlvims1ky6r3yj0izn";
};
buildInputs =
[ zlib wxGTK perl cryptopp libupnp gettext pkgconfig makeWrapper ]
2016-03-21 20:28:19 +00:00
++ lib.optional httpServer libpng
++ lib.optional client libX11;
2018-09-03 01:01:37 +01:00
# See: https://github.com/amule-project/amule/issues/126
patches = [ ./upnp-1.8.patch ];
2017-03-18 08:36:08 +00:00
enableParallelBuilding = true;
2013-03-17 09:15:03 +00:00
configureFlags = [
"--with-crypto-prefix=${cryptopp}"
"--disable-debug"
"--enable-optimize"
(stdenv.lib.enableFeature monolithic "monolithic")
(stdenv.lib.enableFeature daemon "amule-daemon")
(stdenv.lib.enableFeature client "amule-gui")
(stdenv.lib.enableFeature httpServer "webserver")
];
postConfigure = ''
sed -i "src/libs/ec/file_generator.pl" \
-es'|/usr/bin/perl|${perl}/bin/perl|g'
'';
# aMule will try to `dlopen' libupnp and libixml, so help it
# find them.
postInstall = lib.optionalString monolithic ''
wrapProgram "$out/bin/amule" --prefix LD_LIBRARY_PATH ":" "${libupnp}/lib"
'';
meta = {
homepage = http://amule.org/;
description = "Peer-to-peer client for the eD2K and Kademlia networks";
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.
'';
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # arbitrary choice
2013-08-16 22:44:33 +01:00
maintainers = [ stdenv.lib.maintainers.phreedom ];
};
}