nixpkgs/pkgs/applications/misc/xmr-stak/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, lib, fetchpatch
, fetchFromGitHub, cmake, libmicrohttpd, openssl
, opencl-headers, ocl-icd, hwloc
2017-12-11 08:42:44 +00:00
, devDonationLevel ? "0.0"
2018-03-28 04:54:22 +00:00
, openclSupport ? true
2017-12-11 03:22:47 +00:00
}:
stdenv.mkDerivation rec {
2022-03-07 11:37:20 +00:00
pname = "xmr-stak";
2019-12-10 02:07:07 +00:00
version = "2.10.8";
2017-12-11 03:22:47 +00:00
src = fetchFromGitHub {
owner = "fireice-uk";
repo = "xmr-stak";
2019-09-08 23:38:31 +00:00
rev = version;
2019-12-10 02:07:07 +00:00
sha256 = "0ilx5mhh91ks7dwvykfyynh53l6vkkignjpwkkss8ss6b2k8gdbj";
2017-12-11 03:22:47 +00:00
};
env.NIX_CFLAGS_COMPILE = "-O3";
2017-12-11 03:22:47 +00:00
patches = [ (fetchpatch {
name = "fix-libmicrohttpd-0-9-71.patch";
url = "https://github.com/fireice-uk/xmr-stak/compare/06e08780eab54dbc025ce3f38c948e4eef2726a0...8adb208987f5881946992ab9cd9a45e4e2a4b870.patch";
excludes = [ "CMakeLists.txt.user" ];
hash = "sha256-Yv0U5EO1P5eikn1fKvUXEwemoUIjjeTjpP9p5J8pbC0=";
}) ];
cmakeFlags = [ "-DCUDA_ENABLE=OFF" ]
2017-12-12 13:27:49 +00:00
++ lib.optional (!openclSupport) "-DOpenCL_ENABLE=OFF";
2017-12-11 03:22:47 +00:00
nativeBuildInputs = [ cmake ];
buildInputs = [ libmicrohttpd openssl hwloc ]
2017-12-12 13:27:49 +00:00
++ lib.optionals openclSupport [ opencl-headers ocl-icd ];
2017-12-11 03:22:47 +00:00
postPatch = ''
substituteInPlace xmrstak/donate-level.hpp \
2017-12-11 08:42:44 +00:00
--replace 'fDevDonationLevel = 2.0' 'fDevDonationLevel = ${devDonationLevel}'
2017-12-11 03:22:47 +00:00
'';
meta = with lib; {
description = "Unified All-in-one Monero miner";
homepage = "https://github.com/fireice-uk/xmr-stak";
license = licenses.gpl3Plus;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ bfortz ];
2017-12-11 03:22:47 +00:00
};
}