From e513a9da6535f15e84cd02aa6f91d5fb00d49876 Mon Sep 17 00:00:00 2001 From: Sam <30577766+Samasaur1@users.noreply.github.com> Date: Sat, 25 Apr 2026 13:00:24 -0700 Subject: [PATCH 1/2] scrutiny{,-collector}: 0.9.0 -> 0.9.1 --- pkgs/by-name/sc/scrutiny-collector/package.nix | 6 +++--- pkgs/by-name/sc/scrutiny/package.nix | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/sc/scrutiny-collector/package.nix b/pkgs/by-name/sc/scrutiny-collector/package.nix index 6a518d2e8d57..a4cf6d86b268 100644 --- a/pkgs/by-name/sc/scrutiny-collector/package.nix +++ b/pkgs/by-name/sc/scrutiny-collector/package.nix @@ -8,7 +8,7 @@ nix-update-script, }: let - version = "0.9.0"; + version = "0.9.1"; in buildGoModule rec { inherit version; @@ -18,12 +18,12 @@ buildGoModule rec { owner = "AnalogJ"; repo = "scrutiny"; tag = "v${version}"; - hash = "sha256-N6CYVhdA0BWewGUxyHtkW1ZFDGBYI7QfUo5er7xRcFw="; + hash = "sha256-xEMHkISPBHinT6vRyrWPudvmTiX5gYxMkCEoSm2gLWA="; }; subPackages = "collector/cmd/collector-metrics"; - vendorHash = "sha256-fyHWy1TwwzFMIFzwilu4osfl/iI+2KqI6Bjr1UYUS68="; + vendorHash = "sha256-Em8k2AFoZv4TD4HFkkNIdyPj7IBOFiUIKffkifWfZFY="; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/by-name/sc/scrutiny/package.nix b/pkgs/by-name/sc/scrutiny/package.nix index 7860b2544af6..f3bb14f5f3f4 100644 --- a/pkgs/by-name/sc/scrutiny/package.nix +++ b/pkgs/by-name/sc/scrutiny/package.nix @@ -8,13 +8,13 @@ }: let pname = "scrutiny"; - version = "0.9.0"; + version = "0.9.1"; src = fetchFromGitHub { owner = "AnalogJ"; repo = "scrutiny"; tag = "v${version}"; - hash = "sha256-N6CYVhdA0BWewGUxyHtkW1ZFDGBYI7QfUo5er7xRcFw="; + hash = "sha256-xEMHkISPBHinT6vRyrWPudvmTiX5gYxMkCEoSm2gLWA="; }; frontend = buildNpmPackage { @@ -46,7 +46,7 @@ buildGoModule rec { subPackages = "webapp/backend/cmd/scrutiny"; - vendorHash = "sha256-fyHWy1TwwzFMIFzwilu4osfl/iI+2KqI6Bjr1UYUS68="; + vendorHash = "sha256-Em8k2AFoZv4TD4HFkkNIdyPj7IBOFiUIKffkifWfZFY="; env.CGO_ENABLED = 0; From a587e45f4f345fe2a79278fddabb2e4bb1ce5e6e Mon Sep 17 00:00:00 2001 From: Sam <30577766+Samasaur1@users.noreply.github.com> Date: Sat, 25 Apr 2026 13:02:50 -0700 Subject: [PATCH 2/2] scrutiny{,-collector}: convert to finalAttrs I'm aware that the `frontend` block in the scrutiny let-in looks a little weird, but it means that doing `overrideAttrs` on scrutiny (to override version and src) will affect the webapp. --- .../by-name/sc/scrutiny-collector/package.nix | 11 ++-- pkgs/by-name/sc/scrutiny/package.nix | 62 +++++++++---------- 2 files changed, 36 insertions(+), 37 deletions(-) diff --git a/pkgs/by-name/sc/scrutiny-collector/package.nix b/pkgs/by-name/sc/scrutiny-collector/package.nix index a4cf6d86b268..56f712e8f002 100644 --- a/pkgs/by-name/sc/scrutiny-collector/package.nix +++ b/pkgs/by-name/sc/scrutiny-collector/package.nix @@ -7,17 +7,15 @@ lib, nix-update-script, }: -let + +buildGoModule (finalAttrs: { version = "0.9.1"; -in -buildGoModule rec { - inherit version; pname = "scrutiny-collector"; src = fetchFromGitHub { owner = "AnalogJ"; repo = "scrutiny"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-xEMHkISPBHinT6vRyrWPudvmTiX5gYxMkCEoSm2gLWA="; }; @@ -48,6 +46,7 @@ buildGoModule rec { meta = { description = "Hard disk metrics collector for Scrutiny"; homepage = "https://github.com/AnalogJ/scrutiny"; + changelog = "https://github.com/AnalogJ/scrutiny/releases/tag/v${finalAttrs.version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ samasaur @@ -55,4 +54,4 @@ buildGoModule rec { ]; mainProgram = "scrutiny-collector-metrics"; }; -} +}) diff --git a/pkgs/by-name/sc/scrutiny/package.nix b/pkgs/by-name/sc/scrutiny/package.nix index f3bb14f5f3f4..f41ed84fdf7c 100644 --- a/pkgs/by-name/sc/scrutiny/package.nix +++ b/pkgs/by-name/sc/scrutiny/package.nix @@ -7,43 +7,43 @@ nix-update-script, }: let + frontend = + finalAttrs: + buildNpmPackage { + inherit (finalAttrs) version; + pname = "${finalAttrs.pname}-webapp"; + src = "${finalAttrs.src}/webapp/frontend"; + + npmDepsHash = "sha256-1lOskHEU/3CmhQkUkQExryK6eMOSWvMI+Y+cX4Dlj98="; + + buildPhase = '' + runHook preBuild + mkdir dist + npm run build:prod --offline -- --output-path=dist + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir $out + cp -r dist/* $out + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { }; + }; +in +buildGoModule (finalAttrs: { pname = "scrutiny"; version = "0.9.1"; src = fetchFromGitHub { owner = "AnalogJ"; repo = "scrutiny"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-xEMHkISPBHinT6vRyrWPudvmTiX5gYxMkCEoSm2gLWA="; }; - frontend = buildNpmPackage { - inherit version; - pname = "${pname}-webapp"; - src = "${src}/webapp/frontend"; - - npmDepsHash = "sha256-1lOskHEU/3CmhQkUkQExryK6eMOSWvMI+Y+cX4Dlj98="; - - buildPhase = '' - runHook preBuild - mkdir dist - npm run build:prod --offline -- --output-path=dist - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - mkdir $out - cp -r dist/* $out - runHook postInstall - ''; - - passthru.updateScript = nix-update-script { }; - }; -in -buildGoModule rec { - inherit pname src version; - subPackages = "webapp/backend/cmd/scrutiny"; vendorHash = "sha256-Em8k2AFoZv4TD4HFkkNIdyPj7IBOFiUIKffkifWfZFY="; @@ -56,7 +56,7 @@ buildGoModule rec { postInstall = '' mkdir -p $out/share/scrutiny - cp -r ${frontend}/* $out/share/scrutiny + cp -r ${frontend finalAttrs}/* $out/share/scrutiny ''; passthru.tests.scrutiny = nixosTests.scrutiny; @@ -65,7 +65,7 @@ buildGoModule rec { meta = { description = "Hard Drive S.M.A.R.T Monitoring, Historical Trends & Real World Failure Thresholds"; homepage = "https://github.com/AnalogJ/scrutiny"; - changelog = "https://github.com/AnalogJ/scrutiny/releases/tag/v${version}"; + changelog = "https://github.com/AnalogJ/scrutiny/releases/tag/v${finalAttrs.version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ samasaur @@ -74,4 +74,4 @@ buildGoModule rec { mainProgram = "scrutiny"; platforms = lib.platforms.linux; }; -} +})