nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 autoreconfHook,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "numactl";
11 version = "2.0.18";
12
13 src = fetchFromGitHub {
14 owner = "numactl";
15 repo = "numactl";
16 rev = "v${finalAttrs.version}";
17 hash = "sha256-ry29RUNa0Hv5gIhy2RTVT94mHhgfdIwb5aqjBycxxj0=";
18 };
19
20 patches = [
21 # Fix for memory corruption in set_nodemask_size
22 (fetchpatch {
23 url = "https://github.com/numactl/numactl/commit/f9deba0c8404529772468d6dd01389f7dbfa5ba9.patch";
24 hash = "sha256-TmWfD99YaSIHA5PSsWHE91GSsdsVgVU+qIow7LOwOGw=";
25 })
26 ];
27
28 outputs = [
29 "out"
30 "dev"
31 "man"
32 ];
33
34 nativeBuildInputs = [ autoreconfHook ];
35
36 postPatch = ''
37 patchShebangs test
38 '';
39
40 # You probably shouldn't ever run these! They will reconfigure Linux
41 # NUMA settings, which on my build machine makes the rest of package
42 # building ~5% slower until reboot. Ugh!
43 doCheck = false; # never ever!
44
45 meta = {
46 description = "Library and tools for non-uniform memory access (NUMA) machines";
47 homepage = "https://github.com/numactl/numactl";
48 license = with lib.licenses; [
49 gpl2Only
50 lgpl21
51 ]; # libnuma is lgpl21
52 platforms = lib.platforms.linux;
53 };
54})