@@ -0,0 +1,37 @@
1+{ stdenv, fetchzip }:
2+
3+stdenv.mkDerivation rec {
4+ name = "lmdb-${version}";
5+ version = "0.9.15";
6+
7+ src = fetchzip {
8+ url = "https://github.com/LMDB/lmdb/archive/LMDB_${version}.tar.gz";
9+ sha256 = "0p79fpyh1yx2jg1f0kag5zsdn4spkgs1j3dxibvqdy32wkbpxd0g";
10+ };
11+
12+ postUnpack = "sourceRoot=\${sourceRoot}/libraries/liblmdb";
13+
14+ makeFlags = "prefix=$(out)";
15+
16+ doCheck = true;
17+ checkPhase = "make test";
18+
19+ preInstall = ''
20+ mkdir -p $out/{man/man1,bin,lib,include}
21+ '';
22+
23+ meta = with stdenv.lib; {
24+ description = "Lightning memory-mapped database";
25+ longDescription = ''
26+ LMDB is an ultra-fast, ultra-compact key-value embedded data store
27+ developed by Symas for the OpenLDAP Project. It uses memory-mapped files,
28+ so it has the read performance of a pure in-memory database while still
29+ offering the persistence of standard disk-based databases, and is only
30+ limited to the size of the virtual address space.
31+ '';
32+ homepage = http://symas.com/mdb/;
33+ maintainers = with maintainers; [ jb55 ];
34+ license = licenses.openldap;
35+ platforms = platforms.all;
36+ };
37+}