mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-12 01:13:01 +02:00
feat: Use rocksdb fork
This commit is contained in:
parent
9f37686b99
commit
e9bc416b29
2 changed files with 49 additions and 16 deletions
20
flake.lock
generated
20
flake.lock
generated
|
@ -527,6 +527,23 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rocksdb": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1741308171,
|
||||
"narHash": "sha256-YdBvdQ75UJg5ffwNjxizpviCVwVDJnBkM8ZtGIduMgY=",
|
||||
"ref": "v9.11.1",
|
||||
"rev": "3ce04794bcfbbb0d2e6f81ae35fc4acf688b6986",
|
||||
"revCount": 13177,
|
||||
"type": "git",
|
||||
"url": "https://forgejo.ellis.link/continuwuation/rocksdb"
|
||||
},
|
||||
"original": {
|
||||
"ref": "v9.11.1",
|
||||
"type": "git",
|
||||
"url": "https://forgejo.ellis.link/continuwuation/rocksdb"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"attic": "attic",
|
||||
|
@ -536,7 +553,8 @@
|
|||
"flake-compat": "flake-compat_3",
|
||||
"flake-utils": "flake-utils",
|
||||
"nix-filter": "nix-filter",
|
||||
"nixpkgs": "nixpkgs_6"
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"rocksdb": "rocksdb"
|
||||
}
|
||||
},
|
||||
"rust-analyzer-src": {
|
||||
|
|
45
flake.nix
45
flake.nix
|
@ -15,6 +15,10 @@
|
|||
flake-utils.url = "github:numtide/flake-utils?ref=main";
|
||||
nix-filter.url = "github:numtide/nix-filter?ref=main";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixpkgs-unstable";
|
||||
rocksdb = {
|
||||
url = "git+https://forgejo.ellis.link/continuwuation/rocksdb?ref=v9.11.1";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
@ -50,11 +54,12 @@
|
|||
buildFlags = [ "library" ];
|
||||
};
|
||||
rocksdb = pkgs.rocksdb_9_10.overrideAttrs (oldAttrs: {
|
||||
# I'm sure there's a really good reason to use the fork, but it fails to build, so we use nixpkgs instead
|
||||
# src = inputs.rocksdb;
|
||||
version = "v9.11.1";
|
||||
src = inputs.rocksdb;
|
||||
|
||||
# We have this already at https://forgejo.ellis.link/continuwuation/rocksdb/commit/a935c0273e1ba44eacf88ce3685a9b9831486155
|
||||
# Unsetting this so we don't have to revert it and make this nix exclusive
|
||||
# patches = [ ];
|
||||
patches = [ ];
|
||||
|
||||
cmakeFlags =
|
||||
pkgs.lib.subtractLists [
|
||||
|
@ -88,19 +93,29 @@
|
|||
# We use rust-rocksdb via C interface and don't need C++ RTTI
|
||||
"-DUSE_RTTI=0"
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with pkgs; [
|
||||
bzip2
|
||||
lz4
|
||||
zstd
|
||||
];
|
||||
|
||||
# Has "tools" which we don't need or use
|
||||
outputs = [ "out" ];
|
||||
|
||||
# preInstall hooks has stuff for messing with ldb/sst_dump which we don't need or use
|
||||
preInstall = "";
|
||||
|
||||
#
|
||||
postPatch = ''
|
||||
# Fix gcc-13 build failures due to missing <cstdint> and
|
||||
# <system_error> includes, fixed upstyream sice 8.x
|
||||
sed -e '1i #include <cstdint>' -i db/compaction/compaction_iteration_stats.h
|
||||
sed -e '1i #include <cstdint>' -i table/block_based/data_block_hash_index.h
|
||||
sed -e '1i #include <cstdint>' -i util/string_util.h
|
||||
sed -e '1i #include <cstdint>' -i include/rocksdb/utilities/checkpoint.h
|
||||
'';
|
||||
});
|
||||
|
||||
propagatedBuildInputs = with pkgs; [
|
||||
bzip2
|
||||
lz4
|
||||
zstd
|
||||
];
|
||||
|
||||
# Has "tools" which we don't need or use
|
||||
outputs = [ "out" ];
|
||||
|
||||
# preInstall hooks has stuff for messing with ldb/sst_dump which we don't need or use
|
||||
preInstall = "";
|
||||
});
|
||||
|
||||
scopeHost = mkScope pkgsHost;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue