Merge pull request #200388 from babbaj/remove-ethminer

ethminer: remove

authored by Anderson Torres and committed by GitHub 3a73976c fbecf5ae

-241
-1
nixos/modules/module-list.nix
··· 575 575 ./services/misc/etcd.nix 576 576 ./services/misc/etebase-server.nix 577 577 ./services/misc/etesync-dav.nix 578 - ./services/misc/ethminer.nix 579 578 ./services/misc/exhibitor.nix 580 579 ./services/misc/felix.nix 581 580 ./services/misc/freeswitch.nix
-117
nixos/modules/services/misc/ethminer.nix
··· 1 - { config, lib, pkgs, ... }: 2 - 3 - with lib; 4 - 5 - let 6 - cfg = config.services.ethminer; 7 - poolUrl = escapeShellArg "stratum1+tcp://${cfg.wallet}@${cfg.pool}:${toString cfg.stratumPort}/${cfg.rig}/${cfg.registerMail}"; 8 - in 9 - 10 - { 11 - 12 - ###### interface 13 - 14 - options = { 15 - 16 - services.ethminer = { 17 - 18 - enable = mkOption { 19 - type = types.bool; 20 - default = false; 21 - description = lib.mdDoc "Enable ethminer ether mining."; 22 - }; 23 - 24 - recheckInterval = mkOption { 25 - type = types.ints.unsigned; 26 - default = 2000; 27 - description = lib.mdDoc "Interval in milliseconds between farm rechecks."; 28 - }; 29 - 30 - toolkit = mkOption { 31 - type = types.enum [ "cuda" "opencl" ]; 32 - default = "cuda"; 33 - description = lib.mdDoc "Cuda or opencl toolkit."; 34 - }; 35 - 36 - apiPort = mkOption { 37 - type = types.int; 38 - default = -3333; 39 - description = lib.mdDoc "Ethminer api port. minus sign puts api in read-only mode."; 40 - }; 41 - 42 - wallet = mkOption { 43 - type = types.str; 44 - example = "0x0123456789abcdef0123456789abcdef01234567"; 45 - description = lib.mdDoc "Ethereum wallet address."; 46 - }; 47 - 48 - pool = mkOption { 49 - type = types.str; 50 - example = "eth-us-east1.nanopool.org"; 51 - description = lib.mdDoc "Mining pool address."; 52 - }; 53 - 54 - stratumPort = mkOption { 55 - type = types.port; 56 - default = 9999; 57 - description = lib.mdDoc "Stratum protocol tcp port."; 58 - }; 59 - 60 - rig = mkOption { 61 - type = types.str; 62 - default = "mining-rig-name"; 63 - description = lib.mdDoc "Mining rig name."; 64 - }; 65 - 66 - registerMail = mkOption { 67 - type = types.str; 68 - example = "email%40example.org"; 69 - description = lib.mdDoc "Url encoded email address to register with pool."; 70 - }; 71 - 72 - maxPower = mkOption { 73 - type = types.ints.unsigned; 74 - default = 113; 75 - description = lib.mdDoc "Miner max watt usage."; 76 - }; 77 - 78 - }; 79 - 80 - }; 81 - 82 - 83 - ###### implementation 84 - 85 - config = mkIf cfg.enable { 86 - 87 - systemd.services.ethminer = { 88 - path = optionals (cfg.toolkit == "cuda") [ pkgs.cudaPackages.cudatoolkit ]; 89 - description = "ethminer ethereum mining service"; 90 - wantedBy = [ "multi-user.target" ]; 91 - after = [ "network.target" ]; 92 - 93 - serviceConfig = { 94 - DynamicUser = true; 95 - ExecStartPre = "${pkgs.ethminer}/bin/.ethminer-wrapped --list-devices"; 96 - ExecStartPost = optional (cfg.toolkit == "cuda") "+${getBin config.boot.kernelPackages.nvidia_x11}/bin/nvidia-smi -pl ${toString cfg.maxPower}"; 97 - Restart = "always"; 98 - }; 99 - 100 - environment = mkIf (cfg.toolkit == "cuda") { 101 - LD_LIBRARY_PATH = "${config.boot.kernelPackages.nvidia_x11}/lib"; 102 - }; 103 - 104 - script = '' 105 - ${pkgs.ethminer}/bin/.ethminer-wrapped \ 106 - --farm-recheck ${toString cfg.recheckInterval} \ 107 - --report-hashrate \ 108 - --${cfg.toolkit} \ 109 - --api-port ${toString cfg.apiPort} \ 110 - --pool ${poolUrl} 111 - ''; 112 - 113 - }; 114 - 115 - }; 116 - 117 - }
-25
pkgs/tools/misc/ethminer/add-global-context.patch
··· 1 - diff --git a/libethcore/CMakeLists.txt b/libethcore/CMakeLists.txt 2 - index 1a53de8..832e926 100644 3 - --- a/libethcore/CMakeLists.txt 4 - +++ b/libethcore/CMakeLists.txt 5 - @@ -7,7 +7,7 @@ set(SOURCES 6 - include_directories(BEFORE ..) 7 - 8 - add_library(ethcore ${SOURCES}) 9 - -target_link_libraries(ethcore PUBLIC devcore ethash::ethash PRIVATE hwmon) 10 - +target_link_libraries(ethcore PUBLIC devcore ethash::ethash ethash-global-context PRIVATE hwmon) 11 - 12 - if(ETHASHCL) 13 - target_link_libraries(ethcore PRIVATE ethash-cl) 14 - diff --git a/libethcore/EthashAux.h b/libethcore/EthashAux.h 15 - index d9aadc7..fe5c6cf 100644 16 - --- a/libethcore/EthashAux.h 17 - +++ b/libethcore/EthashAux.h 18 - @@ -22,6 +22,7 @@ 19 - #include <libdevcore/Worker.h> 20 - 21 - #include <ethash/ethash.hpp> 22 - +#include <ethash/global_context.hpp> 23 - 24 - namespace dev 25 - {
-94
pkgs/tools/misc/ethminer/default.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - fetchpatch, 5 - fetchFromGitHub, 6 - opencl-headers, 7 - cmake, 8 - jsoncpp, 9 - boost16x, 10 - makeWrapper, 11 - cudatoolkit, 12 - cudaSupport, 13 - mesa, 14 - ethash, 15 - opencl-info, 16 - ocl-icd, 17 - openssl, 18 - pkg-config, 19 - cli11 20 - }: 21 - 22 - stdenv.mkDerivation rec { 23 - pname = "ethminer"; 24 - version = "0.19.0"; 25 - 26 - src = 27 - fetchFromGitHub { 28 - owner = "ethereum-mining"; 29 - repo = "ethminer"; 30 - rev = "v${version}"; 31 - sha256 = "1kyff3vx2r4hjpqah9qk99z6dwz7nsnbnhhl6a76mdhjmgp1q646"; 32 - fetchSubmodules = true; 33 - }; 34 - 35 - patches = [ 36 - # global context library is separated from libethash 37 - ./add-global-context.patch 38 - 39 - # CUDA 11 no longer support SM30 40 - (fetchpatch { 41 - url = "https://github.com/ethereum-mining/ethminer/commit/dae359dff28f376d4ce7ddfbd651dcd34d6dad8f.patch"; 42 - hash = "sha256-CJGKc0rXOcKDX1u5VBzc8gyBi1Me9CNATfQzKViqtAA="; 43 - }) 44 - ]; 45 - 46 - postPatch = '' 47 - sed -i 's/_lib_static//' libpoolprotocols/CMakeLists.txt 48 - ''; 49 - 50 - # NOTE: dbus is broken 51 - cmakeFlags = [ 52 - "-DHUNTER_ENABLED=OFF" 53 - "-DETHASHCUDA=ON" 54 - "-DAPICORE=ON" 55 - "-DETHDBUS=OFF" 56 - "-DCMAKE_BUILD_TYPE=Release" 57 - ] ++ (if cudaSupport then [ 58 - "-DCUDA_PROPAGATE_HOST_FLAGS=off" 59 - ] else [ 60 - "-DETHASHCUDA=OFF" # on by default 61 - ]); 62 - 63 - nativeBuildInputs = [ 64 - cmake 65 - pkg-config 66 - makeWrapper 67 - ]; 68 - 69 - buildInputs = [ 70 - cli11 71 - boost16x # 1.7x support is broken, see https://github.com/ethereum-mining/ethminer/issues/2393 72 - opencl-headers 73 - mesa 74 - ethash 75 - opencl-info 76 - ocl-icd 77 - openssl 78 - jsoncpp 79 - ] ++ lib.optionals cudaSupport [ 80 - cudatoolkit 81 - ]; 82 - 83 - postInstall = '' 84 - wrapProgram $out/bin/ethminer --prefix LD_LIBRARY_PATH : /run/opengl-driver/lib 85 - ''; 86 - 87 - meta = with lib; { 88 - description = "Ethereum miner with OpenCL${lib.optionalString cudaSupport ", CUDA"} and stratum support"; 89 - homepage = "https://github.com/ethereum-mining/ethminer"; 90 - platforms = [ "x86_64-linux" ]; 91 - maintainers = with maintainers; [ atemu ]; 92 - license = licenses.gpl3Only; 93 - }; 94 - }
-4
pkgs/top-level/all-packages.nix
··· 5389 5389 5390 5390 ethash = callPackage ../development/libraries/ethash { }; 5391 5391 5392 - ethminer = callPackage ../tools/misc/ethminer { cudaSupport = config.cudaSupport or true; }; 5393 - ethminer-cuda = ethminer.override { cudaSupport = true; }; 5394 - ethminer-free = ethminer.override { cudaSupport = false; }; 5395 - 5396 5392 cuetools = callPackage ../tools/cd-dvd/cuetools { }; 5397 5393 5398 5394 u3-tool = callPackage ../tools/filesystems/u3-tool { };