2010-06-19 03:19:39 +01:00
|
|
|
{ monolithic ? true # build monolithic amule
|
2019-09-23 01:14:05 +01:00
|
|
|
, enableDaemon ? false # build amule daemon
|
2010-06-19 03:19:39 +01:00
|
|
|
, httpServer ? false # build web interface for the daemon
|
2013-12-09 23:25:54 +00:00
|
|
|
, client ? false # build amule remote gui
|
2019-09-23 04:05:43 +01:00
|
|
|
, fetchFromGitHub, fetchpatch, stdenv, lib, zlib, wxGTK, perl, cryptopp, libupnp, gettext, libpng ? null
|
|
|
|
, autoreconfHook, 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;
|
2018-07-25 22:44:21 +01:00
|
|
|
|
2019-09-23 04:05:43 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "amule";
|
2020-10-06 20:30:11 +01:00
|
|
|
version = "unstable-20201006";
|
2007-10-06 16:59:35 +01:00
|
|
|
|
2019-09-23 04:05:43 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "amule-project";
|
|
|
|
repo = "amule";
|
2020-10-06 20:30:11 +01:00
|
|
|
rev = "6f8951527eda670c7266984ce476061bfe8867fc";
|
|
|
|
sha256 = "12b44b6hz3mb7nsn6xhzvm726xs06xcim013i1appif4dr8njbx1";
|
2008-07-29 17:52:26 +01:00
|
|
|
};
|
|
|
|
|
2019-09-23 04:05:43 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/libs/ec/file_generator.pl \
|
|
|
|
--replace /usr/bin/perl ${perl}/bin/perl
|
|
|
|
|
|
|
|
# autotools expects these to be in the root
|
|
|
|
cp docs/{AUTHORS,README} .
|
|
|
|
cp docs/Changelog ./ChangeLog
|
|
|
|
cp docs/Changelog ./NEWS
|
|
|
|
'';
|
|
|
|
|
|
|
|
preAutoreconf = ''
|
|
|
|
pushd src/pixmaps/flags_xpm >/dev/null
|
|
|
|
./makeflags.sh
|
|
|
|
popd >/dev/null
|
|
|
|
'';
|
2008-07-29 17:52:26 +01:00
|
|
|
|
2019-09-23 04:05:43 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook gettext makeWrapper pkgconfig ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
zlib wxGTK perl cryptopp libupnp
|
|
|
|
] ++ lib.optional httpServer libpng
|
|
|
|
++ lib.optional client libX11;
|
2018-09-03 01:01:37 +01:00
|
|
|
|
2017-03-18 08:36:08 +00:00
|
|
|
enableParallelBuilding = true;
|
2013-03-17 09:15:03 +00:00
|
|
|
|
2018-07-25 22:44:21 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--with-crypto-prefix=${cryptopp}"
|
|
|
|
"--disable-debug"
|
|
|
|
"--enable-optimize"
|
2019-09-23 04:05:43 +01:00
|
|
|
(lib.enableFeature monolithic "monolithic")
|
|
|
|
(lib.enableFeature enableDaemon "amule-daemon")
|
|
|
|
(lib.enableFeature client "amule-gui")
|
|
|
|
(lib.enableFeature httpServer "webserver")
|
2018-07-25 22:44:21 +01:00
|
|
|
];
|
2008-07-29 17:52:26 +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 ''
|
2019-09-23 04:05:43 +01:00
|
|
|
wrapProgram $out/bin/amule \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libupnp ]}
|
2008-10-07 22:50:24 +01:00
|
|
|
'';
|
|
|
|
|
2019-09-23 04:05:43 +01:00
|
|
|
meta = with lib; {
|
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.
|
|
|
|
'';
|
|
|
|
|
2019-12-08 16:50:31 +00:00
|
|
|
homepage = "https://github.com/amule-project/amule";
|
2019-09-23 04:05:43 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ phreedom ];
|
|
|
|
platforms = platforms.unix;
|
2007-10-06 16:59:35 +01:00
|
|
|
};
|
|
|
|
}
|