diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/ethminer/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/misc/ethminer/default.nix | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/tools/misc/ethminer/default.nix b/nixpkgs/pkgs/tools/misc/ethminer/default.nix index 7d2cb5c7ff2c..675147bc5d57 100644 --- a/nixpkgs/pkgs/tools/misc/ethminer/default.nix +++ b/nixpkgs/pkgs/tools/misc/ethminer/default.nix @@ -1,6 +1,6 @@ { lib, - clangStdenv, + stdenv, fetchFromGitHub, opencl-headers, cmake, @@ -8,6 +8,7 @@ boost, makeWrapper, cudatoolkit, + cudaSupport, mesa, ethash, opencl-info, @@ -17,20 +18,16 @@ cli11 }: -# Note that this requires clang < 9.0 to build, and currently -# clangStdenv provides clang 7.1 which satisfies the requirement. -let stdenv = clangStdenv; - -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "ethminer"; - version = "0.18.0"; + version = "0.19.0"; src = fetchFromGitHub { owner = "ethereum-mining"; repo = "ethminer"; rev = "v${version}"; - sha256 = "10b6s35axmx8kyzn2vid6l5nnzcaf4nkk7f5f7lg3cizv6lsj707"; + sha256 = "1kyff3vx2r4hjpqah9qk99z6dwz7nsnbnhhl6a76mdhjmgp1q646"; fetchSubmodules = true; }; @@ -41,7 +38,11 @@ in stdenv.mkDerivation rec { "-DAPICORE=ON" "-DETHDBUS=OFF" "-DCMAKE_BUILD_TYPE=Release" - ]; + ] ++ (if cudaSupport then [ + "-DCUDA_PROPAGATE_HOST_FLAGS=off" + ] else [ + "-DETHASHCUDA=OFF" # on by default + ]); nativeBuildInputs = [ cmake @@ -54,12 +55,13 @@ in stdenv.mkDerivation rec { boost opencl-headers mesa - cudatoolkit ethash opencl-info ocl-icd openssl jsoncpp + ] ++ lib.optionals cudaSupport [ + cudatoolkit ]; preConfigure = '' @@ -71,10 +73,10 @@ in stdenv.mkDerivation rec { ''; meta = with lib; { - description = "Ethereum miner with OpenCL, CUDA and stratum support"; + description = "Ethereum miner with OpenCL${lib.optionalString cudaSupport ", CUDA"} and stratum support"; homepage = "https://github.com/ethereum-mining/ethminer"; platforms = [ "x86_64-linux" ]; - maintainers = with maintainers; [ nand0p ]; - license = licenses.gpl2; + maintainers = with maintainers; [ atemu ]; + license = licenses.gpl3Only; }; } |