summary refs log tree commit diff
path: root/pkgs/tools/system/stress-ng
diff options
context:
space:
mode:
authorRenaud <c0bw3b@users.noreply.github.com>2019-10-31 08:58:44 +0100
committerGitHub <noreply@github.com>2019-10-31 08:58:44 +0100
commitcbc94a05ba4348af01b38aff13f8e28a1f77dfc8 (patch)
tree2d3fed2044b3a0d5f1e35f5fbae13496d699435a /pkgs/tools/system/stress-ng
parent6b46338847893e445cdafecb5b02926d7b7176b3 (diff)
downloadnixpkgs-cbc94a05ba4348af01b38aff13f8e28a1f77dfc8.tar
nixpkgs-cbc94a05ba4348af01b38aff13f8e28a1f77dfc8.tar.gz
nixpkgs-cbc94a05ba4348af01b38aff13f8e28a1f77dfc8.tar.bz2
nixpkgs-cbc94a05ba4348af01b38aff13f8e28a1f77dfc8.tar.lz
nixpkgs-cbc94a05ba4348af01b38aff13f8e28a1f77dfc8.tar.xz
nixpkgs-cbc94a05ba4348af01b38aff13f8e28a1f77dfc8.tar.zst
nixpkgs-cbc94a05ba4348af01b38aff13f8e28a1f77dfc8.zip
stress-ng: 0.10.05 -> 0.10.08 (#72333)
+ fixes #72292
Diffstat (limited to 'pkgs/tools/system/stress-ng')
-rw-r--r--pkgs/tools/system/stress-ng/default.nix23
1 files changed, 14 insertions, 9 deletions
diff --git a/pkgs/tools/system/stress-ng/default.nix b/pkgs/tools/system/stress-ng/default.nix
index 7f7ce425fa7..b15c8623fa5 100644
--- a/pkgs/tools/system/stress-ng/default.nix
+++ b/pkgs/tools/system/stress-ng/default.nix
@@ -1,25 +1,32 @@
 { 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 {
   pname = "stress-ng";
-  version = "0.10.05";
+  version = "0.10.08";
 
   src = fetchurl {
     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
-  buildInputs = [ libbsd libgcrypt zlib ]
+  buildInputs = [ judy libbsd libgcrypt zlib ]
     ++ stdenv.lib.optionals stdenv.hostPlatform.isLinux [
       attr keyutils libaio libapparmor libcap lksctp-tools
     ];
 
-  postPatch = ''
-    substituteInPlace Makefile --replace "/usr" ""
-  '';
+  makeFlags = [
+    "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";
 
@@ -29,8 +36,6 @@ stdenv.mkDerivation rec {
   # mystery, though. :-(
   enableParallelBuilding = (!stdenv.isi686);
 
-  installFlags = [ "DESTDIR=${placeholder "out"}" ];
-
   meta = with stdenv.lib; {
     description = "Stress test a computer system";
     longDescription = ''