2017-12-29 01:51:42 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, unzip, which
|
2018-01-23 04:16:50 +00:00
|
|
|
, libuuid, attr, xfsprogs, cppunit, rdma-core
|
2017-12-29 01:51:42 +00:00
|
|
|
, zlib, openssl, sqlite, jre, openjdk, ant
|
2018-07-30 11:42:59 +01:00
|
|
|
, openssh, perl, gfortran, influxdb, curl
|
2017-12-29 01:51:42 +00:00
|
|
|
} :
|
|
|
|
|
|
|
|
let
|
2018-07-30 11:42:59 +01:00
|
|
|
version = "7.0";
|
2017-12-29 01:51:42 +00:00
|
|
|
|
|
|
|
subdirs = [
|
2018-01-24 08:27:00 +00:00
|
|
|
"beeond_thirdparty/build"
|
|
|
|
"beeond_thirdparty_gpl/build"
|
2018-07-30 11:42:59 +01:00
|
|
|
"thirdparty/build"
|
|
|
|
"opentk_lib/build"
|
|
|
|
"common/build"
|
|
|
|
"admon/build"
|
|
|
|
"java_lib/build"
|
|
|
|
"ctl/build"
|
|
|
|
"fsck/build"
|
|
|
|
"helperd/build"
|
|
|
|
"meta/build"
|
|
|
|
"mgmtd/build"
|
|
|
|
"storage/build"
|
|
|
|
"utils/build"
|
|
|
|
"mon/build"
|
|
|
|
"upgrade/beegfs_mirror_md/build"
|
2017-12-29 01:51:42 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "beegfs-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-07-30 11:42:59 +01:00
|
|
|
url = "https://git.beegfs.com/pub/v7/repository/archive.tar.bz2?ref=${version}";
|
|
|
|
sha256 = "1wsljd5ybyhl94aqrdfvcs8a0l8w4pr0bs1vhjrf4y7ldhw35m3k";
|
2017-12-29 01:51:42 +00:00
|
|
|
};
|
|
|
|
|
2018-01-24 08:27:00 +00:00
|
|
|
nativeBuildInputs = [ which unzip pkgconfig cppunit openjdk ant perl ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libuuid
|
|
|
|
attr
|
|
|
|
xfsprogs
|
|
|
|
zlib
|
|
|
|
openssl
|
|
|
|
sqlite
|
|
|
|
jre
|
|
|
|
rdma-core
|
|
|
|
openssh
|
2018-07-30 11:42:59 +01:00
|
|
|
gfortran
|
|
|
|
influxdb
|
|
|
|
curl
|
|
|
|
];
|
2018-01-24 08:27:00 +00:00
|
|
|
|
|
|
|
hardeningDisable = [ "format" ]; # required for building beeond
|
2017-12-29 01:51:42 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs ./
|
|
|
|
find -type f -name Makefile -exec sed -i "s:/bin/bash:${stdenv.shell}:" \{} \;
|
|
|
|
find -type f -name Makefile -exec sed -i "s:/bin/true:true:" \{} \;
|
|
|
|
find -type f -name "*.mk" -exec sed -i "s:/bin/true:true:" \{} \;
|
2018-01-24 08:27:00 +00:00
|
|
|
|
|
|
|
# unpack manually and patch variable name
|
|
|
|
sed -i '/tar -C $(SOURCE_PATH) -xzf $(PCOPY_TAR)/d' beeond_thirdparty/build/Makefile
|
|
|
|
cd beeond_thirdparty/source
|
|
|
|
tar xf pcopy-0.96.tar.gz
|
|
|
|
sed -i 's/\([^_]\)rank/\1grank/' pcopy-0.96/src/pcp.cpp
|
|
|
|
cd ../..
|
2017-12-29 01:51:42 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
for i in ${toString subdirs}; do
|
2018-07-30 11:42:59 +01:00
|
|
|
make -C $i BEEGFS_OPENTK_IBVERBS=1 ''${enableParallelBuilding:+-j''${NIX_BUILD_CORES} -l''${NIX_BUILD_CORES}}
|
2017-12-29 01:51:42 +00:00
|
|
|
done
|
2018-07-30 11:42:59 +01:00
|
|
|
make -C admon/build admon_gui BEEGFS_OPENTK_IBVERBS=1
|
2017-12-29 01:51:42 +00:00
|
|
|
'';
|
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-12-29 01:51:42 +00:00
|
|
|
installPhase = ''
|
|
|
|
binDir=$out/bin
|
|
|
|
docDir=$out/share/doc/beegfs
|
|
|
|
includeDir=$out/include/beegfs
|
|
|
|
libDir=$out/lib
|
|
|
|
libDirPkg=$out/lib/beegfs
|
|
|
|
|
|
|
|
mkdir -p $binDir $libDir $libDirPkg $docDir $includeDir
|
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
cp admon/build/beegfs-admon $binDir
|
|
|
|
cp admon/build/dist/usr/bin/beegfs-admon-gui $binDir
|
|
|
|
cp admon_gui/dist/beegfs-admon-gui.jar $libDirPkg
|
|
|
|
cp admon/build/dist/etc/beegfs-admon.conf $docDir
|
|
|
|
|
|
|
|
cp java_lib/build/jbeegfs.jar $libDirPkg
|
|
|
|
cp java_lib/build/libjbeegfs.so $libDir
|
2017-12-29 01:51:42 +00:00
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
cp ctl/build/beegfs-ctl $binDir
|
|
|
|
cp fsck/build/beegfs-fsck $binDir
|
2017-12-29 01:51:42 +00:00
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
cp utils/scripts/beegfs-check-servers $binDir
|
|
|
|
cp utils/scripts/beegfs-df $binDir
|
|
|
|
cp utils/scripts/beegfs-net $binDir
|
2017-12-29 01:51:42 +00:00
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
cp helperd/build/beegfs-helperd $binDir
|
|
|
|
cp helperd/build/dist/etc/beegfs-helperd.conf $docDir
|
2017-12-29 01:51:42 +00:00
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
cp client_module/build/dist/sbin/beegfs-setup-client $binDir
|
|
|
|
cp client_module/build/dist/etc/beegfs-client.conf $docDir
|
2017-12-29 01:51:42 +00:00
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
cp meta/build/beegfs-meta $binDir
|
|
|
|
cp meta/build/dist/sbin/beegfs-setup-meta $binDir
|
|
|
|
cp meta/build/dist/etc/beegfs-meta.conf $docDir
|
2017-12-29 01:51:42 +00:00
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
cp mgmtd/build/beegfs-mgmtd $binDir
|
|
|
|
cp mgmtd/build/dist/sbin/beegfs-setup-mgmtd $binDir
|
|
|
|
cp mgmtd/build/dist/etc/beegfs-mgmtd.conf $docDir
|
2017-12-29 01:51:42 +00:00
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
cp storage/build/beegfs-storage $binDir
|
|
|
|
cp storage/build/dist/sbin/beegfs-setup-storage $binDir
|
|
|
|
cp storage/build/dist/etc/beegfs-storage.conf $docDir
|
2017-12-29 01:51:42 +00:00
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
cp opentk_lib/build/libbeegfs-opentk.so $libDir
|
2017-12-29 01:51:42 +00:00
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
cp upgrade/beegfs_mirror_md/build/beegfs-mirror-md $binDir
|
2017-12-29 01:51:42 +00:00
|
|
|
|
2018-07-30 11:42:59 +01:00
|
|
|
cp client_devel/build/dist/usr/share/doc/beegfs-client-devel/examples/* $docDir
|
|
|
|
cp -r client_devel/include/* $includeDir
|
2018-01-24 08:27:00 +00:00
|
|
|
|
|
|
|
cp beeond_thirdparty_gpl/build/parallel $out/bin
|
|
|
|
cp beeond_thirdparty/build/pcopy/p* $out/bin
|
|
|
|
cp beeond_thirdparty/build/pcopy/s* $out/bin
|
|
|
|
cp -r beeond/scripts/* $out
|
|
|
|
cp beeond/source/* $out/bin
|
2017-12-29 01:51:42 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $out/bin/beegfs-admon-gui \
|
|
|
|
--replace " java " " ${jre}/bin/java " \
|
|
|
|
--replace "/opt/beegfs/beegfs-admon-gui/beegfs-admon-gui.jar" \
|
|
|
|
"$libDirPkg/beegfs-admon-gui.jar"
|
2018-01-24 08:27:00 +00:00
|
|
|
|
|
|
|
substituteInPlace $out/bin/beeond \
|
|
|
|
--replace /opt/beegfs/sbin "$out/bin"
|
2017-12-29 01:51:42 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = ''
|
2018-07-30 11:42:59 +01:00
|
|
|
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/opentk_lib/build/ \
|
|
|
|
common/build/test-runner --text
|
2017-12-29 01:51:42 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "High performance distributed filesystem with RDMA support";
|
|
|
|
homepage = "https://www.beegfs.io";
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
license = {
|
|
|
|
fullName = "BeeGFS_EULA";
|
|
|
|
url = "https://www.beegfs.io/docs/BeeGFS_EULA.txt";
|
|
|
|
free = false;
|
|
|
|
};
|
|
|
|
maintainers = with maintainers; [ markuskowa ];
|
|
|
|
};
|
|
|
|
}
|