nixpkgs/pkgs/tools/filesystems/glusterfs/default.nix

69 lines
2.2 KiB
Nix
Raw Normal View History

{stdenv, fetchurl, fuse, bison, flex_2_5_35, openssl, python2, ncurses, readline,
autoconf, automake, libtool, pkgconfig, zlib, libaio, libxml2, acl, sqlite
2017-01-05 09:02:33 +00:00
, liburcu, attr, makeWrapper, coreutils, gnused, gnugrep, which
}:
let
2017-03-09 14:37:37 +00:00
s =
2012-12-04 17:54:03 +00:00
rec {
baseName="glusterfs";
2017-04-08 16:37:03 +00:00
version = "3.10.1";
2013-10-20 17:10:25 +00:00
name="${baseName}-${version}";
url="https://github.com/gluster/glusterfs/archive/v${version}.tar.gz";
sha256 = "0gmb3m98djljcycjggi1qv99ai6k4cvn2rqym2q9f58q8n8kdhh7";
2012-12-04 17:54:03 +00:00
};
buildInputs = [
fuse bison flex_2_5_35 openssl python2 ncurses readline
2014-11-02 20:24:51 +00:00
autoconf automake libtool pkgconfig zlib libaio libxml2
2017-01-05 09:02:33 +00:00
acl sqlite liburcu attr makeWrapper
];
# Some of the headers reference acl
propagatedBuildInputs = [
acl
];
in
2012-12-04 17:54:03 +00:00
stdenv.mkDerivation
rec {
2012-12-04 17:54:03 +00:00
inherit (s) name version;
inherit buildInputs propagatedBuildInputs;
# Note that the VERSION file is something that is present in release tarballs
# but not in git tags (at least not as of writing in v3.10.1).
# That's why we have to create it.
# Without this, gluster (at least 3.10.1) will fail very late and cryptically,
# for example when setting up geo-replication, with a message like
# Staging of operation 'Volume Geo-replication Create' failed on localhost : Unable to fetch master volume details. Please check the master cluster and master volume.
# What happens here is that the gverify.sh script tries to compare the versions,
# but fails when the version is empty.
# See upstream GlusterFS bug https://bugzilla.redhat.com/show_bug.cgi?id=1452705
preConfigure = ''
echo "v${s.version}" > VERSION
2014-06-23 14:12:10 +00:00
./autogen.sh
'';
configureFlags = [
2017-01-05 09:02:33 +00:00
''--localstatedir=/var''
];
makeFlags = "DESTDIR=$(out)";
postInstall = ''
cp -r $out/$out/* $out
rm -r $out/nix
2017-01-05 09:02:33 +00:00
wrapProgram $out/sbin/mount.glusterfs --set PATH "${stdenv.lib.makeBinPath [ coreutils gnused attr gnugrep which]}"
'';
2012-12-04 17:54:03 +00:00
src = fetchurl {
inherit (s) url sha256;
};
meta = {
2012-12-04 17:54:03 +00:00
inherit (s) version;
description = "Distributed storage system";
maintainers = [
2012-12-04 17:54:03 +00:00
stdenv.lib.maintainers.raskin
];
platforms = with stdenv.lib.platforms;
linux ++ freebsd;
};
}