2019-12-14 14:56:28 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
opencl-headers,
|
|
|
|
cmake,
|
|
|
|
jsoncpp,
|
|
|
|
boost,
|
|
|
|
makeWrapper,
|
|
|
|
cudatoolkit,
|
|
|
|
mesa,
|
|
|
|
ethash,
|
|
|
|
opencl-info,
|
|
|
|
ocl-icd,
|
|
|
|
openssl,
|
|
|
|
pkg-config,
|
|
|
|
cli11
|
|
|
|
}:
|
2019-03-21 21:39:53 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ethminer";
|
2019-12-14 14:56:28 +00:00
|
|
|
version = "0.18.0";
|
2019-03-21 21:39:53 +00:00
|
|
|
|
|
|
|
src =
|
|
|
|
fetchFromGitHub {
|
|
|
|
owner = "ethereum-mining";
|
|
|
|
repo = "ethminer";
|
|
|
|
rev = "v${version}";
|
2019-12-14 14:56:28 +00:00
|
|
|
sha256 = "10b6s35axmx8kyzn2vid6l5nnzcaf4nkk7f5f7lg3cizv6lsj707";
|
2019-03-21 21:39:53 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# NOTE: dbus is broken
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DHUNTER_ENABLED=OFF"
|
|
|
|
"-DETHASHCUDA=ON"
|
|
|
|
"-DAPICORE=ON"
|
|
|
|
"-DETHDBUS=OFF"
|
|
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cli11
|
|
|
|
boost
|
|
|
|
opencl-headers
|
|
|
|
mesa
|
|
|
|
cudatoolkit
|
|
|
|
ethash
|
|
|
|
opencl-info
|
|
|
|
ocl-icd
|
|
|
|
openssl
|
|
|
|
jsoncpp
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sed -i 's/_lib_static//' libpoolprotocols/CMakeLists.txt
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/ethminer --prefix LD_LIBRARY_PATH : /run/opengl-driver/lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Ethereum miner with OpenCL, CUDA and stratum support";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/ethereum-mining/ethminer";
|
2019-03-21 21:39:53 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ nand0p ];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|