2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-28 23:13:55 +00:00
|
|
|
pname = "kyotocabinet";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "1.2.80";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-28 23:13:55 +00:00
|
|
|
url = "https://dbmx.net/kyotocabinet/pkg/kyotocabinet-${version}.tar.gz";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-TIXXNmaNgpIL/b25KsPWa32xEI8JWBp2ndkWCgLe80k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
prePatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace kccommon.h \
|
|
|
|
--replace tr1/unordered_map unordered_map \
|
|
|
|
--replace tr1/unordered_set unordered_set \
|
|
|
|
--replace tr1::hash std::hash \
|
|
|
|
--replace tr1::unordered_map std::unordered_map \
|
|
|
|
--replace tr1::unordered_set std::unordered_set
|
|
|
|
|
|
|
|
substituteInPlace lab/kcdict/Makefile --replace stdc++ c++
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace /usr/local/bin:/usr/local/sbin: "" \
|
|
|
|
--replace /usr/bin:/usr/sbin: "" \
|
|
|
|
--replace /bin:/sbin: "" \
|
|
|
|
--replace stdc++ c++
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://dbmx.net/kyotocabinet";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Library of routines for managing a database";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|