format flake, use rust-rocksdb fork
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
4d4c2cf5f8
commit
cd2f00e012
1 changed files with 66 additions and 59 deletions
23
flake.nix
23
flake.nix
|
@ -37,10 +37,16 @@
|
|||
let
|
||||
pkgsHost = nixpkgs.legacyPackages.${system};
|
||||
|
||||
rocksdb' = pkgs: pkgs.rocksdb.overrideAttrs (old:
|
||||
{
|
||||
version = "8.10.0";
|
||||
src = old.src.override {
|
||||
rocksdb' = pkgs:
|
||||
let
|
||||
version = "8.11.3";
|
||||
in
|
||||
pkgs.rocksdb.overrideAttrs (old: {
|
||||
inherit version;
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "facebook";
|
||||
repo = "rocksdb";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-KGsYDBc1fz/90YYNGwlZ0LUKXYsP1zyhP29TnRQwgjQ=";
|
||||
};
|
||||
});
|
||||
|
@ -75,17 +81,17 @@
|
|||
}
|
||||
// {
|
||||
CARGO_BUILD_RUSTFLAGS = let inherit (pkgs) lib stdenv; in
|
||||
lib.concatStringsSep " " ([]
|
||||
lib.concatStringsSep " " ([ ]
|
||||
++ lib.optionals
|
||||
# This disables PIE for static builds, which isn't great in terms
|
||||
# of security. Unfortunately, my hand is forced because nixpkgs'
|
||||
# `libstdc++.a` is built without `-fPIE`, which precludes us from
|
||||
# leaving PIE enabled.
|
||||
stdenv.hostPlatform.isStatic
|
||||
["-C" "relocation-model=static"]
|
||||
[ "-C" "relocation-model=static" ]
|
||||
++ lib.optionals
|
||||
(stdenv.buildPlatform.config != stdenv.hostPlatform.config)
|
||||
["-l" "c"]
|
||||
[ "-l" "c" ]
|
||||
++ lib.optionals
|
||||
# This check has to match the one [here][0]. We only need to set
|
||||
# these flags when using a different linker. Don't ask me why,
|
||||
|
@ -156,7 +162,8 @@
|
|||
HOST_CC = "${pkgs.pkgsBuildHost.stdenv.cc}/bin/cc";
|
||||
HOST_CXX = "${pkgs.pkgsBuildHost.stdenv.cc}/bin/c++";
|
||||
}
|
||||
));
|
||||
)
|
||||
);
|
||||
|
||||
package = pkgs: builder pkgs {
|
||||
src = nix-filter {
|
||||
|
|
Loading…
Add table
Reference in a new issue