1 { lib, stdenv, fetchurl, zlib }:
3 stdenv.mkDerivation rec {
4 pname = "kyotocabinet";
8 url = "https://dbmx.net/kyotocabinet/pkg/kyotocabinet-${version}.tar.gz";
9 sha256 = "sha256-TIXXNmaNgpIL/b25KsPWa32xEI8JWBp2ndkWCgLe80k=";
12 prePatch = lib.optionalString stdenv.isDarwin ''
13 substituteInPlace kccommon.h \
14 --replace tr1/unordered_map unordered_map \
15 --replace tr1/unordered_set unordered_set \
16 --replace tr1::hash std::hash \
17 --replace tr1::unordered_map std::unordered_map \
18 --replace tr1::unordered_set std::unordered_set
20 substituteInPlace lab/kcdict/Makefile --replace stdc++ c++
21 substituteInPlace configure \
22 --replace /usr/local/bin:/usr/local/sbin: "" \
23 --replace /usr/bin:/usr/sbin: "" \
24 --replace /bin:/sbin: "" \
28 buildInputs = [ zlib ];
31 homepage = "https://dbmx.net/kyotocabinet";
32 description = "A library of routines for managing a database";
33 license = licenses.gpl3Plus;
34 platforms = platforms.all;