modules/xmr-stak: drop broken cudaSupport option

Tanvir Ahmed T. reports that `services.xmr-stak.enable = true;` shows
that `23.05` ships broken `xmr-stak` module:

    error: function 'anonymous lambda' called with unexpected argument 'cudaSupport'

I broke it when I removed `cudaSupport` flag in
    a5ce71d4e8

I'm just removing the option without an attempt to supply the stub as
module was already broken on `23.05` release. There are probably no
users of `xmr-stak` module by now.

Closes: https://github.com/NixOS/nixpkgs/issues/256703
This commit is contained in:
Sergei Trofimovich 2023-09-22 17:40:04 +01:00
parent fc43f0034f
commit e57034f9a7

View file

@ -7,7 +7,7 @@ let
cfg = config.services.xmr-stak;
pkg = pkgs.xmr-stak.override {
inherit (cfg) openclSupport cudaSupport;
inherit (cfg) openclSupport;
};
in
@ -17,7 +17,6 @@ in
services.xmr-stak = {
enable = mkEnableOption (lib.mdDoc "xmr-stak miner");
openclSupport = mkEnableOption (lib.mdDoc "support for OpenCL (AMD/ATI graphics cards)");
cudaSupport = mkEnableOption (lib.mdDoc "support for CUDA (NVidia graphics cards)");
extraArgs = mkOption {
type = types.listOf types.str;
@ -64,15 +63,12 @@ in
wantedBy = [ "multi-user.target" ];
bindsTo = [ "network-online.target" ];
after = [ "network-online.target" ];
environment = mkIf cfg.cudaSupport {
LD_LIBRARY_PATH = "${pkgs.linuxPackages_latest.nvidia_x11}/lib";
};
preStart = concatStrings (flip mapAttrsToList cfg.configFiles (fn: content: ''
ln -sf '${pkgs.writeText "xmr-stak-${fn}" content}' '${fn}'
''));
serviceConfig = let rootRequired = cfg.openclSupport || cfg.cudaSupport; in {
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";