1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00

xmr-stak: remove

This commit is contained in:
Jörg Thalheim 2024-07-15 09:30:53 +02:00
parent 4a67ab5014
commit fdfe59f7b3
6 changed files with 2 additions and 142 deletions

View file

@ -841,7 +841,6 @@
./services/misc/wastebin.nix
./services/misc/weechat.nix
./services/misc/workout-tracker.nix
./services/misc/xmr-stak.nix
./services/misc/xmrig.nix
./services/misc/zoneminder.nix
./services/misc/zookeeper.nix

View file

@ -106,6 +106,7 @@ in
as the underlying package isn't being maintained. Working alternatives are
libinput and synaptics.
'')
(mkRemovedOptionModule [ "services" "xmr-stak" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "virtualisation" "rkt" ] "The rkt module has been removed, it was archived by upstream")
(mkRemovedOptionModule [ "services" "racoon" ] ''
The racoon module has been removed, because the software project was abandoned upstream.

View file

@ -1,89 +0,0 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.services.xmr-stak;
pkg = pkgs.xmr-stak.override {
inherit (cfg) openclSupport;
};
in
{
options = {
services.xmr-stak = {
enable = mkEnableOption "xmr-stak miner";
openclSupport = mkEnableOption "support for OpenCL (AMD/ATI graphics cards)";
extraArgs = mkOption {
type = types.listOf types.str;
default = [];
example = [ "--noCPU" "--currency monero" ];
description = "List of parameters to pass to xmr-stak.";
};
configFiles = mkOption {
type = types.attrsOf types.str;
default = {};
example = literalExpression ''
{
"config.txt" = '''
"verbose_level" : 4,
"h_print_time" : 60,
"tls_secure_algo" : true,
''';
"pools.txt" = '''
"currency" : "monero7",
"pool_list" :
[ { "pool_address" : "pool.supportxmr.com:443",
"wallet_address" : "my-wallet-address",
"rig_id" : "",
"pool_password" : "nixos",
"use_nicehash" : false,
"use_tls" : true,
"tls_fingerprint" : "",
"pool_weight" : 23
},
],
''';
}
'';
description = ''
Content of config files like config.txt, pools.txt or cpu.txt.
'';
};
};
};
config = mkIf cfg.enable {
systemd.services.xmr-stak = {
wantedBy = [ "multi-user.target" ];
bindsTo = [ "network-online.target" ];
after = [ "network-online.target" ];
preStart = concatStrings (flip mapAttrsToList cfg.configFiles (fn: content: ''
ln -sf '${pkgs.writeText "xmr-stak-${fn}" content}' '${fn}'
''));
serviceConfig = let rootRequired = cfg.openclSupport; in {
ExecStart = "${pkg}/bin/xmr-stak ${concatStringsSep " " cfg.extraArgs}";
# xmr-stak generates cpu and/or gpu configuration files
WorkingDirectory = "/tmp";
PrivateTmp = true;
DynamicUser = !rootRequired;
LimitMEMLOCK = toString (1024*1024);
};
};
};
imports = [
(mkRemovedOptionModule ["services" "xmr-stak" "configText"] ''
This option was removed in favour of `services.xmr-stak.configFiles`
because the new config file `pools.txt` was introduced. You are
now able to define all other config files like cpu.txt or amd.txt.
'')
];
}

View file

@ -1,50 +0,0 @@
{ stdenv, lib, fetchpatch
, fetchFromGitHub, cmake, libmicrohttpd, openssl
, opencl-headers, ocl-icd, hwloc
, devDonationLevel ? "0.0"
, openclSupport ? true
}:
stdenv.mkDerivation rec {
pname = "xmr-stak";
version = "2.10.8";
src = fetchFromGitHub {
owner = "fireice-uk";
repo = "xmr-stak";
rev = version;
sha256 = "0ilx5mhh91ks7dwvykfyynh53l6vkkignjpwkkss8ss6b2k8gdbj";
};
env.NIX_CFLAGS_COMPILE = "-O3";
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" ]
++ lib.optional (!openclSupport) "-DOpenCL_ENABLE=OFF";
nativeBuildInputs = [ cmake ];
buildInputs = [ libmicrohttpd openssl hwloc ]
++ lib.optionals openclSupport [ opencl-headers ocl-icd ];
postPatch = ''
substituteInPlace xmrstak/donate-level.hpp \
--replace 'fDevDonationLevel = 2.0' 'fDevDonationLevel = ${devDonationLevel}'
'';
meta = with lib; {
# Does not build against gcc-13. No development activity upstream
# for past few years.
broken = true;
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 ];
};
}

View file

@ -1478,6 +1478,7 @@ mapAliases ({
xineLib = xine-lib; # Added 2021-04-27
xineUI = xine-ui; # Added 2021-04-27
xmlada = gnatPackages.xmlada; # Added 2024-02-25
xmr-stak = throw "xmr-stak has been removed from nixpkgs because it was broken"; # Added 2024-07-15
xonsh-unwrapped = python3Packages.xonsh; # Added 2024-06-18
xtrt = throw "xtrt has been removed due to being abandoned"; # Added 2023-05-25
xulrunner = firefox-unwrapped; # Added 2023-11-03

View file

@ -32423,8 +32423,6 @@ with pkgs;
monitorcontrol = callPackage ../applications/misc/monitorcontrol { };
xmr-stak = callPackage ../applications/misc/xmr-stak { };
xmrig = darwin.apple_sdk_11_0.callPackage ../applications/misc/xmrig { };
xmrig-mo = darwin.apple_sdk_11_0.callPackage ../applications/misc/xmrig/moneroocean.nix { };