1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/tools/filesystems/glusterfs/default.nix

68 lines
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
2012-12-04 17:54:03 +00:00
s = # Generated upstream information
rec {
baseName="glusterfs";
2017-02-02 10:05:04 +00:00
version="3.9.1";
2013-10-20 18:10:25 +01:00
name="${baseName}-${version}";
2017-02-02 10:05:04 +00:00
hash="02p3i1zr0i2fhjhz64wvhdn0z7b6b3hkiqz1bkyhracncspxnvw9";
url="http://download.gluster.org/pub/gluster/glusterfs/3.9/3.9.1/glusterfs-3.9.1.tar.gz";
sha256="02p3i1zr0i2fhjhz64wvhdn0z7b6b3hkiqz1bkyhracncspxnvw9";
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;
2014-06-23 15:12:10 +01:00
preConfigure = ''
./autogen.sh
'';
configureFlags = [
2017-01-05 09:02:33 +00:00
''--localstatedir=/var''
];
makeFlags = "DESTDIR=$(out)";
2014-06-23 15:12:10 +01:00
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
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
];
2012-12-04 17:54:03 +00:00
platforms = with stdenv.lib.platforms;
linux ++ freebsd;
};
}