nixpkgs/pkgs/applications/misc/xmr-stak/default.nix
R. RyanTM f138129894 xmr-stak: 2.4.3 -> 2.4.4 (#41506)
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/bfj12k7pz2bj2jzx3swkmz2kk3dfqx5p-xmr-stak-2.4.4/bin/xmr-stak passed the binary check.
- Warning: no invocation of /nix/store/bfj12k7pz2bj2jzx3swkmz2kk3dfqx5p-xmr-stak-2.4.4/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.4 with grep in /nix/store/bfj12k7pz2bj2jzx3swkmz2kk3dfqx5p-xmr-stak-2.4.4
- directory tree listing: https://gist.github.com/5ef7f1fd13c10bef56522a028b52c82e
- du listing: https://gist.github.com/be63ac59af2a152db46085c4509cdcd3
2018-06-10 19:34:52 +02:00

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.4";
src = fetchFromGitHub {
owner = "fireice-uk";
repo = "xmr-stak";
rev = "${version}";
sha256 = "1j75466hfs18w05k64yb60pw865ah226vjib46qr1wb1mcd82i5s";
};
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 ];
};
}