3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/xmr-stak/default.nix
R. RyanTM 5170d0b9f7 xmr-stak: 2.10.4 -> 2.10.5
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/xmr-stak/versions
2019-06-18 11:34:28 -07:00

46 lines
1.2 KiB
Nix

{ stdenv, stdenvGcc6, lib
, fetchFromGitHub, cmake, libmicrohttpd, openssl
, opencl-headers, ocl-icd, hwloc, cudatoolkit
, devDonationLevel ? "0.0"
, cudaSupport ? false
, openclSupport ? true
}:
let
stdenv' = if cudaSupport then stdenvGcc6 else stdenv;
in
stdenv'.mkDerivation rec {
name = "xmr-stak-${version}";
version = "2.10.5";
src = fetchFromGitHub {
owner = "fireice-uk";
repo = "xmr-stak";
rev = "${version}";
sha256 = "16b6bj0rsr3cq9x3gxm54j197827d8lnfk7ghfjmaf7qa3q08adx";
};
NIX_CFLAGS_COMPILE = "-O3";
cmakeFlags = lib.optional (!cudaSupport) "-DCUDA_ENABLE=OFF"
++ lib.optional (!openclSupport) "-DOpenCL_ENABLE=OFF";
nativeBuildInputs = [ cmake ];
buildInputs = [ libmicrohttpd openssl hwloc ]
++ lib.optional cudaSupport cudatoolkit
++ lib.optionals openclSupport [ opencl-headers ocl-icd ];
postPatch = ''
substituteInPlace xmrstak/donate-level.hpp \
--replace 'fDevDonationLevel = 2.0' 'fDevDonationLevel = ${devDonationLevel}'
'';
meta = with lib; {
description = "Unified All-in-one Monero miner";
homepage = "https://github.com/fireice-uk/xmr-stak";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ fpletz bfortz ];
};
}