nixpkgs/pkgs/tools/filesystems/glusterfs/default.nix
2016-08-11 17:57:35 +02:00

67 lines
1.8 KiB
Nix

{stdenv, fetchurl, fuse, bison, flex_2_5_35, openssl, python, ncurses, readline,
autoconf, automake, libtool, pkgconfig, zlib, libaio, libxml2, acl, sqlite
, liburcu, attr
}:
let
s = # Generated upstream information
rec {
baseName="glusterfs";
version="3.8.1";
name="${baseName}-${version}";
hash="1j3r2wnk1pwwwn02pfnrrgh1if92b5cl51dqg7284qxrkjiafb2k";
url="http://download.gluster.org/pub/gluster/glusterfs/3.8/3.8.1/glusterfs-3.8.1.tar.gz";
sha256="1j3r2wnk1pwwwn02pfnrrgh1if92b5cl51dqg7284qxrkjiafb2k";
};
buildInputs = [
fuse bison flex_2_5_35 openssl python ncurses readline
autoconf automake libtool pkgconfig zlib libaio libxml2
acl sqlite liburcu attr
];
# Some of the headers reference acl
propagatedBuildInputs = [
acl
];
in
stdenv.mkDerivation
rec {
inherit (s) name version;
inherit buildInputs propagatedBuildInputs;
preConfigure = ''
./autogen.sh
'';
configureFlags = [
''--with-mountutildir="$out/sbin" --localstatedir=/var''
];
makeFlags = "DESTDIR=$(out)";
preInstall = ''
substituteInPlace api/examples/Makefile --replace '$(DESTDIR)' $out
substituteInPlace geo-replication/syncdaemon/Makefile --replace '$(DESTDIR)' $out
substituteInPlace geo-replication/syncdaemon/Makefile --replace '$(DESTDIR)' $out
substituteInPlace xlators/features/glupy/examples/Makefile --replace '$(DESTDIR)' $out
substituteInPlace xlators/features/glupy/src/Makefile --replace '$(DESTDIR)' $out
'';
postInstall = ''
cp -r $out/$out/* $out
rm -r $out/nix
'';
src = fetchurl {
inherit (s) url sha256;
};
meta = {
inherit (s) version;
description = "Distributed storage system";
maintainers = [
stdenv.lib.maintainers.raskin
];
platforms = with stdenv.lib.platforms;
linux ++ freebsd;
};
}