2024-09-19 14:19:46 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
autoreconfHook,
|
|
|
|
smartmontools,
|
|
|
|
makeWrapper,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "snapraid";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "12.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "amadvance";
|
|
|
|
repo = "snapraid";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-pkLooA3JZV/rPlE5+JeJN1QW2xAdNu7c/iFFtT4M4vc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
VERSION = version;
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
# SMART is only supported on Linux and requires the smartmontools package
|
2024-09-26 11:04:55 +00:00
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
|
2024-09-19 14:19:46 +00:00
|
|
|
wrapProgram $out/bin/snapraid \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ smartmontools ]}
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "http://www.snapraid.it/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Backup program for disk arrays";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
maintainers = [ lib.maintainers.makefu ];
|
|
|
|
platforms = lib.platforms.unix;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "snapraid";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|