Merge pull request #120588 from Atemu/ethminer-free
ethminer: provide a CUDA-free version
This commit is contained in:
commit
f9f094e690
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
|
stdenv,
|
||||||
clangStdenv,
|
clangStdenv,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
opencl-headers,
|
opencl-headers,
|
||||||
@ -8,6 +9,7 @@
|
|||||||
boost,
|
boost,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
cudatoolkit,
|
cudatoolkit,
|
||||||
|
cudaSupport,
|
||||||
mesa,
|
mesa,
|
||||||
ethash,
|
ethash,
|
||||||
opencl-info,
|
opencl-info,
|
||||||
@ -15,22 +17,22 @@
|
|||||||
openssl,
|
openssl,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
cli11
|
cli11
|
||||||
}:
|
}@args:
|
||||||
|
|
||||||
# Note that this requires clang < 9.0 to build, and currently
|
# Note that this requires clang < 9.0 to build, and currently
|
||||||
# clangStdenv provides clang 7.1 which satisfies the requirement.
|
# clangStdenv provides clang 7.1 which satisfies the requirement.
|
||||||
let stdenv = clangStdenv;
|
let stdenv = if cudaSupport then clangStdenv else args.stdenv;
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "ethminer";
|
pname = "ethminer";
|
||||||
version = "0.18.0";
|
version = "0.19.0";
|
||||||
|
|
||||||
src =
|
src =
|
||||||
fetchFromGitHub {
|
fetchFromGitHub {
|
||||||
owner = "ethereum-mining";
|
owner = "ethereum-mining";
|
||||||
repo = "ethminer";
|
repo = "ethminer";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "10b6s35axmx8kyzn2vid6l5nnzcaf4nkk7f5f7lg3cizv6lsj707";
|
sha256 = "1kyff3vx2r4hjpqah9qk99z6dwz7nsnbnhhl6a76mdhjmgp1q646";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -41,6 +43,8 @@ in stdenv.mkDerivation rec {
|
|||||||
"-DAPICORE=ON"
|
"-DAPICORE=ON"
|
||||||
"-DETHDBUS=OFF"
|
"-DETHDBUS=OFF"
|
||||||
"-DCMAKE_BUILD_TYPE=Release"
|
"-DCMAKE_BUILD_TYPE=Release"
|
||||||
|
] ++ lib.optionals (!cudaSupport) [
|
||||||
|
"-DETHASHCUDA=OFF" # on by default
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -54,12 +58,13 @@ in stdenv.mkDerivation rec {
|
|||||||
boost
|
boost
|
||||||
opencl-headers
|
opencl-headers
|
||||||
mesa
|
mesa
|
||||||
cudatoolkit
|
|
||||||
ethash
|
ethash
|
||||||
opencl-info
|
opencl-info
|
||||||
ocl-icd
|
ocl-icd
|
||||||
openssl
|
openssl
|
||||||
jsoncpp
|
jsoncpp
|
||||||
|
] ++ lib.optionals cudaSupport [
|
||||||
|
cudatoolkit
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
@ -71,10 +76,11 @@ in stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
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";
|
homepage = "https://github.com/ethereum-mining/ethminer";
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
maintainers = with maintainers; [ nand0p ];
|
maintainers = with maintainers; [ nand0p atemu ];
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl3Only;
|
||||||
|
broken = cudaSupport;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -3485,7 +3485,9 @@ in
|
|||||||
|
|
||||||
ethash = callPackage ../development/libraries/ethash { };
|
ethash = callPackage ../development/libraries/ethash { };
|
||||||
|
|
||||||
ethminer = callPackage ../tools/misc/ethminer { };
|
ethminer = callPackage ../tools/misc/ethminer { cudaSupport = config.cudaSupport or true; };
|
||||||
|
ethminer-cuda = ethminer.override { cudaSupport = true; };
|
||||||
|
ethminer-free = ethminer.override { cudaSupport = false; };
|
||||||
|
|
||||||
cuetools = callPackage ../tools/cd-dvd/cuetools { };
|
cuetools = callPackage ../tools/cd-dvd/cuetools { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user