blob: 16cf0b301c36b16bd613df899ac6acde82f4af8c (
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
36
|
{
lib,
stdenv,
fetchFromGitHub,
cmake,
static ? stdenv.hostPlatform.isStatic,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cpu_features";
version = "0.10.1";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "google";
repo = "cpu_features";
rev = "v${finalAttrs.version}";
hash = "sha256-IBJc1sHHh4G3oTzQm1RAHHahsEECC+BDl14DHJ8M1Ys=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ];
meta = {
description = "Cross platform C99 library to get cpu features at runtime";
homepage = "https://github.com/google/cpu_features";
license = lib.licenses.asl20;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ renesat ];
};
})
|