diff options
author | Ricardo M. Correia <rcorreia@wizy.org> | 2014-01-21 19:47:04 +0100 |
---|---|---|
committer | Rob Vermaas <rob.vermaas@gmail.com> | 2014-01-27 21:48:24 +0100 |
commit | e361d27eeb330f1b50ba2de584465d580532ddf1 (patch) | |
tree | 5ca5ba465ce5e1f875786fd61c239813738e4bae /pkgs/tools/filesystems/zfstools | |
parent | 4ccd60af004f2d53d436cc6eade9bd11039c80e8 (diff) |
zfstools: Add new package
zfstools is an OpenSolaris-like and compatible auto snapshotting script for ZFS, which also supports auto snapshotting mysql databases.
Diffstat (limited to 'pkgs/tools/filesystems/zfstools')
-rw-r--r-- | pkgs/tools/filesystems/zfstools/default.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/zfstools/default.nix b/pkgs/tools/filesystems/zfstools/default.nix new file mode 100644 index 0000000000000..1c1be59f51555 --- /dev/null +++ b/pkgs/tools/filesystems/zfstools/default.nix @@ -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; + }; +} |