diff options
author | chayleaf <chayleaf-git@pavluk.org> | 2023-10-20 14:41:34 +0700 |
---|---|---|
committer | chayleaf <chayleaf-git@pavluk.org> | 2023-10-27 01:09:48 +0700 |
commit | 47646a34bae848c4a6869c41ff544be6c4cdb7a4 (patch) | |
tree | 21515754fe3dd4261a3da85c4059d8318026fa75 /pkgs/servers/sql/postgresql/ext | |
parent | a190bf43b618e0bbc8cc5cd2310ae2a03f307190 (diff) | |
download | nixpkgs-47646a34bae848c4a6869c41ff544be6c4cdb7a4.tar nixpkgs-47646a34bae848c4a6869c41ff544be6c4cdb7a4.tar.gz nixpkgs-47646a34bae848c4a6869c41ff544be6c4cdb7a4.tar.bz2 nixpkgs-47646a34bae848c4a6869c41ff544be6c4cdb7a4.tar.lz nixpkgs-47646a34bae848c4a6869c41ff544be6c4cdb7a4.tar.xz nixpkgs-47646a34bae848c4a6869c41ff544be6c4cdb7a4.tar.zst nixpkgs-47646a34bae848c4a6869c41ff544be6c4cdb7a4.zip |
postgresqlPackages.tsja: init at 0.5.0
Diffstat (limited to 'pkgs/servers/sql/postgresql/ext')
-rw-r--r-- | pkgs/servers/sql/postgresql/ext/tsja.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/servers/sql/postgresql/ext/tsja.nix b/pkgs/servers/sql/postgresql/ext/tsja.nix new file mode 100644 index 00000000000..f62eae5b6a3 --- /dev/null +++ b/pkgs/servers/sql/postgresql/ext/tsja.nix @@ -0,0 +1,45 @@ +{ lib +, fetchzip +, nixosTests +, stdenv + +, mecab +, postgresql +}: + +stdenv.mkDerivation rec { + pname = "tsja"; + version = "0.5.0"; + + src = fetchzip { + url = "https://www.amris.jp/tsja/tsja-${version}.tar.xz"; + hash = "sha256-h59UhUG/7biN8NaDiGK6kXDqfhR9uMzt8CpwbJ+PpEM="; + }; + + postPatch = '' + substituteInPlace Makefile \ + --replace /usr/local/pgsql ${postgresql} \ + --replace -L/usr/local/lib "" \ + --replace -I/usr/local/include "" + substituteInPlace tsja.c --replace /usr/local/lib/mecab ${mecab}/lib/mecab + ''; + + buildInputs = [ mecab postgresql ]; + + installPhase = '' + mkdir -p $out/lib $out/share/postgresql/extension + mv libtsja.so $out/lib + mv dbinit_libtsja.txt $out/share/postgresql/extension/libtsja_dbinit.sql + ''; + + passthru.tests.tsja = nixosTests.tsja; + + meta = with lib; { + description = "PostgreSQL extension implementing Japanese text search"; + homepage = "https://www.amris.jp/tsja/index.html"; + maintainers = with maintainers; [ chayleaf ]; + # GNU-specific linker options are used + platforms = platforms.gnu; + license = licenses.gpl2Only; + }; +} |