diff --git a/pkgs/by-name/si/simdutf/package.nix b/pkgs/by-name/si/simdutf/package.nix new file mode 100644 index 000000000000..3822feb381f9 --- /dev/null +++ b/pkgs/by-name/si/simdutf/package.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, libiconv +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "simdutf"; + version = "4.0.5"; + + src = fetchFromGitHub { + owner = "simdutf"; + repo = "simdutf"; + rev = "v${finalAttrs.version}"; + hash = "sha256-HNTVo/uB7UTCy5VVdmf6vka9T+htra7Vk7NF4hByGP4="; + }; + + # Fix build on darwin + postPatch = '' + substituteInPlace tools/CMakeLists.txt --replace "-Wl,--gc-sections" "" + ''; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + libiconv + ]; + + meta = with lib; { + description = "Unicode routines validation and transcoding at billions of characters per second"; + homepage = "https://github.com/simdutf/simdutf"; + license = with licenses; [ asl20 mit ]; + maintainers = with maintainers; [ rewine ]; + mainProgram = "simdutf"; + platforms = platforms.all; + }; +})