42f2bd3a5d
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. These checks were done: - built on NixOS - ran ‘/nix/store/xdp6rb1bvdmpkd77vbqq8dq175dfvrvl-xmr-stak-2.4.3/bin/xmr-stak -h’ got 0 exit code - ran ‘/nix/store/xdp6rb1bvdmpkd77vbqq8dq175dfvrvl-xmr-stak-2.4.3/bin/xmr-stak --help’ got 0 exit code - found 2.4.3 with grep in /nix/store/xdp6rb1bvdmpkd77vbqq8dq175dfvrvl-xmr-stak-2.4.3 - directory tree listing: https://gist.github.com/ba044f08ae439ad36ac7e143f14e0fb0
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, openssl
|
|
, opencl-headers, ocl-icd, hwloc, cudatoolkit
|
|
, devDonationLevel ? "0.0"
|
|
, cudaSupport ? false
|
|
, openclSupport ? true
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "xmr-stak-${version}";
|
|
version = "2.4.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "fireice-uk";
|
|
repo = "xmr-stak";
|
|
rev = "${version}";
|
|
sha256 = "0plks4yyd9gjnfg7sfsgsvdgczkbghf5xjwb8bzv01f0fndn10r1";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|