1{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
2
3stdenv.mkDerivation rec {
4 pname = "numactl";
5 version = "2.0.16";
6
7 src = fetchFromGitHub {
8 owner = pname;
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-aDKzkmvrPDzQl4n0KgeiU5LOLhQA0tmwzGiXvJDp7ZI=";
12 };
13
14 outputs = [ "out" "dev" "man" ];
15
16 nativeBuildInputs = [ autoreconfHook ];
17
18 postPatch = ''
19 patchShebangs test
20 '';
21
22 LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic";
23
24 # You probably shouldn't ever run these! They will reconfigure Linux
25 # NUMA settings, which on my build machine makes the rest of package
26 # building ~5% slower until reboot. Ugh!
27 doCheck = false; # never ever!
28
29 meta = with lib; {
30 description = "Library and tools for non-uniform memory access (NUMA) machines";
31 homepage = "https://github.com/numactl/numactl";
32 license = with licenses; [ gpl2 lgpl21 ]; # libnuma is lgpl21
33 platforms = platforms.linux;
34 };
35}