2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, go-md2man }:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.3.0";
|
2020-08-20 17:08:02 +00:00
|
|
|
pname = "zfs-prune-snapshots";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bahamas10";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-udzC4AUXk7h7HpRcz0V+kPECzATAYZtX8z2fvKPCZ/c=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ go-md2man ];
|
|
|
|
|
|
|
|
makeTargets = [ "man" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -m 755 -D zfs-prune-snapshots $out/bin/zfs-prune-snapshots
|
|
|
|
install -m 644 -D man/zfs-prune-snapshots.1 $out/share/man/man1/zfs-prune-snapshots.1
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
description = "Remove snapshots from one or more zpools that match given criteria";
|
|
|
|
homepage = "https://github.com/bahamas10/zfs-prune-snapshots";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.ymarkus ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|