Merge pull request #321854 from matteo-pacini/snapraid-fix

snapraid: fix for SMART cmd error
This commit is contained in:
Florian 2024-08-06 10:33:55 +02:00 committed by GitHub
commit 01b8ab7d75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,11 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
smartmontools,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "snapraid";
@ -8,16 +15,26 @@ stdenv.mkDerivation rec {
owner = "amadvance";
repo = "snapraid";
rev = "v${version}";
sha256 = "sha256-pkLooA3JZV/rPlE5+JeJN1QW2xAdNu7c/iFFtT4M4vc=";
hash = "sha256-pkLooA3JZV/rPlE5+JeJN1QW2xAdNu7c/iFFtT4M4vc=";
};
VERSION = version;
doCheck = !(stdenv.isDarwin && stdenv.isx86_64);
nativeBuildInputs = [ autoreconfHook ];
nativeBuildInputs = [
autoreconfHook
makeWrapper
];
buildInputs = [ ];
# SMART is only supported on Linux and requires the smartmontools package
postInstall = lib.optionalString stdenv.isLinux ''
wrapProgram $out/bin/snapraid \
--prefix PATH : ${lib.makeBinPath [ smartmontools ]}
'';
meta = {
homepage = "http://www.snapraid.it/";
description = "Backup program for disk arrays";