2010-06-19 02:19:39 +00:00
|
|
|
{ monolithic ? true # build monolithic amule
|
2019-09-23 00:14:05 +00:00
|
|
|
, enableDaemon ? false # build amule daemon
|
2010-06-19 02:19:39 +00:00
|
|
|
, httpServer ? false # build web interface for the daemon
|
2013-12-09 23:25:54 +00:00
|
|
|
, client ? false # build amule remote gui
|
2021-04-10 14:44:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, lib
|
|
|
|
, cmake
|
|
|
|
, zlib
|
2022-12-03 02:28:32 +00:00
|
|
|
, wxGTK30 # WxGTK 3.0 must be used because aMule does not yet work well with 3.1
|
2021-04-10 14:44:52 +00:00
|
|
|
, perl
|
|
|
|
, cryptopp
|
|
|
|
, libupnp
|
2021-12-28 22:11:05 +00:00
|
|
|
, boost # Not using boost leads to crashes with gtk3
|
2021-04-10 14:44:52 +00:00
|
|
|
, gettext
|
|
|
|
, libpng
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
, makeWrapper
|
|
|
|
, libX11
|
|
|
|
}:
|
2018-07-25 21:44:21 +00:00
|
|
|
|
2022-02-21 18:01:54 +00:00
|
|
|
# daemon and client are not build monolithic
|
2022-09-04 12:39:18 +00:00
|
|
|
assert monolithic || (!monolithic && (enableDaemon || client || httpServer));
|
2022-02-21 18:01:54 +00:00
|
|
|
|
2019-09-23 03:05:43 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-02-21 18:01:54 +00:00
|
|
|
pname = "amule"
|
2022-09-04 12:39:18 +00:00
|
|
|
+ lib.optionalString httpServer "-web"
|
2022-02-21 18:01:54 +00:00
|
|
|
+ lib.optionalString enableDaemon "-daemon"
|
|
|
|
+ lib.optionalString client "-gui";
|
2021-04-10 14:44:52 +00:00
|
|
|
version = "2.3.3";
|
2007-10-06 15:59:35 +00:00
|
|
|
|
2019-09-23 03:05:43 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "amule-project";
|
|
|
|
repo = "amule";
|
2021-04-10 14:44:52 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1nm4vxgmisn1b6l3drmz0q04x067j2i8lw5rnf0acaapwlp8qwvi";
|
2008-07-29 16:52:26 +00:00
|
|
|
};
|
|
|
|
|
2021-04-10 14:44:52 +00:00
|
|
|
nativeBuildInputs = [ cmake gettext makeWrapper pkg-config ];
|
2019-09-23 03:05:43 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2022-02-21 18:01:54 +00:00
|
|
|
zlib
|
2022-12-03 02:28:32 +00:00
|
|
|
wxGTK30
|
2022-02-21 18:01:54 +00:00
|
|
|
perl
|
|
|
|
cryptopp.dev
|
|
|
|
libupnp
|
|
|
|
boost
|
2019-09-23 03:05:43 +00:00
|
|
|
] ++ lib.optional httpServer libpng
|
2022-02-21 18:01:54 +00:00
|
|
|
++ lib.optional client libX11;
|
2018-09-03 00:01:37 +00:00
|
|
|
|
2021-04-10 14:44:52 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_MONOLITHIC=${if monolithic then "ON" else "OFF"}"
|
|
|
|
"-DBUILD_DAEMON=${if enableDaemon then "ON" else "OFF"}"
|
|
|
|
"-DBUILD_REMOTEGUI=${if client then "ON" else "OFF"}"
|
|
|
|
"-DBUILD_WEBSERVER=${if httpServer then "ON" else "OFF"}"
|
2022-09-04 12:39:18 +00:00
|
|
|
# building only the daemon fails when these are not set... this is
|
|
|
|
# due to mistakes in the Amule cmake code, but it does not cause
|
|
|
|
# extra code to be built...
|
|
|
|
"-Dwx_NEED_GUI=ON"
|
|
|
|
"-Dwx_NEED_ADV=ON"
|
|
|
|
"-Dwx_NEED_NET=ON"
|
2018-07-25 21:44:21 +00:00
|
|
|
];
|
2008-07-29 16:52:26 +00:00
|
|
|
|
2022-09-04 12:39:18 +00:00
|
|
|
postPatch = ''
|
|
|
|
echo "find_package(Threads)" >> cmake/options.cmake
|
|
|
|
'';
|
|
|
|
|
2008-10-07 21:50:24 +00:00
|
|
|
# aMule will try to `dlopen' libupnp and libixml, so help it
|
|
|
|
# find them.
|
2010-06-19 02:19:39 +00:00
|
|
|
postInstall = lib.optionalString monolithic ''
|
2019-09-23 03:05:43 +00:00
|
|
|
wrapProgram $out/bin/amule \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libupnp ]}
|
2008-10-07 21:50:24 +00:00
|
|
|
'';
|
|
|
|
|
2019-09-23 03:05:43 +00:00
|
|
|
meta = with lib; {
|
2013-10-05 14:22:46 +00:00
|
|
|
description = "Peer-to-peer client for the eD2K and Kademlia networks";
|
2008-07-29 16:52:26 +00: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 03:05:43 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2021-12-18 09:25:46 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2019-09-23 03:05:43 +00:00
|
|
|
platforms = platforms.unix;
|
2022-09-04 12:39:18 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2007-10-06 15:59:35 +00:00
|
|
|
};
|
|
|
|
}
|