diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index a625111fc2f0..96ab896356f6 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -114,7 +114,6 @@ let "restic" "rtl_433" "sabnzbd" - "scaphandre" "script" "shelly" "smartctl" @@ -521,26 +520,6 @@ in 'services.prometheus.exporters.sql.configFile' ''; } - { - assertion = cfg.scaphandre.enable -> (pkgs.stdenv.targetPlatform.isx86_64 == true); - message = '' - Scaphandre only support x86_64 architectures. - ''; - } - { - assertion = - cfg.scaphandre.enable - -> ((lib.kernel.whenHelpers pkgs.linux.version).whenOlder "5.11" true).condition == false; - message = '' - Scaphandre requires a kernel version newer than '5.11', '${pkgs.linux.version}' given. - ''; - } - { - assertion = cfg.scaphandre.enable -> (builtins.elem "intel_rapl_common" config.boot.kernelModules); - message = '' - Scaphandre needs 'intel_rapl_common' kernel module to be enabled. Please add it in 'boot.kernelModules'. - ''; - } { assertion = cfg.idrac.enable -> ((cfg.idrac.configurationPath == null) != (cfg.idrac.configuration == null)); diff --git a/nixos/modules/services/monitoring/prometheus/exporters/scaphandre.nix b/nixos/modules/services/monitoring/prometheus/exporters/scaphandre.nix deleted file mode 100644 index a3dadccfda19..000000000000 --- a/nixos/modules/services/monitoring/prometheus/exporters/scaphandre.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - config, - lib, - pkgs, - options, - ... -}: - -let - logPrefix = "services.prometheus.exporter.scaphandre"; - cfg = config.services.prometheus.exporters.scaphandre; -in -{ - port = 8080; - extraOpts = { - telemetryPath = lib.mkOption { - type = lib.types.str; - default = "/metrics"; - description = '' - Path under which to expose metrics. - ''; - }; - }; - - serviceOpts = { - serviceConfig = { - ExecStart = '' - ${pkgs.scaphandre}/bin/scaphandre prometheus \ - --address ${cfg.listenAddress} \ - --port ${toString cfg.port} \ - --suffix ${cfg.telemetryPath} \ - ${lib.concatStringsSep " \\\n " cfg.extraFlags} - ''; - }; - }; -} diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 96b117c3f9e5..3ea6c4f25598 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1491,7 +1491,6 @@ in sanoid = runTest ./sanoid.nix; saunafs = runTest ./saunafs.nix; scanservjs = runTest ./scanservjs.nix; - scaphandre = runTest ./scaphandre.nix; schleuder = runTest ./schleuder.nix; scion-freestanding-deployment = runTest ./scion/freestanding-deployment; scrutiny = runTest ./scrutiny.nix; diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 8594f6fe3cdd..674d995cb74a 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -1664,24 +1664,6 @@ let ''; }; - scaphandre = - { ... }: - { - exporterConfig = { - enable = true; - }; - metricProvider = { - boot.kernelModules = [ "intel_rapl_common" ]; - }; - exporterTest = '' - wait_for_unit("prometheus-scaphandre-exporter.service") - wait_for_open_port(8080) - wait_until_succeeds( - "curl -sSf 'localhost:8080/metrics'" - ) - ''; - }; - shelly = { pkgs, ... }: { diff --git a/nixos/tests/scaphandre.nix b/nixos/tests/scaphandre.nix deleted file mode 100644 index bf9854b1c919..000000000000 --- a/nixos/tests/scaphandre.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - name = "scaphandre"; - - nodes.scaphandre = - { pkgs, ... }: - { - boot.kernelModules = [ "intel_rapl_common" ]; - - environment.systemPackages = [ pkgs.scaphandre ]; - }; - - testScript = '' - scaphandre.start() - scaphandre.wait_until_succeeds( - "scaphandre stdout -t 4", - ) - ''; -} diff --git a/pkgs/by-name/sc/scaphandre/package.nix b/pkgs/by-name/sc/scaphandre/package.nix deleted file mode 100644 index daa6a07e9faf..000000000000 --- a/pkgs/by-name/sc/scaphandre/package.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ - lib, - rustPlatform, - fetchFromGitHub, - pkg-config, - openssl, - nix-update-script, - runCommand, - dieHook, - nixosTests, - testers, - scaphandre, -}: - -rustPlatform.buildRustPackage rec { - pname = "scaphandre"; - version = "1.0.2"; - - src = fetchFromGitHub { - owner = "hubblo-org"; - repo = "scaphandre"; - rev = "v${version}"; - hash = "sha256-I+cECdpLoIj4yuWXfirwHlcn0Hkm9NxPqo/EqFiBObw="; - }; - - cargoHash = "sha256-OIoQ2r/T0ZglF1pe25ND8xe/BEWgP9JbWytJp4k7yyg="; - - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ openssl ]; - - checkPhase = '' - runHook preCheck - - # Work around to pass test due to non existing path - # https://github.com/hubblo-org/scaphandre/blob/v1.0.2/src/sensors/powercap_rapl.rs#L29 - export SCAPHANDRE_POWERCAP_PATH="$(mktemp -d)/scaphandre" - - mkdir -p "$SCAPHANDRE_POWERCAP_PATH" - - runHook postCheck - ''; - - passthru = { - updateScript = nix-update-script { }; - tests = { - stdout = - self: - runCommand "${pname}-test" - { - buildInputs = [ - self - dieHook - ]; - } - '' - ${self}/bin/scaphandre stdout -t 4 > $out || die "Scaphandre failed to measure consumption" - [ -s $out ] - ''; - vm = nixosTests.scaphandre; - version = testers.testVersion { - inherit version; - package = scaphandre; - command = "scaphandre --version"; - }; - }; - }; - - meta = { - description = "Electrical power consumption metrology agent"; - homepage = "https://github.com/hubblo-org/scaphandre"; - license = lib.licenses.asl20; - platforms = [ "x86_64-linux" ]; - maintainers = [ ]; - mainProgram = "scaphandre"; - # Upstream needs to decide what to do about a broken dependency - # https://github.com/hubblo-org/scaphandre/issues/403 - broken = true; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index b2622edfdaf1..fdcfe380b116 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1955,6 +1955,7 @@ mapAliases { ryujinx = throw "'ryujinx' has been replaced by 'ryubing' as the new upstream"; # Added 2025-07-30 ryujinx-greemdev = throw "'ryujinx-greemdev' has been renamed to/replaced by 'ryubing'"; # Converted to throw 2025-10-27 scantailor = throw "'scantailor' has been renamed to/replaced by 'scantailor-advanced'"; # Converted to throw 2025-10-27 + scaphandra = throw "'scaphandra' was broken with no upstream progress since February 2025"; # Added 2026-06-14 scitoken-cpp = throw "'scitoken-cpp' has been renamed to/replaced by 'scitokens-cpp'"; # Converted to throw 2025-10-27 scudcloud = throw "'scudcloud' has been removed as it was archived by upstream"; # Added 2025-07-24 SDL2_classic = throw "'SDL2_classic' has been removed. Consider upgrading to 'sdl2-compat', also available as 'SDL2'."; # Added 2025-05-20