zfstools: Add new package
zfstools is an OpenSolaris-like and compatible auto snapshotting script for ZFS, which also supports auto snapshotting mysql databases.
This commit is contained in:
parent
4ccd60af00
commit
e361d27eeb
39
pkgs/tools/filesystems/zfstools/default.nix
Normal file
39
pkgs/tools/filesystems/zfstools/default.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{ stdenv, fetchgit, ruby, zfs }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "zfstools-${version}";
|
||||||
|
|
||||||
|
version = "0.3.1";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = https://github.com/bdrewery/zfstools.git;
|
||||||
|
rev = "refs/tags/v${version}";
|
||||||
|
sha256 = "0bhs0gn1f4z1jm631vp26sbysy4crq489q56rxqfd8ns1xsp1f5j";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ ruby ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp bin/* $out/bin/
|
||||||
|
|
||||||
|
cp -R lib $out/
|
||||||
|
|
||||||
|
for f in $out/bin/*; do
|
||||||
|
substituteInPlace $f --replace "/usr/bin/env ruby" "ruby -I$out/lib"
|
||||||
|
done
|
||||||
|
|
||||||
|
sed -e 's|cmd.*=.*"zfs |cmd = "${zfs}/sbin/zfs |g' -i $out/lib/zfstools/{dataset,snapshot}.rb
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = https://github.com/bdrewery/zfstools;
|
||||||
|
description = "OpenSolaris-like and compatible auto snapshotting script for ZFS";
|
||||||
|
longDescription = ''
|
||||||
|
zfstools is an OpenSolaris-like and compatible auto snapshotting script
|
||||||
|
for ZFS, which also supports auto snapshotting mysql databases.
|
||||||
|
'';
|
||||||
|
|
||||||
|
license = stdenv.lib.licenses.bsd2;
|
||||||
|
};
|
||||||
|
}
|
@ -2240,6 +2240,10 @@ let
|
|||||||
|
|
||||||
zdelta = callPackage ../tools/compression/zdelta { };
|
zdelta = callPackage ../tools/compression/zdelta { };
|
||||||
|
|
||||||
|
zfstools = callPackage ../tools/filesystems/zfstools {
|
||||||
|
zfs = linuxPackages.zfs;
|
||||||
|
};
|
||||||
|
|
||||||
zile = callPackage ../applications/editors/zile { };
|
zile = callPackage ../applications/editors/zile { };
|
||||||
|
|
||||||
zip = callPackage ../tools/archivers/zip { };
|
zip = callPackage ../tools/archivers/zip { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user