From 4d76f87c13e949b938f58560b59a6931644b6e69 Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Sun, 16 Jun 2013 21:38:12 +0000 Subject: [PATCH] Add cgminer: gpu, fpga and asic crypto currencies mining application --- pkgs/applications/misc/cgminer/default.nix | 44 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 48 insertions(+) create mode 100644 pkgs/applications/misc/cgminer/default.nix diff --git a/pkgs/applications/misc/cgminer/default.nix b/pkgs/applications/misc/cgminer/default.nix new file mode 100644 index 000000000000..4ae404a002f1 --- /dev/null +++ b/pkgs/applications/misc/cgminer/default.nix @@ -0,0 +1,44 @@ +{ fetchgit, stdenv, pkgconfig, libtool, autoconf, automake, + curl, ncurses, amdappsdk, amdadlsdk, xorg }: + +stdenv.mkDerivation rec { + version = "2.11.4"; + name = "cgminer-${version}"; + + src = fetchgit { + url = "https://github.com/ckolivas/cgminer.git"; + rev = "96c8ff5f10f2d8f0cf4d1bd889e8eeac2e4aa715"; + sha256 = "1vf9agy4vw50cap03qig2y65hdrsdy7cknkzyagv89w5xb230r9a"; + }; + + buildInputs = [ autoconf automake pkgconfig libtool curl ncurses amdappsdk amdadlsdk xorg.libX11 xorg.libXext xorg.libXinerama ]; + configureScript = "./autogen.sh"; + configureFlags = "--enable-scrypt"; + NIX_LDFLAGS = "-lgcc_s -lX11 -lXext -lXinerama"; + + preConfigure = '' + ln -s ${amdadlsdk}/include/* ADL_SDK/ + ''; + + postBuild = '' + gcc api-example.c -I compat/jansson -o cgminer-api + ''; + + 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! + ''; + homepage = "https://github.com/ckolivas/cgminer"; + license = licenses.gpl3; + maintainers = [ maintainers.offline ]; + platforms = [ "i686-linux" "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c9b40f1cf5ce..9ba1d2515633 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6941,6 +6941,10 @@ let cgit = callPackage ../applications/version-management/git-and-tools/cgit { }; + cgminer = callPackage ../applications/misc/cgminer { + amdappsdk = amdappsdk28; + }; + chatzilla = callPackage ../applications/networking/irc/chatzilla { xulrunner = firefox36Pkgs.xulrunner; };