about summary refs log tree commit diff
path: root/pkgs/by-name/si
diff options
context:
space:
mode:
authorrewine <luhongxu@deepin.org>2023-11-27 18:00:34 +0800
committerrewine <luhongxu@deepin.org>2023-11-30 10:50:35 +0800
commit791984bf189c6dc8a542d989c264b61ce76f3755 (patch)
tree0b184f0ca76431c67fb0fe8cb22a527d9970c96e /pkgs/by-name/si
parent855ec34c8c582b996fea69cd8edfb4702c27a82a (diff)
simdutf: init at 4.0.5
Diffstat (limited to 'pkgs/by-name/si')
-rw-r--r--pkgs/by-name/si/simdutf/package.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/by-name/si/simdutf/package.nix b/pkgs/by-name/si/simdutf/package.nix
new file mode 100644
index 0000000000000..3822feb381f9f
--- /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;
+  };
+})