1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-18 10:56:53 +00:00
nixpkgs/pkgs/development/libraries/leveldb/default.nix

37 lines
977 B
Nix
Raw Normal View History

2014-11-15 05:54:12 +00:00
{ stdenv, fetchFromGitHub, sqlite, kyotocabinet }:
2013-05-11 07:52:32 +01:00
stdenv.mkDerivation rec {
2014-11-15 05:54:12 +00:00
name = "leveldb-${version}";
version = "1.18";
2013-05-11 07:52:32 +01:00
2014-11-15 05:54:12 +00:00
src = fetchFromGitHub {
owner = "google";
repo = "leveldb";
rev = "v${version}";
sha256 = "1bnsii47vbyqnbah42qgq6pbmmcg4k3fynjnw7whqfv6lpdgmb8d";
2013-05-11 07:52:32 +01:00
};
2014-11-15 05:54:12 +00:00
buildInputs = [ sqlite kyotocabinet ];
buildPhase = ''
make all db_bench{,_sqlite3,_tree_db} leveldbutil libmemenv.a
2014-11-15 05:54:12 +00:00
'';
2013-05-11 07:52:32 +01:00
installPhase = "
2014-11-15 05:54:12 +00:00
mkdir -p $out/{bin,lib,include}
cp -r include $out
cp lib* $out/lib
cp db_bench{,_sqlite3,_tree_db} leveldbutil $out/bin
mkdir -p $out/include/leveldb/helpers
cp helpers/memenv/memenv.h $out/include/leveldb/helpers
2013-05-11 07:52:32 +01:00
";
2014-11-15 05:54:12 +00:00
meta = with stdenv.lib; {
2013-05-11 07:52:32 +01:00
homepage = "https://code.google.com/p/leveldb/";
description = "Fast and lightweight key/value database library by Google";
2014-11-15 05:54:12 +00:00
license = licenses.bsd3;
platforms = platforms.all;
maintainers = with maintainers; [ wkennington ];
2013-05-11 07:52:32 +01:00
};
}