tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
0
fork
atom
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
0
fork
atom
overview
issues
pulls
pipelines
bandwidth: refactor
emaryn
1 year ago
af6ffa60
714e525d
+16
-14
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
ba
bandwidth
package.nix
+16
-14
pkgs/by-name/ba/bandwidth/package.nix
reviewed
···
1
1
{
2
2
lib,
3
3
stdenv,
4
4
-
fetchurl,
4
4
+
requireFile,
5
5
nasm,
6
6
}:
7
7
8
8
let
9
9
-
inherit (stdenv.hostPlatform.parsed.cpu) bits;
10
10
-
arch = "bandwidth${toString bits}";
9
9
+
arch = "bandwidth${toString stdenv.hostPlatform.parsed.cpu.bits}";
11
10
in
12
12
-
stdenv.mkDerivation rec {
11
11
+
stdenv.mkDerivation (finalAttrs: {
13
12
pname = "bandwidth";
14
13
version = "1.11.2d";
15
14
16
16
-
src = fetchurl {
17
17
-
url = "https://zsmith.co/archives/bandwidth-${version}.tar.gz";
15
15
+
src = requireFile {
16
16
+
message = "This file does not have a valid url.";
17
17
+
name = "bandwidth-${finalAttrs.version}.tar.gz";
18
18
hash = "sha256-7IrNiCXKf1vyRGl73Ccu3aYMqPVc4PpEr6lnSqIa4Q8=";
19
19
};
20
20
···
48
48
];
49
49
50
50
installPhase = ''
51
51
-
mkdir -p $out/bin
52
52
-
cp ${arch} $out/bin/bandwidth
51
51
+
runHook preInstall
52
52
+
53
53
+
install -Dm755 ${arch} $out/bin/bandwidth
54
54
+
55
55
+
runHook postInstall
53
56
'';
54
57
55
55
-
meta = with lib; {
56
56
-
homepage = "https://zsmith.co/bandwidth.html";
58
58
+
meta = {
57
59
description = "Artificial benchmark for identifying weaknesses in the memory subsystem";
58
58
-
license = licenses.gpl2Plus;
59
59
-
platforms = platforms.x86 ++ platforms.arm ++ platforms.aarch64;
60
60
-
maintainers = with maintainers; [ r-burns ];
60
60
+
license = lib.licenses.gpl2Plus;
61
61
+
platforms = lib.platforms.x86 ++ lib.platforms.arm ++ lib.platforms.aarch64;
62
62
+
maintainers = with lib.maintainers; [ r-burns ];
61
63
mainProgram = "bandwidth";
62
64
};
63
63
-
}
65
65
+
})