2014-01-29 02:53:39 -08:00
|
|
|
{ fetchgit, stdenv, pkgconfig, libtool, autoconf, automake
|
2019-05-21 11:18:34 -07:00
|
|
|
, curl, ncurses, ocl-icd, opencl-headers, xorg, jansson }:
|
2013-06-16 14:38:12 -07:00
|
|
|
|
2019-08-13 14:52:01 -07:00
|
|
|
stdenv.mkDerivation {
|
2013-12-13 01:15:35 -08:00
|
|
|
version = "3.7.2";
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "cgminer";
|
2013-06-16 14:38:12 -07:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/ckolivas/cgminer.git";
|
2013-12-13 01:15:35 -08:00
|
|
|
rev = "refs/tags/v3.7.2";
|
2016-06-02 04:26:44 -07:00
|
|
|
sha256 = "1xfzx91dpwjj1vmhas3v9ybs0p2i74lrhinijmpav15acfggm9fq";
|
2013-06-16 14:38:12 -07:00
|
|
|
};
|
|
|
|
|
2017-09-14 12:24:37 -07:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2013-12-13 01:15:35 -08:00
|
|
|
buildInputs = [
|
2019-05-21 11:18:34 -07:00
|
|
|
autoconf automake libtool curl ncurses ocl-icd opencl-headers
|
2013-12-13 01:15:35 -08:00
|
|
|
xorg.libX11 xorg.libXext xorg.libXinerama jansson
|
|
|
|
];
|
2013-06-16 14:38:12 -07:00
|
|
|
configureScript = "./autogen.sh";
|
2018-07-25 14:44:21 -07:00
|
|
|
configureFlags = [ "--enable-scrypt" "--enable-opencl" ];
|
2013-06-16 14:38:12 -07:00
|
|
|
NIX_LDFLAGS = "-lgcc_s -lX11 -lXext -lXinerama";
|
|
|
|
|
|
|
|
postBuild = ''
|
2013-12-13 01:15:35 -08:00
|
|
|
gcc api-example.c -o cgminer-api
|
2013-06-16 14:38:12 -07:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp cgminer-api $out/bin/
|
|
|
|
chmod 444 $out/bin/*.cl
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "CPU/GPU miner in c for bitcoin";
|
|
|
|
longDescription= ''
|
|
|
|
This is a multi-threaded multi-pool GPU, FPGA and ASIC miner with ATI GPU
|
|
|
|
monitoring, (over)clocking and fanspeed support for bitcoin and derivative
|
|
|
|
coins. Do not use on multiple block chains at the same time!
|
|
|
|
'';
|
2017-08-01 13:03:30 -07:00
|
|
|
homepage = https://github.com/ckolivas/cgminer;
|
2013-06-16 14:38:12 -07:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.offline ];
|
2014-01-29 02:53:39 -08:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
hydraPlatforms = [];
|
2013-06-16 14:38:12 -07:00
|
|
|
};
|
|
|
|
}
|