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
|
|
|
|
, wxGTK
|
|
|
|
, perl
|
|
|
|
, cryptopp
|
|
|
|
, libupnp
|
|
|
|
, gettext
|
|
|
|
, libpng
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
, makeWrapper
|
|
|
|
, libX11
|
|
|
|
}:
|
2018-07-25 21:44:21 +00:00
|
|
|
|
2019-09-23 03:05:43 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "amule";
|
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 = [
|
2021-04-10 14:44:52 +00:00
|
|
|
zlib wxGTK perl cryptopp.dev libupnp
|
2019-09-23 03:05:43 +00:00
|
|
|
] ++ lib.optional httpServer libpng
|
|
|
|
++ 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"}"
|
2018-07-25 21:44:21 +00:00
|
|
|
];
|
2008-07-29 16:52:26 +00:00
|
|
|
|
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;
|
2021-04-10 14:44:52 +00:00
|
|
|
# cmake fails: Cannot specify link libraries for target "wxWidgets::ADV" which is not built by this project.
|
|
|
|
broken = enableDaemon;
|
2007-10-06 15:59:35 +00:00
|
|
|
};
|
|
|
|
}
|