From 791984bf189c6dc8a542d989c264b61ce76f3755 Mon Sep 17 00:00:00 2001 From: rewine Date: Mon, 27 Nov 2023 18:00:34 +0800 Subject: [PATCH] simdutf: init at 4.0.5 --- pkgs/by-name/si/simdutf/package.nix | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pkgs/by-name/si/simdutf/package.nix 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; + }; +})