From 8c35bc9e14c01f40890aff62178fb683f7a02d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanpe=20Bol=C3=ADvar?= Date: Sun, 4 Sep 2022 14:39:18 +0200 Subject: [PATCH] amuled: add option to only build web, add top-level amule-web (#176775) --- pkgs/tools/networking/p2p/amule/default.nix | 16 +++++++++++++--- pkgs/top-level/all-packages.nix | 5 +++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/p2p/amule/default.nix b/pkgs/tools/networking/p2p/amule/default.nix index 9431da7cf468..7538bb941260 100644 --- a/pkgs/tools/networking/p2p/amule/default.nix +++ b/pkgs/tools/networking/p2p/amule/default.nix @@ -21,10 +21,11 @@ }: # daemon and client are not build monolithic -assert monolithic || (!monolithic && (enableDaemon || client)); +assert monolithic || (!monolithic && (enableDaemon || client || httpServer)); stdenv.mkDerivation rec { pname = "amule" + + lib.optionalString httpServer "-web" + lib.optionalString enableDaemon "-daemon" + lib.optionalString client "-gui"; version = "2.3.3"; @@ -53,8 +54,18 @@ stdenv.mkDerivation rec { "-DBUILD_DAEMON=${if enableDaemon then "ON" else "OFF"}" "-DBUILD_REMOTEGUI=${if client then "ON" else "OFF"}" "-DBUILD_WEBSERVER=${if httpServer then "ON" else "OFF"}" + # building only the daemon fails when these are not set... this is + # due to mistakes in the Amule cmake code, but it does not cause + # extra code to be built... + "-Dwx_NEED_GUI=ON" + "-Dwx_NEED_ADV=ON" + "-Dwx_NEED_NET=ON" ]; + postPatch = '' + echo "find_package(Threads)" >> cmake/options.cmake + ''; + # aMule will try to `dlopen' libupnp and libixml, so help it # find them. postInstall = lib.optionalString monolithic '' @@ -79,7 +90,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2Plus; maintainers = with maintainers; [ ]; platforms = platforms.unix; - # cmake fails: Cannot specify link libraries for target "wxWidgets::ADV" which is not built by this project. - broken = enableDaemon || stdenv.isDarwin; + broken = stdenv.isDarwin; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25f4acb9b6c1..54bc4eb21a8e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2211,6 +2211,11 @@ with pkgs; client = true; }; + amule-web = amule.override { + monolithic = false; + httpServer = true; + }; + antennas = nodePackages.antennas; apg = callPackage ../tools/security/apg { };