2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchgit, autoconf, popt, zlib, rpcsvc-proto, libtirpc }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dbench";
|
|
|
|
version = "2013-01-01";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "git://git.samba.org/sahlberg/${pname}.git";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = "65b19870ed8d25bff14cafa1c30beb33f1fb6597";
|
|
|
|
sha256 = "16lcbwmmx8z5i73k3dnf54yffrpx7ql3y9k3cpkss9dcyxb1p83i";
|
|
|
|
};
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
nativeBuildInputs = [ autoconf rpcsvc-proto ];
|
|
|
|
buildInputs = [ popt zlib libtirpc ];
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
|
2020-10-16 20:44:37 +00:00
|
|
|
NIX_LDFLAGS = [ "-ltirpc" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
# patch has been also sent upstream and might be included in future versions
|
|
|
|
./fix-missing-stdint.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
./autogen.sh
|
|
|
|
configureFlagsArray+=("--datadir=$out/share/dbench")
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp -R loadfiles/* $out/share/dbench/doc/dbench/loadfiles
|
|
|
|
|
|
|
|
# dbench looks here for the file
|
|
|
|
ln -s doc/dbench/loadfiles/client.txt $out/share/dbench/client.txt
|
|
|
|
|
|
|
|
# backwards compatible to older nixpkgs packaging introduced by
|
|
|
|
# 3f27be8e5d5861cd4b9487d6c5212d88bf24316d
|
|
|
|
ln -s dbench/doc/dbench/loadfiles $out/share/loadfiles
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Filesystem benchmark tool based on load patterns";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "dbench";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://dbench.samba.org/";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.bjornfor ];
|
|
|
|
};
|
|
|
|
}
|