nixpkgs-suyu/pkgs/tools/networking/p2p/amule/default.nix

96 lines
3 KiB
Nix
Raw Normal View History

{ monolithic ? true # build monolithic amule
, enableDaemon ? false # build amule daemon
, httpServer ? false # build web interface for the daemon
, client ? false # build amule remote gui
2019-09-23 05:05:43 +02:00
, fetchFromGitHub, fetchpatch, stdenv, lib, zlib, wxGTK, perl, cryptopp, libupnp, gettext, libpng ? null
, autoreconfHook, pkgconfig, makeWrapper, libX11 ? null }:
assert httpServer -> libpng != null;
2016-03-21 21:28:19 +01:00
assert client -> libX11 != null;
2019-09-23 05:05:43 +02:00
stdenv.mkDerivation rec {
pname = "amule";
version = "2.3.2";
2019-09-23 05:05:43 +02:00
src = fetchFromGitHub {
owner = "amule-project";
repo = "amule";
rev = version;
sha256 = "010wxm6g9f92x6fympj501zbnjka32rzbx0sk3a2y4zpih5d2nsn";
};
2019-09-23 05:05:43 +02:00
patches = [
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/amule-project/amule/pull/135.patch";
sha256 = "1n24r1j28083b8ipbnh1nf6i4j6vx59pdkfl1c0g6bb4psx9wvvi";
name = "libupnp_18.patch";
})
2019-10-28 22:13:13 +01:00
(fetchpatch {
name = "amule-cryptopp_6.patch";
url = "https://github.com/amule-project/amule/commit/27c13f3e622b8a3eaaa05bb62b0149604bdcc9e8.patch";
sha256 = "0kq095gi3xl665wr864zlhp5f3blk75pr725yany8ilzcwrzdrnm";
})
2019-09-23 05:05:43 +02: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
'';
2019-09-23 05:05:43 +02:00
nativeBuildInputs = [ autoreconfHook gettext makeWrapper pkgconfig ];
buildInputs = [
zlib wxGTK perl cryptopp libupnp
] ++ lib.optional httpServer libpng
++ lib.optional client libX11;
2018-09-03 02:01:37 +02:00
2017-03-18 09:36:08 +01:00
enableParallelBuilding = true;
2013-03-17 10:15:03 +01:00
configureFlags = [
"--with-crypto-prefix=${cryptopp}"
"--disable-debug"
"--enable-optimize"
2019-09-23 05:05:43 +02:00
(lib.enableFeature monolithic "monolithic")
(lib.enableFeature enableDaemon "amule-daemon")
(lib.enableFeature client "amule-gui")
(lib.enableFeature httpServer "webserver")
];
# aMule will try to `dlopen' libupnp and libixml, so help it
# find them.
postInstall = lib.optionalString monolithic ''
2019-09-23 05:05:43 +02:00
wrapProgram $out/bin/amule \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libupnp ]}
'';
2019-09-23 05:05:43 +02:00
meta = with lib; {
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.
'';
homepage = "https://github.com/amule-project/amule";
2019-09-23 05:05:43 +02:00
license = licenses.gpl2Plus;
maintainers = with maintainers; [ phreedom ];
platforms = platforms.unix;
};
}