From 32aa544fb61f4e79950756b8521a24ef27535839 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Thu, 25 Sep 2014 01:24:42 -0700 Subject: [PATCH] ceph: Add zfs support --- pkgs/tools/filesystems/ceph/default.nix | 10 +++++++--- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index ea4a1b061244..a80b5d09c285 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -2,8 +2,10 @@ , boost, btrfsProgs, cryptopp, curl, expat, fcgi, fuse, gperftools, keyutils , leveldb, libaio, libatomic_ops, libedit, libuuid, linuxHeaders, openssl , python, snappy, udev, xfsprogs, xz +, zfs ? null }: +with stdenv.lib; let wrapArgs = "--prefix PYTHONPATH : \"$(toPythonPath $out)\"" + " --prefix PATH : \"$out/bin\"" @@ -28,14 +30,16 @@ stdenv.mkDerivation rec { buildInputs = [ boost boost.lib btrfsProgs cryptopp curl expat fcgi fuse gperftools keyutils libatomic_ops leveldb libaio libedit libuuid linuxHeaders openssl python - snappy udev xfsprogs.lib xz + snappy udev xfsprogs.lib xz zfs ]; preConfigure = '' ./autogen.sh ''; - configureFlags = [ "--exec_prefix=$(out)" ]; + configureFlags = [ + "--exec_prefix=$(out)" + ] ++ optional (zfs != null) "--with-zfs=${zfs}"; postInstall = '' wrapProgram $out/bin/ceph ${wrapArgs} @@ -45,7 +49,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = { homepage = http://ceph.com/; description = "Distributed storage system"; license = licenses.lgpl21; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 82b06349a8db..30b36103bfbc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -768,7 +768,9 @@ let cdrkit = callPackage ../tools/cd-dvd/cdrkit { }; - ceph = callPackage ../tools/filesystems/ceph { }; + ceph = callPackage ../tools/filesystems/ceph { + zfs = linuxPackages.zfs; + }; cfdg = builderDefsPackage ../tools/graphics/cfdg { inherit libpng bison flex ffmpeg;