update smartmontools drive DB to RELEASE_7_4

This commit is contained in:
Joseph Hanson 2024-09-12 15:01:28 -05:00
parent cb6c8e8ba2
commit d4b7f2fcb0
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
3 changed files with 38 additions and 5 deletions

View file

@ -9,15 +9,20 @@ let
termiusOverlay = self: super: {
termius = super.callPackage ./termius { };
};
modsOverlay = self: super: {
mods = super.callPackage ./charm-mods { };
};
smartmontoolsOverlay = import ./smartmontools { };
in
{
nur = inputs.nur.overlay;
vivaldi = vivaldiOverlay;
termius = termiusOverlay;
comm-packages = inputs.nix-vscode-extensions.overlays.default;
mods = modsOverlay;
nur = inputs.nur.overlay;
smartmontools = smartmontoolsOverlay;
termius = termiusOverlay;
vivaldi = vivaldiOverlay;
# The unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable'
@ -28,6 +33,4 @@ in
};
};
# VSCode Community Packages
comm-packages = inputs.nix-vscode-extensions.overlays.default;
}

View file

@ -0,0 +1,15 @@
{ ... }:
let
dbrev = "5530";
drivedbBranch = "RELEASE_7_4";
in
final: prev: {
smartmontools = prev.smartmontools.overrideAttrs (oldAttrs: {
inherit dbrev drivedbBranch;
driverdb = builtins.fetchurl {
url = "https://sourceforge.net/p/smartmontools/code/${dbrev}/tree/tags/${drivedbBranch}/smartmontools/drivedb.h?format=raw";
sha256 = "sha256-BTZm9Ue7MxFygEValSs/d86Jz3xQU+4+EPdHO6erAmI=";
name = "smartmontools-drivedb.h";
};
});
}

View file

@ -0,0 +1,15 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=/etc/nix/inputs/nixpkgs/ -i bash -p nix
set -euo pipefail
dbrev="5530"
drivedbBranch="RELEASE_7_4"
url="https://sourceforge.net/p/smartmontools/code/${dbrev}/tree/tags/${drivedbBranch}/smartmontools/drivedb.h?format=raw"
echo "Fetching hash for URL: $url"
hash=$(nix-prefetch-url "$url")
sri=$(nix-hash --type sha256 --flat --base32 --to-sri "$hash")
echo "Hash: $hash"
echo "Sri: $sri"