2016-06-02 22:45:14 +01:00
|
|
|
{ stdenv, fetchurl, gnuplot }:
|
2016-01-14 15:18:12 +00:00
|
|
|
|
|
|
|
let
|
2018-08-20 20:11:29 +01:00
|
|
|
target = if stdenv.hostPlatform.system == "i686-linux" then
|
2016-01-14 15:18:12 +00:00
|
|
|
"linux"
|
2018-08-20 20:11:29 +01:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-linux" then
|
2016-01-14 15:18:12 +00:00
|
|
|
"linux-AMD64"
|
2018-08-20 20:11:29 +01:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-darwin" then
|
2016-01-14 15:18:12 +00:00
|
|
|
"macosx"
|
2018-08-20 20:11:29 +01:00
|
|
|
else if stdenv.hostPlatform.system == "aarch64-linux" then
|
2017-10-02 09:00:20 +01:00
|
|
|
"linux-arm"
|
2018-08-20 20:11:29 +01:00
|
|
|
else throw "Platform ${stdenv.hostPlatform.system} not yet supported.";
|
2016-01-14 15:18:12 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-11-27 09:35:17 +00:00
|
|
|
name = "iozone-3.471";
|
2016-01-14 15:18:12 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-11-27 09:35:17 +00:00
|
|
|
url = http://www.iozone.org/src/current/iozone3_471.tar;
|
|
|
|
sha256 = "0w63b3d4ws1sm52lpdd08sl7n4ay438dl3wy0q9la12iq81rglid";
|
2016-01-14 15:18:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
license = fetchurl {
|
|
|
|
url = http://www.iozone.org/docs/Iozone_License.txt;
|
|
|
|
sha256 = "1309sl1rqm8p9gll3z8zfygr2pmbcvzw5byf5ba8y12avk735zrv";
|
|
|
|
};
|
|
|
|
|
|
|
|
preBuild = "pushd src/current";
|
|
|
|
postBuild = "popd";
|
|
|
|
|
|
|
|
buildFlags = target;
|
|
|
|
|
2016-06-02 22:45:14 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-01-14 15:18:12 +00:00
|
|
|
installPhase = ''
|
2016-06-02 22:45:14 +01:00
|
|
|
mkdir -p $out/{bin,share/doc,libexec,share/man/man1}
|
2016-01-15 09:25:31 +00:00
|
|
|
install docs/iozone.1 $out/share/man/man1/
|
|
|
|
install docs/Iozone_ps.gz $out/share/doc/
|
2016-01-14 15:18:12 +00:00
|
|
|
install -s src/current/{iozone,fileop,pit_server} $out/bin/
|
2016-06-02 22:45:14 +01:00
|
|
|
install src/current/{gnu3d.dem,Generate_Graphs,gengnuplot.sh} $out/libexec/
|
|
|
|
ln -s $out/libexec/Generate_Graphs $out/bin/iozone_generate_graphs
|
2016-01-14 15:18:12 +00:00
|
|
|
# License copy is mandated by the license, but it's not in the tarball.
|
2016-01-15 09:25:31 +00:00
|
|
|
install ${license} $out/share/doc/Iozone_License.txt
|
2016-01-14 15:18:12 +00:00
|
|
|
'';
|
|
|
|
|
2016-06-02 22:45:14 +01:00
|
|
|
preFixup = ''
|
|
|
|
sed -i "1i#! $shell" $out/libexec/Generate_Graphs
|
|
|
|
substituteInPlace $out/libexec/Generate_Graphs \
|
|
|
|
--replace ./gengnuplot.sh $out/libexec/gengnuplot.sh \
|
|
|
|
--replace 'gnuplot ' "${gnuplot}/bin/gnuplot " \
|
|
|
|
--replace gnu3d.dem $out/libexec/gnu3d.dem
|
|
|
|
'';
|
|
|
|
|
2016-01-14 15:18:12 +00:00
|
|
|
meta = {
|
|
|
|
description = "IOzone Filesystem Benchmark";
|
|
|
|
homepage = http://www.iozone.org/;
|
|
|
|
license = stdenv.lib.licenses.unfreeRedistributable;
|
2017-10-02 09:00:20 +01:00
|
|
|
platforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "aarch64-linux" ];
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ Baughn makefu ];
|
2016-01-14 15:18:12 +00:00
|
|
|
};
|
|
|
|
}
|