parent
6b46338847
commit
cbc94a05ba
@ -1,25 +1,32 @@
|
|||||||
{ stdenv, fetchurl
|
{ stdenv, fetchurl
|
||||||
, attr, keyutils, libaio, libapparmor, libbsd, libcap, libgcrypt, lksctp-tools, zlib
|
, attr, judy, keyutils, libaio, libapparmor, libbsd, libcap, libgcrypt, lksctp-tools, zlib
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "stress-ng";
|
pname = "stress-ng";
|
||||||
version = "0.10.05";
|
version = "0.10.08";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://kernel.ubuntu.com/~cking/tarballs/${pname}/${pname}-${version}.tar.xz";
|
url = "https://kernel.ubuntu.com/~cking/tarballs/${pname}/${pname}-${version}.tar.xz";
|
||||||
sha256 = "0hkghs99fl8kzg3lkkd4w6cj5133zr9a415py0ng60kzrfffmgdy";
|
sha256 = "1kkmznn0y5wxi7x9nlhzyfy933bv66113in4rf0raw6brymympaa";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed -i '/\#include <bsd\/string.h>/i #undef HAVE_STRLCAT\n#undef HAVE_STRLCPY' stress-ng.h
|
||||||
|
''; # needed because of Darwin patch on libbsd
|
||||||
|
|
||||||
# All platforms inputs then Linux-only ones
|
# All platforms inputs then Linux-only ones
|
||||||
buildInputs = [ libbsd libgcrypt zlib ]
|
buildInputs = [ judy libbsd libgcrypt zlib ]
|
||||||
++ stdenv.lib.optionals stdenv.hostPlatform.isLinux [
|
++ stdenv.lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
attr keyutils libaio libapparmor libcap lksctp-tools
|
attr keyutils libaio libapparmor libcap lksctp-tools
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
makeFlags = [
|
||||||
substituteInPlace Makefile --replace "/usr" ""
|
"BINDIR=${placeholder "out"}/bin"
|
||||||
'';
|
"MANDIR=${placeholder "out"}/share/man/man1"
|
||||||
|
"JOBDIR=${placeholder "out"}/share/stress-ng/example-jobs"
|
||||||
|
"BASHDIR=${placeholder "out"}/share/bash-completion/completions"
|
||||||
|
];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.hostPlatform.isMusl "-D_LINUX_SYSINFO_H=1";
|
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.hostPlatform.isMusl "-D_LINUX_SYSINFO_H=1";
|
||||||
|
|
||||||
@ -29,8 +36,6 @@ stdenv.mkDerivation rec {
|
|||||||
# mystery, though. :-(
|
# mystery, though. :-(
|
||||||
enableParallelBuilding = (!stdenv.isi686);
|
enableParallelBuilding = (!stdenv.isi686);
|
||||||
|
|
||||||
installFlags = [ "DESTDIR=${placeholder "out"}" ];
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Stress test a computer system";
|
description = "Stress test a computer system";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user