Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 44 lines 938 B view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 autoreconfHook, 6 smartmontools, 7 makeWrapper, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "snapraid"; 12 version = "12.4"; 13 14 src = fetchFromGitHub { 15 owner = "amadvance"; 16 repo = "snapraid"; 17 rev = "v${version}"; 18 hash = "sha256-7guTRH9AZCsQYyWLpws19/sEe9GVFop21GYPzXCK6Fg="; 19 }; 20 21 VERSION = version; 22 23 doCheck = true; 24 25 nativeBuildInputs = [ 26 autoreconfHook 27 makeWrapper 28 ]; 29 30 # SMART is only supported on Linux and requires the smartmontools package 31 postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' 32 wrapProgram $out/bin/snapraid \ 33 --prefix PATH : ${lib.makeBinPath [ smartmontools ]} 34 ''; 35 36 meta = { 37 homepage = "http://www.snapraid.it/"; 38 description = "Backup program for disk arrays"; 39 license = lib.licenses.gpl3; 40 maintainers = [ lib.maintainers.makefu ]; 41 platforms = lib.platforms.unix; 42 mainProgram = "snapraid"; 43 }; 44}