3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/leveldb/default.nix

43 lines
1 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub }:
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
buildPhase = ''
make all leveldbutil libmemenv.a
2014-11-15 05:54:12 +00:00
'';
2013-05-11 07:52:32 +01:00
2018-04-05 18:58:07 +01:00
installPhase = (stdenv.lib.optionalString stdenv.isDarwin ''
for file in *.dylib*; do
install_name_tool -id $out/lib/$file $file
done
'') + # XXX consider removing above after transition to cmake in the next release
"
2014-11-15 05:54:12 +00:00
mkdir -p $out/{bin,lib,include}
2014-11-15 05:54:12 +00:00
cp -r include $out
mkdir -p $out/include/leveldb/helpers
cp helpers/memenv/memenv.h $out/include/leveldb/helpers
cp lib* $out/lib
cp leveldbutil $out/bin
2013-05-11 07:52:32 +01:00
";
2014-11-15 05:54:12 +00:00
meta = with stdenv.lib; {
homepage = https://github.com/google/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
};
}