Skip to content

Commit

Permalink
Added flags to compile amule daemon and remote gui
Browse files Browse the repository at this point in the history
svn path=/nixpkgs/trunk/; revision=22334
  • Loading branch information
Evgeny Egorochkin committed Jun 19, 2010
1 parent 0f77615 commit 4719a2e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
34 changes: 26 additions & 8 deletions pkgs/tools/networking/p2p/amule/default.nix
@@ -1,7 +1,17 @@
{ fetchurl, stdenv, zlib, wxGTK, perl, cryptopp, libupnp, gettext
{ monolithic ? true # build monolithic amule
, daemon ? false # build amule daemon
, httpServer ? false # build web interface for the daemon
, client ? false # build amule remote gui
, fetchurl, stdenv, zlib, wxGTK, perl, cryptopp, libupnp, gettext, libpng ? null
, pkgconfig, makeWrapper }:

stdenv.mkDerivation rec {
assert httpServer -> libpng != null;
with stdenv;
let
# Enable/Disable Feature
edf = enabled: flag: if enabled then "--enable-" + flag else "--disable-" + flag;
in
mkDerivation rec {
name = "aMule-2.2.6";

src = fetchurl {
Expand All @@ -10,9 +20,18 @@ stdenv.mkDerivation rec {
};

buildInputs =
[ zlib wxGTK perl cryptopp libupnp gettext pkgconfig makeWrapper ];
[ zlib wxGTK perl cryptopp libupnp gettext pkgconfig makeWrapper ]
++ lib.optional httpServer libpng;

configureFlags = "--with-crypto-prefix=${cryptopp}";
configureFlags = ''
--with-crypto-prefix=${cryptopp}
--disable-debug
--enable-optimize
${edf monolithic "monolithic"}
${edf daemon "amule-daemon"}
${edf client "amule-gui"}
${edf httpServer "webserver"}
'';

postConfigure = ''
sed -i "src/libs/ec/file_generator.pl" \
Expand All @@ -21,9 +40,8 @@ stdenv.mkDerivation rec {

# aMule will try to `dlopen' libupnp and libixml, so help it
# find them.
postInstall = ''
wrapProgram "$out/bin/amule" \
--prefix LD_LIBRARY_PATH ":" "${libupnp}/lib"
postInstall = lib.optionalString monolithic ''
wrapProgram "$out/bin/amule" --prefix LD_LIBRARY_PATH ":" "${libupnp}/lib"
'';

meta = {
Expand All @@ -44,6 +62,6 @@ stdenv.mkDerivation rec {
license = "GPLv2+";

platforms = stdenv.lib.platforms.gnu; # arbitrary choice
maintainers = [ stdenv.lib.maintainers.ludo ];
maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.phreedom ];
};
}
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Expand Up @@ -375,7 +375,7 @@ let

amule = import ../tools/networking/p2p/amule {
inherit fetchurl stdenv zlib perl cryptopp gettext libupnp makeWrapper
wxGTK pkgconfig;
wxGTK pkgconfig libpng;
};

aria = builderDefsPackage (import ../tools/networking/aria) {
Expand Down

0 comments on commit 4719a2e

Please sign in to comment.