Author: egorochkin Date: 2010-06-19 02:19:39 +0000 (Sat, 19 Jun 2010) New Revision: 22334
You can view the changes in this commit at: https://svn.nixos.org/viewvc/nix?rev=22334&view=rev Modified: nixpkgs/trunk/pkgs/tools/networking/p2p/amule/default.nix nixpkgs/trunk/pkgs/top-level/all-packages.nix Log: Added flags to compile amule daemon and remote gui Changes: Modified: nixpkgs/trunk/pkgs/tools/networking/p2p/amule/default.nix =================================================================== --- nixpkgs/trunk/pkgs/tools/networking/p2p/amule/default.nix 2010-06-18 19:57:11 UTC (rev 22333) +++ nixpkgs/trunk/pkgs/tools/networking/p2p/amule/default.nix 2010-06-19 02:19:39 UTC (rev 22334) @@ -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 { @@ -10,9 +20,18 @@ }; 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" \ @@ -21,9 +40,8 @@ # 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 = { @@ -44,6 +62,6 @@ license = "GPLv2+"; platforms = stdenv.lib.platforms.gnu; # arbitrary choice - maintainers = [ stdenv.lib.maintainers.ludo ]; + maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.phreedom ]; }; } Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix =================================================================== --- nixpkgs/trunk/pkgs/top-level/all-packages.nix 2010-06-18 19:57:11 UTC (rev 22333) +++ nixpkgs/trunk/pkgs/top-level/all-packages.nix 2010-06-19 02:19:39 UTC (rev 22334) @@ -375,7 +375,7 @@ 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) { _______________________________________________ nix-commits mailing list [email protected] http://mail.cs.uu.nl/mailman/listinfo/nix-commits
