aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/misc/bandwidth/default.nix
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-12-09 18:55:19 +0000
committerMx Kookie <kookie@spacekookie.de>2020-12-09 18:55:19 +0000
commit80d90d9b204f7c17912740f9f414fe5d59f293ba (patch)
tree5f2065a06e724270610760d59d01c6888b375a46 /infra/libkookie/nixpkgs/pkgs/tools/misc/bandwidth/default.nix
parent3a31a84c7d3e589035ad08499206aac44a81f424 (diff)
parent83cbad92d73216bb0d9187c56cce0b91f9121d5a (diff)
Merge commit '83cbad92d73216bb0d9187c56cce0b91f9121d5a' into main
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/tools/misc/bandwidth/default.nix')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/misc/bandwidth/default.nix31
1 files changed, 15 insertions, 16 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/misc/bandwidth/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/misc/bandwidth/default.nix
index 5de77aea0e04..024454a3472d 100644
--- a/infra/libkookie/nixpkgs/pkgs/tools/misc/bandwidth/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/tools/misc/bandwidth/default.nix
@@ -1,38 +1,37 @@
{ stdenv, fetchurl, nasm }:
let
- arch =
- if stdenv.hostPlatform.system == "x86_64-linux" then "bandwidth64"
- else if stdenv.hostPlatform.system == "i686-linux" then "bandwidth32"
- else if stdenv.hostPlatform.system == "x86_64-darwin" then "bandwidth-mac64"
- else if stdenv.hostPlatform.system == "i686-darwin" then "bandwidth-mac32"
- else if stdenv.hostPlatform.system == "i686-cygwin" then "bandwidth-win32"
- else throw "Unknown architecture";
+ inherit (stdenv.hostPlatform.parsed.cpu) bits;
+ arch = "bandwidth${toString bits}";
in
stdenv.mkDerivation rec {
pname = "bandwidth";
- version = "1.9.3";
+ version = "1.9.4";
src = fetchurl {
url = "https://zsmith.co/archives/${pname}-${version}.tar.gz";
- sha256 = "0zpv2qgkbak0llw47qcakhyh2z3zv4d69kasldmpdlpqryd9za84";
+ sha256 = "0x798xj3vhiwq2hal0vmf92sq4h7yalp3i6ylqwhnnpv99m2zws4";
};
- buildInputs = [ nasm ];
+ postPatch = ''
+ sed -i 's,^CC=gcc .*,,' OOC/Makefile Makefile*
+ sed -i 's,ar ,$(AR) ,g' OOC/Makefile
+ '';
+
+ nativeBuildInputs = [ nasm ];
- buildFlags = [ arch ]
- ++ stdenv.lib.optionals stdenv.cc.isClang [ "CC=clang" "LD=clang" ];
+ buildFlags = [ arch ];
installPhase = ''
mkdir -p $out/bin
- cp ${arch} $out/bin
- ln -s ${arch} $out/bin/bandwidth
+ cp ${arch} $out/bin/bandwidth
'';
meta = with stdenv.lib; {
homepage = "https://zsmith.co/bandwidth.html";
description = "Artificial benchmark for identifying weaknesses in the memory subsystem";
- license = licenses.mit;
- platforms = platforms.unix;
+ license = licenses.gpl2Plus;
+ platforms = platforms.x86;
+ maintainers = with maintainers; [ r-burns ];
};
}