1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-11 07:04:28 +00:00
nixpkgs/pkgs/tools/networking/p2p/amule/default.nix
Antoine R. Dumont (@ardumont) 1f7cf96291
amule: 2.3.2 -> unstable-20201006
There has been no new release since 2.3.2 for some years now (around 2016) [1]

The most recent master branch for the amule project includes a commit [2] which
fixes compilation breakage with the next libupnp version [3].

So this bumps the amule version to the latest commit of that repository.

[1] https://github.com/amule-project/amule/issues/219

[2] 8784480c79

[3] #93048
2020-10-06 23:35:22 +02:00

83 lines
2.6 KiB
Nix

{ monolithic ? true # build monolithic amule
, enableDaemon ? false # build amule daemon
, httpServer ? false # build web interface for the daemon
, client ? false # build amule remote gui
, fetchFromGitHub, fetchpatch, stdenv, lib, zlib, wxGTK, perl, cryptopp, libupnp, gettext, libpng ? null
, autoreconfHook, pkgconfig, makeWrapper, libX11 ? null }:
assert httpServer -> libpng != null;
assert client -> libX11 != null;
stdenv.mkDerivation rec {
pname = "amule";
version = "unstable-20201006";
src = fetchFromGitHub {
owner = "amule-project";
repo = "amule";
rev = "6f8951527eda670c7266984ce476061bfe8867fc";
sha256 = "12b44b6hz3mb7nsn6xhzvm726xs06xcim013i1appif4dr8njbx1";
};
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
'';
nativeBuildInputs = [ autoreconfHook gettext makeWrapper pkgconfig ];
buildInputs = [
zlib wxGTK perl cryptopp libupnp
] ++ lib.optional httpServer libpng
++ lib.optional client libX11;
enableParallelBuilding = true;
configureFlags = [
"--with-crypto-prefix=${cryptopp}"
"--disable-debug"
"--enable-optimize"
(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 ''
wrapProgram $out/bin/amule \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libupnp ]}
'';
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";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ phreedom ];
platforms = platforms.unix;
};
}