mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 06:14:57 +01:00
aba73f3de3
Diff: https://github.com/Neargye/magic_enum/compare/refs/tags/v0.9.5...v0.9.6 Changelog: https://github.com/Neargye/magic_enum/releases/tag/v0.9.6
42 lines
1.2 KiB
Nix
42 lines
1.2 KiB
Nix
{ fetchFromGitHub
|
|
, lib
|
|
, stdenv
|
|
, cmake
|
|
, nix-update-script
|
|
, testers
|
|
, magic-enum
|
|
}:
|
|
stdenv.mkDerivation rec{
|
|
pname = "magic-enum";
|
|
version = "0.9.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Neargye";
|
|
repo = "magic_enum";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-1pO9FWd0InXqg8+lwRF3YNFTAeVLjqoI9v15LjWxnZY=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
cmakeFlags = [
|
|
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
|
|
# (setting it to an absolute path causes include files to go to $out/$out/include,
|
|
# because the absolute path is interpreted with root at $out).
|
|
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
];
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
tests.version = testers.testVersion { package = magic-enum; };
|
|
};
|
|
|
|
meta = {
|
|
description = "Static reflection for enums (to string, from string, iteration) for modern C++";
|
|
homepage = "https://github.com/Neargye/magic_enum";
|
|
changelog = "https://github.com/Neargye/magic_enum/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ Alper-Celik ];
|
|
};
|
|
}
|