summary refs log tree commit diff
path: root/pkgs/development/libraries/libdatrie
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libdatrie')
-rw-r--r--pkgs/development/libraries/libdatrie/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libdatrie/default.nix b/pkgs/development/libraries/libdatrie/default.nix
new file mode 100644
index 00000000000..257673b1a96
--- /dev/null
+++ b/pkgs/development/libraries/libdatrie/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchFromGitHub, makeWrapper
+, autoreconfHook, autoconf-archive
+, installShellFiles, libiconv }:
+
+stdenv.mkDerivation rec {
+
+  pname = "libdatrie";
+  version = "2019-12-20";
+
+  outputs = [ "bin" "out" "lib" "dev" ];
+
+  src = fetchFromGitHub {
+    owner = "tlwg";
+    repo = "libdatrie";
+    rev = "d1db08ac1c76f54ba23d63665437473788c999f3";
+    sha256 = "03dc363259iyiidrgadzc7i03mmfdj8h78j82vk6z53w6fxq5zxc";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    autoconf-archive
+    installShellFiles
+  ];
+
+  buildInputs = lib.optional stdenv.isDarwin libiconv;
+
+  preAutoreconf = let
+    reports = "https://github.com/tlwg/libdatrie/issues";
+  in
+  ''
+    sed -i -e "/AC_INIT/,+3d" configure.ac
+    sed -i "5iAC_INIT(${pname},${version},[${reports}])" configure.ac
+  '';
+
+  postInstall = ''
+    installManPage man/trietool.1
+  '';
+
+  meta = with lib; {
+    homepage = "https://linux.thai.net/~thep/datrie/datrie.html";
+    description = "This is an implementation of double-array structure for representing trie";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+  };
+}