Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sanoid: 2.0.3 -> 2.1.0 #123644

Merged
merged 1 commit into from
May 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 8 additions & 27 deletions pkgs/tools/backup/sanoid/default.nix
Original file line number Diff line number Diff line change
@@ -1,46 +1,25 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, makeWrapper, zfs
{ lib, stdenv, fetchFromGitHub, makeWrapper, zfs
, perlPackages, procps, which, openssh, mbuffer, pv, lzop, gzip, pigz }:

with lib;

stdenv.mkDerivation rec {
pname = "sanoid";
version = "2.0.3";
version = "2.1.0";

src = fetchFromGitHub {
owner = "jimsalterjrs";
repo = pname;
rev = "v${version}";
sha256 = "1wmymzqg503nmhw8hrblfs67is1l3ljbk2fjvrqwyb01b7mbn80x";
sha256 = "12g5cjx34ys6ix6ivahsbr3bbbi1fmjwdfdk382z6q71w3pyxxzf";
};

patches = [
# Make sanoid look for programs in PATH
(fetchpatch {
url = "https://github.com/jimsalterjrs/sanoid/commit/dc2371775afe08af799d3097d47b48182d1716eb.patch";
sha256 = "16hlwcbcb8h3ar1ywd2bzr3h3whgbcfk6walmp8z6j74wbx81aav";
})
# Make findoid look for programs in PATH
(fetchpatch {
url = "https://github.com/jimsalterjrs/sanoid/commit/44bcd21f269e17765acd1ad0d45161902a205c7b.patch";
sha256 = "0zqyl8q5sfscqcc07acw68ysnlnh3nb57cigjfwbccsm0zwlwham";
})
# Add --cache-dir option
(fetchpatch {
url = "https://github.com/jimsalterjrs/sanoid/commit/a1f5e4c0c006e16a5047a16fc65c9b3663adb81e.patch";
sha256 = "1bb4g2zxrbvf7fvcgzzxsr1cvxzrxg5dzh89sx3h7qlrd6grqhdy";
})
# Add --run-dir option
(fetchpatch {
url = "https://github.com/jimsalterjrs/sanoid/commit/59a07f92b4920952cc9137b03c1533656f48b121.patch";
sha256 = "11v4jhc36v839gppzvhvzp5jd22904k8xqdhhpx6ghl75yyh4f4s";
})
];

nativeBuildInputs = [ makeWrapper ];
buildInputs = with perlPackages; [ perl ConfigIniFiles CaptureTiny ];

installPhase = ''
runHook preInstall

mkdir -p "$out/bin"
mkdir -p "$out/etc/sanoid"
cp sanoid.defaults.conf "$out/etc/sanoid/sanoid.defaults.conf"
Expand All @@ -63,12 +42,14 @@ stdenv.mkDerivation rec {
wrapProgram "$out/bin/findoid" \
--prefix PERL5LIB : "$PERL5LIB" \
--prefix PATH : "${makeBinPath [ "/run/booted-system/sw" zfs ]}"

runHook postInstall
'';

meta = {
description = "A policy-driven snapshot management tool for ZFS filesystems";
homepage = "https://github.com/jimsalterjrs/sanoid";
license = licenses.gpl3;
license = licenses.gpl3Plus;
maintainers = with maintainers; [ lopsided98 ];
platforms = platforms.all;
};
Expand Down