mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
rocksdb: use finalAttrs
This commit is contained in:
parent
bcc0da2607
commit
1095d8934b
@ -16,14 +16,14 @@
|
||||
, sse42Support ? stdenv.hostPlatform.sse4_2Support
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rocksdb";
|
||||
version = "8.3.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "facebook";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
repo = finalAttrs.pname;
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-mfIRQ8nkUbZ3Bugy3NAvOhcfzFY84J2kBUIUBcQ2/Qg=";
|
||||
};
|
||||
|
||||
@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $tools/bin
|
||||
cp tools/{ldb,sst_dump}${stdenv.hostPlatform.extensions.executable} $tools/bin/
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
ls -1 $tools/bin/* | xargs -I{} install_name_tool -change "@rpath/librocksdb.${lib.versions.major version}.dylib" $out/lib/librocksdb.dylib {}
|
||||
ls -1 $tools/bin/* | xargs -I{} install_name_tool -change "@rpath/librocksdb.${lib.versions.major finalAttrs.version}.dylib" $out/lib/librocksdb.dylib {}
|
||||
'' + lib.optionalString (stdenv.isLinux && enableShared) ''
|
||||
ls -1 $tools/bin/* | xargs -I{} patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib {}
|
||||
'';
|
||||
@ -93,9 +93,9 @@ stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
homepage = "https://rocksdb.org";
|
||||
description = "A library that provides an embeddable, persistent key-value store for fast storage";
|
||||
changelog = "https://github.com/facebook/rocksdb/raw/v${version}/HISTORY.md";
|
||||
changelog = "https://github.com/facebook/rocksdb/raw/v${finalAttrs.version}/HISTORY.md";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ adev magenbluten ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user