Daniël de Kok 2018-11-02 00:13:43 +01:00 committed by xeji
parent 1a91d50ff2
commit 3f0fa6296a

View File

@ -2,21 +2,21 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "leveldb-${version}"; name = "leveldb-${version}";
version = "1.18"; version = "1.20";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "google"; owner = "google";
repo = "leveldb"; repo = "leveldb";
rev = "v${version}"; rev = "v${version}";
sha256 = "1bnsii47vbyqnbah42qgq6pbmmcg4k3fynjnw7whqfv6lpdgmb8d"; sha256 = "01kxga1hv4wp94agx5vl3ybxfw5klqrdsrb6p6ywvnjmjxm8322y";
}; };
buildPhase = '' buildPhase = ''
make all leveldbutil libmemenv.a make all
''; '';
installPhase = (stdenv.lib.optionalString stdenv.isDarwin '' installPhase = (stdenv.lib.optionalString stdenv.isDarwin ''
for file in *.dylib*; do for file in out-shared/*.dylib*; do
install_name_tool -id $out/lib/$file $file install_name_tool -id $out/lib/$file $file
done done
'') + # XXX consider removing above after transition to cmake in the next release '') + # XXX consider removing above after transition to cmake in the next release
@ -27,9 +27,10 @@ stdenv.mkDerivation rec {
mkdir -p $out/include/leveldb/helpers mkdir -p $out/include/leveldb/helpers
cp helpers/memenv/memenv.h $out/include/leveldb/helpers cp helpers/memenv/memenv.h $out/include/leveldb/helpers
cp lib* $out/lib cp out-shared/lib* $out/lib
cp out-static/lib* $out/lib
cp leveldbutil $out/bin cp out-static/leveldbutil $out/bin
"; ";
meta = with stdenv.lib; { meta = with stdenv.lib; {