mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
09f7789948
the autosnaphot would fail because the zpool command was not found
42 lines
992 B
Nix
42 lines
992 B
Nix
{ lib, stdenv, fetchFromGitHub, ruby, zfs, makeWrapper }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "zfstools";
|
|
version = "0.3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
sha256 = "16lvw3xbmxp2pr8nixqn7lf4504zaaxvbbdnjkv4dggwd4lsdjyg";
|
|
rev = "v${version}";
|
|
repo = "zfstools";
|
|
owner = "bdrewery";
|
|
};
|
|
|
|
buildInputs = [ ruby ];
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp bin/* $out/bin/
|
|
|
|
cp -R lib $out/
|
|
|
|
for f in $out/bin/*; do
|
|
wrapProgram $f \
|
|
--set RUBYLIB $out/lib \
|
|
--prefix PATH : ${zfs}/bin
|
|
done
|
|
'';
|
|
|
|
meta = with lib; {
|
|
inherit version;
|
|
inherit (src.meta) homepage;
|
|
description = "OpenSolaris-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 = licenses.bsd2;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|