snapraid: fix for SMART cmd error

This commit is contained in:
Matteo Pacini 2024-06-22 23:58:46 +01:00
parent b37ed3f2a1
commit 060f49bc44

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";