15 stdenv.mkDerivation rec {
19 src = fetchFromGitHub {
23 sha256 = "0l1ms3nxnjzh4mpiadikvngcr9k3jnjqy3yna207za0va0c28dj5";
26 nativeBuildInputs = [ pkg-config autoconf automake ];
27 buildInputs = [ libtool curl ncurses ocl-icd opencl-headers
28 xorg.libX11 xorg.libXext xorg.libXinerama jansson libusb1 ];
30 configureScript = "./autogen.sh";
31 configureFlags = [ "--enable-scrypt"
42 # Workaround build failure on -fno-common toolchains like upstream
43 # gcc-10. Otherwise build fails as:
44 # ld: cgminer-driver-modminer.o:/build/source/miner.h:285:
45 # multiple definition of `bitforce_drv'; cgminer-cgminer.o:/build/source/miner.h:285:
47 env.NIX_CFLAGS_COMPILE = "-fcommon";
50 description = "CPU/GPU miner in c for bitcoin";
51 homepage = "https://github.com/ckolivas/cgminer";
52 license = licenses.gpl3;
53 maintainers = with maintainers; [ offline mmahut ];
54 platforms = platforms.linux;