about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdam C. Stephens2024-05-08 19:58:06 -0400
committerGitHub2024-05-08 19:58:06 -0400
commit5c4ae2d9fffc4a3cfb29c56106780c4894e51271 (patch)
treeec6517377e2eff9d9d481ddd0bbb08231de30a39
parent9a35766bd30c07f39c881fc439db65ee1fff65b2 (diff)
parent0dc23f226c2557dd1444c1d082d2f93a728316ff (diff)
Merge pull request #309396 from adamcstephens/s0ix-selftest-tool/fix
s0ix-selftest-tool: unstable-2022-11-04 -> 0-unstable-2024-02-07
-rw-r--r--pkgs/by-name/s0/s0ix-selftest-tool/package.nix (renamed from pkgs/tools/system/s0ix-selftest-tool/default.nix)63
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 28 insertions, 37 deletions
diff --git a/pkgs/tools/system/s0ix-selftest-tool/default.nix b/pkgs/by-name/s0/s0ix-selftest-tool/package.nix
index 535a68f6ff75..89b5c104aa98 100644
--- a/pkgs/tools/system/s0ix-selftest-tool/default.nix
+++ b/pkgs/by-name/s0/s0ix-selftest-tool/package.nix
@@ -1,6 +1,5 @@
 {
   acpica-tools,
-  bash,
   bc,
   coreutils,
   fetchFromGitHub,
@@ -11,71 +10,65 @@
   lib,
   pciutils,
   powertop,
-  resholve,
+  makeWrapper,
+  stdenv,
+  unstableGitUpdater,
   util-linux,
   xorg,
   xxd,
 }:
-resholve.mkDerivation {
+
+let
+  deps = [
+    acpica-tools
+    bc
+    coreutils
+    gawk
+    gnugrep
+    gnused
+    linuxPackages.turbostat
+    pciutils
+    powertop
+    util-linux
+    xorg.xset
+    xxd
+  ];
+in
+stdenv.mkDerivation {
   pname = "s0ix-selftest-tool";
-  version = "unstable-2022-11-04";
+  version = "0-unstable-2024-02-07";
 
   src = fetchFromGitHub {
     owner = "intel";
     repo = "S0ixSelftestTool";
-    rev = "1b6db3c3470a3a74b052cb728a544199661d18ec";
-    hash = "sha256-w97jfdppW8kC8K8XvBntmkfntIctXDQCWmvug+H1hKA=";
+    rev = "c12ae3ea611812547e09bb755dd015dd969b664c";
+    hash = "sha256-9O72TxlLrkQbt80izWdbLQt9OW/4Aq1p4RuQoD2yQ5E=";
   };
 
   # don't use the bundled turbostat binary
   postPatch = ''
     substituteInPlace s0ix-selftest-tool.sh --replace '"$DIR"/turbostat' 'turbostat'
-    substituteInPlace s0ix-selftest-tool.sh --replace 'sudo ' ""
-
   '';
 
+  nativeBuildInputs = [ makeWrapper ];
   dontConfigure = true;
   dontBuild = true;
 
   installPhase = ''
     runHook preInstall
     install -Dm555 s0ix-selftest-tool.sh "$out/bin/s0ix-selftest-tool"
+    wrapProgram "$out/bin/s0ix-selftest-tool" --prefix PATH : ${lib.escapeShellArg deps}
     runHook postInstall
   '';
 
-  solutions = {
-    default = {
-      scripts = ["bin/s0ix-selftest-tool"];
-      interpreter = lib.getExe bash;
-      inputs = [
-        acpica-tools
-        bc
-        coreutils
-        gawk
-        gnugrep
-        gnused
-        linuxPackages.turbostat
-        pciutils
-        powertop
-        util-linux
-        xorg.xset
-        xxd
-      ];
-      execer = [
-        "cannot:${util-linux}/bin/dmesg"
-        "cannot:${powertop}/bin/powertop"
-        "cannot:${util-linux}/bin/rtcwake"
-        "cannot:${linuxPackages.turbostat}/bin/turbostat"
-      ];
-    };
-  };
+  passthru.updateScript = unstableGitUpdater { };
 
   meta = with lib; {
     homepage = "https://github.com/intel/S0ixSelftestTool";
     description = "A tool for testing the S2idle path CPU Package C-state and S0ix failures";
     license = licenses.gpl2Only;
     platforms = platforms.linux;
-    maintainers = with maintainers; [adamcstephens];
+    maintainers = with maintainers; [ adamcstephens ];
     mainProgram = "s0ix-selftest-tool";
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 34e81a12718f..3ab116d42a83 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2021,8 +2021,6 @@ with pkgs;
 
   ronin = callPackage ../tools/security/ronin { };
 
-  s0ix-selftest-tool = callPackage ../tools/system/s0ix-selftest-tool { };
-
   scarab = callPackage ../tools/games/scarab { };
 
   sdbus-cpp = callPackage ../development/libraries/sdbus-cpp { };