Unverified Commit e6dacacd authored by Michael Daniels's avatar Michael Daniels Committed by GitHub
Browse files

scrutiny{,-collector}: 0.9.0 -> 0.9.1; convert to finalAttrs (#513448)

parents 10fe4020 a587e45f
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -7,23 +7,21 @@
  lib,
  nix-update-script,
}:
let
  version = "0.9.0";
in
buildGoModule rec {
  inherit version;

buildGoModule (finalAttrs: {
  version = "0.9.1";
  pname = "scrutiny-collector";

  src = fetchFromGitHub {
    owner = "AnalogJ";
    repo = "scrutiny";
    tag = "v${version}";
    hash = "sha256-N6CYVhdA0BWewGUxyHtkW1ZFDGBYI7QfUo5er7xRcFw=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-xEMHkISPBHinT6vRyrWPudvmTiX5gYxMkCEoSm2gLWA=";
  };

  subPackages = "collector/cmd/collector-metrics";

  vendorHash = "sha256-fyHWy1TwwzFMIFzwilu4osfl/iI+2KqI6Bjr1UYUS68=";
  vendorHash = "sha256-Em8k2AFoZv4TD4HFkkNIdyPj7IBOFiUIKffkifWfZFY=";

  nativeBuildInputs = [ makeWrapper ];

@@ -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";
  };
}
})
+34 −34
Original line number Diff line number Diff line
@@ -7,20 +7,12 @@
  nix-update-script,
}:
let
  pname = "scrutiny";
  version = "0.9.0";

  src = fetchFromGitHub {
    owner = "AnalogJ";
    repo = "scrutiny";
    tag = "v${version}";
    hash = "sha256-N6CYVhdA0BWewGUxyHtkW1ZFDGBYI7QfUo5er7xRcFw=";
  };

  frontend = buildNpmPackage {
    inherit version;
    pname = "${pname}-webapp";
    src = "${src}/webapp/frontend";
  frontend =
    finalAttrs:
    buildNpmPackage {
      inherit (finalAttrs) version;
      pname = "${finalAttrs.pname}-webapp";
      src = "${finalAttrs.src}/webapp/frontend";

      npmDepsHash = "sha256-1lOskHEU/3CmhQkUkQExryK6eMOSWvMI+Y+cX4Dlj98=";

@@ -41,12 +33,20 @@ let
      passthru.updateScript = nix-update-script { };
    };
in
buildGoModule rec {
  inherit pname src version;
buildGoModule (finalAttrs: {
  pname = "scrutiny";
  version = "0.9.1";

  src = fetchFromGitHub {
    owner = "AnalogJ";
    repo = "scrutiny";
    tag = "v${finalAttrs.version}";
    hash = "sha256-xEMHkISPBHinT6vRyrWPudvmTiX5gYxMkCEoSm2gLWA=";
  };

  subPackages = "webapp/backend/cmd/scrutiny";

  vendorHash = "sha256-fyHWy1TwwzFMIFzwilu4osfl/iI+2KqI6Bjr1UYUS68=";
  vendorHash = "sha256-Em8k2AFoZv4TD4HFkkNIdyPj7IBOFiUIKffkifWfZFY=";

  env.CGO_ENABLED = 0;

@@ -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;
  };
}
})