From c65107068edae8d7ebdeeee4298c8df6be99fec4 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 11 Dec 2017 04:22:47 +0100 Subject: [PATCH] xmr-stak: init at 2.0.0 --- pkgs/applications/misc/xmr-stak/default.nix | 38 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/applications/misc/xmr-stak/default.nix diff --git a/pkgs/applications/misc/xmr-stak/default.nix b/pkgs/applications/misc/xmr-stak/default.nix new file mode 100644 index 000000000000..d12f649d5ee4 --- /dev/null +++ b/pkgs/applications/misc/xmr-stak/default.nix @@ -0,0 +1,38 @@ +{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, openssl +, opencl-headers, ocl-icd, hwloc, cudatoolkit +, devDonationLevel ? 0.0 +, cudaSupport ? false # doesn't work currently +}: + +stdenv.mkDerivation rec { + name = "xmr-stak-${version}"; + version = "2.0.0"; + + src = fetchFromGitHub { + owner = "fireice-uk"; + repo = "xmr-stak"; + rev = "v${version}"; + sha256 = "1gsp5d2qmc8qwbfm87c2vnak6ks6y9csfjbsi0570pdciapaf8vs"; + }; + + NIX_CFLAGS_COMPILE = "-O3"; + + cmakeFlags = lib.optional (!cudaSupport) "-DCUDA_ENABLE=OFF"; + + nativeBuildInputs = [ cmake ]; + buildInputs = + [ libmicrohttpd openssl opencl-headers ocl-icd hwloc ] + ++ lib.optional cudaSupport cudatoolkit; + + postPatch = '' + substituteInPlace xmrstak/donate-level.hpp \ + --replace 'fDevDonationLevel = 2.0' 'fDevDonationLevel = ${toString 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a3badf72f003..6e0da9616371 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15788,6 +15788,8 @@ with pkgs; monero = callPackage ../applications/misc/monero { }; + xmr-stak = callPackage ../applications/misc/xmr-stak { }; + monkeysAudio = callPackage ../applications/audio/monkeys-audio { }; monkeysphere = callPackage ../tools/security/monkeysphere { };