Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
938 B
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
smartmontools,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "snapraid";
version = "12.4";
src = fetchFromGitHub {
owner = "amadvance";
repo = "snapraid";
rev = "v${version}";
hash = "sha256-7guTRH9AZCsQYyWLpws19/sEe9GVFop21GYPzXCK6Fg=";
};
VERSION = version;
doCheck = true;
nativeBuildInputs = [
autoreconfHook
makeWrapper
];
# SMART is only supported on Linux and requires the smartmontools package
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
wrapProgram $out/bin/snapraid \
--prefix PATH : ${lib.makeBinPath [ smartmontools ]}
'';
meta = {
homepage = "http://www.snapraid.it/";
description = "Backup program for disk arrays";
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.makefu ];
platforms = lib.platforms.unix;
mainProgram = "snapraid";
};
}