From 89f7847889a94ce1cdc91c513b1032097d05ff4e Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sun, 10 Dec 2023 01:52:24 +0100 Subject: [PATCH] bonnie: refactor --- pkgs/tools/filesystems/bonnie/default.nix | 24 +++++++++++++++++------ pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/filesystems/bonnie/default.nix b/pkgs/tools/filesystems/bonnie/default.nix index 429617e5eae2..a2f1c51e7e12 100644 --- a/pkgs/tools/filesystems/bonnie/default.nix +++ b/pkgs/tools/filesystems/bonnie/default.nix @@ -1,4 +1,8 @@ -{ lib, stdenv, fetchurl, perl }: +{ lib +, stdenv +, fetchurl +, fetchpatch +}: stdenv.mkDerivation rec { pname = "bonnie++"; @@ -6,17 +10,25 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://www.coker.com.au/bonnie++/bonnie++-${version}.tgz"; - sha256 = "sha256-qNM7vYG8frVZzlv25YS5tT+uo5zPtK6S5Y8nJX5Gjw4="; + hash = "sha256-qNM7vYG8frVZzlv25YS5tT+uo5zPtK6S5Y8nJX5Gjw4="; }; + patches = [ + (fetchpatch { + name = "bonnie++-2.00a-gcc11.patch"; + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/app-benchmarks/bonnie++/files/bonnie++-2.00a-gcc11.patch?id=d0f29755e969c805fbd6240905e3925671340666"; + hash = "sha256-/cIC4HYQco5Nv1UoTELl2OGD5hdWhbz3L0+GjN/vcdE="; + }) + ]; + enableParallelBuilding = true; - buildInputs = [ perl ]; - meta = { - homepage = "http://www.coker.com.au/bonnie++/"; description = "Hard drive and file system benchmark suite"; - license = lib.licenses.gpl2; + homepage = "http://www.coker.com.au/bonnie++/"; + license = lib.licenses.gpl2Only; + mainProgram = "bonnie++"; + maintainers = with lib.maintainers; [ wegank ]; platforms = lib.platforms.linux ++ lib.platforms.darwin; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 47e6879dd8aa..4456fb1a92bc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3597,9 +3597,7 @@ with pkgs; bonnmotion = callPackage ../development/tools/misc/bonnmotion { }; - bonnie = callPackage ../tools/filesystems/bonnie { - stdenv = gcc10StdenvCompat; - }; + bonnie = callPackage ../tools/filesystems/bonnie { }; boron = callPackage ../development/interpreters/boron { };