summary refs log tree commit diff
path: root/pkgs/tools/misc/ethminer
diff options
context:
space:
mode:
authorFernando J Pando <fernando.pando@stelligent.com>2019-03-21 17:39:53 -0400
committerFernando J Pando <fernando.pando@stelligent.com>2019-04-20 09:23:03 -0400
commit3bfff36bdc05fcc79f6294cf9583cfd8520ba611 (patch)
tree3c4d26f1dc135193bb69ac2c515f01b61986bb74 /pkgs/tools/misc/ethminer
parentc1d65d680b29c613eef2a6583c11f0586416ecb9 (diff)
downloadnixpkgs-3bfff36bdc05fcc79f6294cf9583cfd8520ba611.tar
nixpkgs-3bfff36bdc05fcc79f6294cf9583cfd8520ba611.tar.gz
nixpkgs-3bfff36bdc05fcc79f6294cf9583cfd8520ba611.tar.bz2
nixpkgs-3bfff36bdc05fcc79f6294cf9583cfd8520ba611.tar.lz
nixpkgs-3bfff36bdc05fcc79f6294cf9583cfd8520ba611.tar.xz
nixpkgs-3bfff36bdc05fcc79f6294cf9583cfd8520ba611.tar.zst
nixpkgs-3bfff36bdc05fcc79f6294cf9583cfd8520ba611.zip
ethminer: init at 0.18.0-rc.0
- Tested on NixOS
Diffstat (limited to 'pkgs/tools/misc/ethminer')
-rw-r--r--pkgs/tools/misc/ethminer/default.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/tools/misc/ethminer/default.nix b/pkgs/tools/misc/ethminer/default.nix
new file mode 100644
index 00000000000..8a270ed0fef
--- /dev/null
+++ b/pkgs/tools/misc/ethminer/default.nix
@@ -0,0 +1,61 @@
+{ stdenv, fetchFromGitHub, opencl-headers, cmake, jsoncpp, boost, makeWrapper,
+  cudatoolkit, mesa, ethash, opencl-info, ocl-icd, openssl, pkg-config, cli11 }:
+
+stdenv.mkDerivation rec {
+  pname = "ethminer";
+  version = "0.18.0-rc.0";
+
+  src =
+    fetchFromGitHub {
+      owner = "ethereum-mining";
+      repo = "ethminer";
+      rev = "v${version}";
+      sha256 = "0gwnwxahjfwr4d2aci7y3w206nc5ifssl28ildva98ys0d24wy7z";
+      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";
+    homepage = https://github.com/ethereum-mining/ethminer;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ nand0p ];
+    license = licenses.gpl2;
+  };
+
+}