1 { stdenv, lib, fetchurl, gnuplot }:
4 target = if stdenv.hostPlatform.system == "i686-linux" then
6 else if stdenv.hostPlatform.system == "x86_64-linux" then
8 else if stdenv.hostPlatform.system == "x86_64-darwin" then
10 else if stdenv.hostPlatform.system == "aarch64-linux" then
12 else throw "Platform ${stdenv.hostPlatform.system} not yet supported.";
15 stdenv.mkDerivation rec {
20 url = "http://www.iozone.org/src/current/iozone${lib.replaceStrings ["."] ["_"] version}.tar";
21 hash = "sha256-EUzlwHGHO5ose6bnPQXV735mVkOSrL/NwLMmHbEPy+c=";
25 url = "http://www.iozone.org/docs/Iozone_License.txt";
26 hash = "sha256-O/8yztxKBI/UKs6vwv9mq16Rn3cf/UHpSxdVnAPVCYw=";
29 preBuild = "pushd src/current";
34 enableParallelBuilding = true;
37 mkdir -p $out/{bin,share/doc,libexec,share/man/man1}
38 install docs/iozone.1 $out/share/man/man1/
39 install docs/Iozone_ps.gz $out/share/doc/
40 install -s src/current/{iozone,fileop,pit_server} $out/bin/
41 install src/current/{gnu3d.dem,Generate_Graphs,gengnuplot.sh} $out/libexec/
42 ln -s $out/libexec/Generate_Graphs $out/bin/iozone_generate_graphs
43 # License copy is mandated by the license, but it's not in the tarball.
44 install ${license} $out/share/doc/Iozone_License.txt
48 sed -i "1i#! $shell" $out/libexec/Generate_Graphs
49 substituteInPlace $out/libexec/Generate_Graphs \
50 --replace ./gengnuplot.sh $out/libexec/gengnuplot.sh \
51 --replace 'gnuplot ' "${gnuplot}/bin/gnuplot " \
52 --replace gnu3d.dem $out/libexec/gnu3d.dem
56 description = "IOzone Filesystem Benchmark";
57 homepage = "http://www.iozone.org/";
58 license = lib.licenses.unfreeRedistributable;
59 platforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "aarch64-linux" ];
60 maintainers = with lib.maintainers; [ Baughn makefu ];