1{ fetchFromGitHub
2, lib
3, stdenv
4, cmake
5}:
6stdenv.mkDerivation rec{
7 pname = "magic-enum";
8 version = "0.8.2";
9 src = fetchFromGitHub {
10 owner = "Neargye";
11 repo = "magic_enum";
12 rev = "v${version}";
13 sha256 = "sha256-k4zCEQxO0N/o1hDYxw5p9u0BMwP/5oIoe/4yw7oqEo0=";
14 };
15
16 nativeBuildInputs = [ cmake ];
17
18 # disable tests until upstream fixes build issues with gcc 12
19 # see https://github.com/Neargye/magic_enum/issues/235
20 doCheck = false;
21 cmakeFlags = [
22 "-DMAGIC_ENUM_OPT_BUILD_TESTS=OFF"
23 ];
24
25 meta = with lib;{
26 description = "Static reflection for enums (to string, from string, iteration) for modern C++";
27 homepage = "https://github.com/Neargye/magic_enum";
28 license = licenses.mit;
29 maintainers = with maintainers; [ Alper-Celik ];
30 };
31}