1c479b27fa
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 - /nix/store/wbq2l97g7y24hnbz1zzs17yl8qh1csd3-xmr-stak-2.4.5/bin/xmr-stak passed the binary check. - Warning: no invocation of /nix/store/wbq2l97g7y24hnbz1zzs17yl8qh1csd3-xmr-stak-2.4.5/bin/libxmrstak_opencl_backend.so had a zero exit code or showed the expected version - 1 of 2 passed binary check by having a zero exit code. - 0 of 2 passed binary check by having the new version present in output. - found 2.4.5 with grep in /nix/store/wbq2l97g7y24hnbz1zzs17yl8qh1csd3-xmr-stak-2.4.5 - directory tree listing: https://gist.github.com/d748f1490c29ab43e9426b5d283a5e4e - du listing: https://gist.github.com/06e416d3c3db5caf733655c9ab632eea
46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{ stdenv, stdenvGcc6, lib
|
|
, fetchFromGitHub, cmake, libuv, 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.4.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "fireice-uk";
|
|
repo = "xmr-stak";
|
|
rev = "${version}";
|
|
sha256 = "0ix4vqhcm4x9j5p6pwdfwkm2ml6wmwsyn3ppzvxllhp4dj8blzwf";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|