2017-12-10 04:40:07 +03:00
|
|
|
{ stdenv, fetchFromGitHub }:
|
2013-05-11 10:52:32 +04:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-11-15 08:54:12 +03:00
|
|
|
name = "leveldb-${version}";
|
|
|
|
version = "1.18";
|
2013-05-11 10:52:32 +04:00
|
|
|
|
2014-11-15 08:54:12 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "leveldb";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1bnsii47vbyqnbah42qgq6pbmmcg4k3fynjnw7whqfv6lpdgmb8d";
|
2013-05-11 10:52:32 +04:00
|
|
|
};
|
|
|
|
|
2014-11-15 08:54:12 +03:00
|
|
|
buildPhase = ''
|
2017-12-10 04:40:07 +03:00
|
|
|
make all leveldbutil libmemenv.a
|
2014-11-15 08:54:12 +03:00
|
|
|
'';
|
2013-05-11 10:52:32 +04:00
|
|
|
|
|
|
|
installPhase = "
|
2014-11-15 08:54:12 +03:00
|
|
|
mkdir -p $out/{bin,lib,include}
|
2017-12-10 04:40:07 +03:00
|
|
|
|
2014-11-15 08:54:12 +03:00
|
|
|
cp -r include $out
|
2015-07-03 23:58:33 +03:00
|
|
|
mkdir -p $out/include/leveldb/helpers
|
|
|
|
cp helpers/memenv/memenv.h $out/include/leveldb/helpers
|
2017-12-10 04:40:07 +03:00
|
|
|
|
|
|
|
cp lib* $out/lib
|
|
|
|
|
|
|
|
cp leveldbutil $out/bin
|
2013-05-11 10:52:32 +04:00
|
|
|
";
|
|
|
|
|
2014-11-15 08:54:12 +03:00
|
|
|
meta = with stdenv.lib; {
|
2017-10-27 02:44:19 +03:00
|
|
|
homepage = https://github.com/google/leveldb;
|
2013-10-06 13:49:53 +04:00
|
|
|
description = "Fast and lightweight key/value database library by Google";
|
2014-11-15 08:54:12 +03:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ wkennington ];
|
2013-05-11 10:52:32 +04:00
|
|
|
};
|
|
|
|
}
|