2014-01-29 11:53:39 +01:00
|
|
|
{ fetchgit, stdenv, pkgconfig, libtool, autoconf, automake
|
|
|
|
, curl, ncurses, amdappsdk, amdadlsdk, xorg, jansson }:
|
2013-06-16 23:38:12 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-12-13 10:15:35 +01:00
|
|
|
version = "3.7.2";
|
2013-06-16 23:38:12 +02:00
|
|
|
name = "cgminer-${version}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/ckolivas/cgminer.git";
|
2013-12-13 10:15:35 +01:00
|
|
|
rev = "refs/tags/v3.7.2";
|
2016-06-02 13:26:44 +02:00
|
|
|
sha256 = "1xfzx91dpwjj1vmhas3v9ybs0p2i74lrhinijmpav15acfggm9fq";
|
2013-06-16 23:38:12 +02:00
|
|
|
};
|
|
|
|
|
2017-09-14 21:24:37 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2013-12-13 10:15:35 +01:00
|
|
|
buildInputs = [
|
2017-09-14 21:24:37 +02:00
|
|
|
autoconf automake libtool curl ncurses amdappsdk amdadlsdk
|
2013-12-13 10:15:35 +01:00
|
|
|
xorg.libX11 xorg.libXext xorg.libXinerama jansson
|
|
|
|
];
|
2013-06-16 23:38:12 +02:00
|
|
|
configureScript = "./autogen.sh";
|
2013-12-13 10:15:35 +01:00
|
|
|
configureFlags = "--enable-scrypt --enable-opencl";
|
2013-06-16 23:38:12 +02:00
|
|
|
NIX_LDFLAGS = "-lgcc_s -lX11 -lXext -lXinerama";
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
ln -s ${amdadlsdk}/include/* ADL_SDK/
|
|
|
|
'';
|
|
|
|
|
|
|
|
postBuild = ''
|
2013-12-13 10:15:35 +01:00
|
|
|
gcc api-example.c -o cgminer-api
|
2013-06-16 23:38:12 +02: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 22:03:30 +02:00
|
|
|
homepage = https://github.com/ckolivas/cgminer;
|
2013-06-16 23:38:12 +02:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.offline ];
|
2014-01-29 11:53:39 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
hydraPlatforms = [];
|
2013-06-16 23:38:12 +02:00
|
|
|
};
|
|
|
|
}
|