Merge pull request #145823 from prusnak/rocksdb_6_23
rocksdb: reintroduce rocksdb 6.23.3 as rocksdb_6_23
This commit is contained in:
commit
aa7981ebc4
3 changed files with 32 additions and 21 deletions
|
@ -3,10 +3,13 @@
|
|||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, llvmPackages
|
||||
, rocksdb
|
||||
, rocksdb_6_23
|
||||
, Security
|
||||
}:
|
||||
|
||||
let
|
||||
rocksdb = rocksdb_6_23;
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "electrs";
|
||||
version = "0.9.2";
|
||||
|
@ -24,12 +27,9 @@ rustPlatform.buildRustPackage rec {
|
|||
nativeBuildInputs = [ llvmPackages.clang ];
|
||||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
||||
|
||||
# temporarily disable dynamic linking, which broke with rocksdb update 6.23.3 -> 6.25.3
|
||||
# https://github.com/NixOS/nixpkgs/pull/143524#issuecomment-955053331
|
||||
#
|
||||
# link rocksdb dynamically
|
||||
# ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
|
||||
# ROCKSDB_LIB_DIR = "${rocksdb}/lib";
|
||||
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
|
||||
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
{ lib, stdenv
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, packr
|
||||
, pkg-config
|
||||
, bzip2
|
||||
, lz4
|
||||
, rocksdb
|
||||
, rocksdb_6_23
|
||||
, snappy
|
||||
, zeromq
|
||||
, zlib
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
let
|
||||
rocksdb = rocksdb_6_23;
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "blockbook";
|
||||
version = "0.3.4";
|
||||
commit = "eb4e10a";
|
||||
version = "0.3.6";
|
||||
commit = "5f8cf45";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "trezor";
|
||||
repo = "blockbook";
|
||||
rev = "v${version}";
|
||||
sha256 = "0da1kav5x2xcmwvdgfk1q70l1k0sqqj3njgx2xx885d40m6qbnrs";
|
||||
sha256 = "1jb195chy3kbspmv9vyg7llw6kgykkmvz3znd97mxf24f4q622jv";
|
||||
};
|
||||
|
||||
runVend = true;
|
||||
vendorSha256 = "0p7vyw61nwvmaz7gz2bdh9fi6wp62i2vnzw6iz2r8cims4sbz53b";
|
||||
vendorSha256 = "0d17qaqn33wi7lzw4hlym56d9v4qnmvs6plpm5jiby2g5yckq0mz";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
nativeBuildInputs = [ packr pkg-config ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ bzip2 lz4 rocksdb snappy zeromq zlib ];
|
||||
|
||||
|
@ -39,11 +39,14 @@ buildGoModule rec {
|
|||
"-X github.com/trezor/blockbook/common.buildDate=unknown"
|
||||
];
|
||||
|
||||
tags = [ "rocksdb_6_16" ];
|
||||
|
||||
preBuild = lib.optionalString stdenv.isDarwin ''
|
||||
ulimit -n 8192
|
||||
'' + ''
|
||||
export CGO_LDFLAGS="-L${stdenv.cc.cc.lib}/lib -lrocksdb -lz -lbz2 -lsnappy -llz4 -lm -lstdc++"
|
||||
packr clean && packr
|
||||
buildFlagsArray+=("-tags=${lib.concatStringsSep " " tags}")
|
||||
buildFlagsArray+=("-ldflags=${lib.concatStringsSep " " ldflags}")
|
||||
'';
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
@ -64,8 +67,5 @@ buildGoModule rec {
|
|||
license = licenses.agpl3;
|
||||
maintainers = with maintainers; [ mmahut _1000101 ];
|
||||
platforms = platforms.unix;
|
||||
# go dependency tecbot/gorocksdb requires rocksdb 5.x but nixpkgs has only rocksdb 6.x
|
||||
# issue in upstream can be tracked here: https://github.com/trezor/blockbook/issues/617
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -19323,6 +19323,17 @@ with pkgs;
|
|||
|
||||
rocksdb_lite = rocksdb.override { enableLite = true; };
|
||||
|
||||
rocksdb_6_23 = rocksdb.overrideAttrs (old: rec {
|
||||
pname = "rocksdb";
|
||||
version = "6.23.3";
|
||||
src = fetchFromGitHub {
|
||||
owner = "facebook";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-SsDqhjdCdtIGNlsMj5kfiuS3zSGwcxi4KV71d95h7yk=";
|
||||
};
|
||||
});
|
||||
|
||||
rotate-backups = callPackage ../tools/backup/rotate-backups { };
|
||||
|
||||
rote = callPackage ../development/libraries/rote { };
|
||||
|
|
Loading…
Reference in a new issue