nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "fp16";
10 version = "0-unstable-2024-20-06";
11
12 src = fetchFromGitHub {
13 owner = "Maratyszcza";
14 repo = "FP16";
15 rev = "98b0a46bce017382a6351a19577ec43a715b6835";
16 sha256 = "sha256-aob776ZGjnH4k/xfsdIcN9+wiuDreUoRBpyzrWGuxKk=";
17 };
18
19 nativeBuildInputs = [
20 cmake
21 ];
22
23 cmakeFlags = [
24 (lib.cmakeBool "FP16_BUILD_TESTS" false)
25 (lib.cmakeBool "FP16_BUILD_BENCHMARKS" false)
26 (lib.cmakeBool "FP16_USE_SYSTEM_LIBS" true)
27 ];
28
29 doCheck = true;
30
31 meta = {
32 description = "Header-only library for conversion to/from half-precision floating point formats";
33 homepage = "https://github.com/Maratyszcza/FP16";
34 license = lib.licenses.mit;
35 platforms = lib.platforms.all;
36 maintainers = with lib.maintainers; [ phodina ];
37 };
38})