summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/cpu/default.nix
blob: aca3d1a2143a19b29847352c9249a99e1cbbd501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
  lib,
  stdenv,
  buildDunePackage,
  fetchFromGitHub,
  autoconf,
}:

buildDunePackage (finalAttrs: {
  pname = "cpu";
  version = "2.0.0";

  src = fetchFromGitHub {
    owner = "UnixJunkie";
    repo = "cpu";
    tag = "v${finalAttrs.version}";
    hash = "sha256-O0pvNRONlprQ4XVG3858cnDo0WDJWOaEfH3DFeAzOe4=";
  };

  preConfigure = ''
    autoconf
    autoheader
  '';

  nativeBuildInputs = [ autoconf ];

  hardeningDisable = lib.optional stdenv.hostPlatform.isDarwin "strictoverflow";

  meta = {
    homepage = "https://github.com/UnixJunkie/cpu";
    description = "Core pinning library";
    maintainers = [ lib.maintainers.bcdarwin ];
    license = lib.licenses.lgpl2;
  };
})