Skip to content

Commit

Permalink
nix flake build with all features
Browse files Browse the repository at this point in the history
  • Loading branch information
RCasatta committed Apr 9, 2024
1 parent 5a17089 commit e9cf88e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.idea/
.vscode/
result
.direnv
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ env_logger = "0.10"
bitcoin_slices = { version = "0.6.2", features = ["sha2", "bitcoin"] }

rand = { version = "0.8.4", optional = true }
rocksdb = { version = "0.18.0", optional = true, default-features = false }
rocksdb = { version = "0.21.0", optional = true, default-features = false }

# only for verify example
bitcoinconsensus = { version = "0.19.2-0.4.1", optional = true }
Expand Down
15 changes: 8 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,21 @@
# link rocksdb dynamically
ROCKSDB_INCLUDE_DIR = "${pkgs.rocksdb}/include";
ROCKSDB_LIB_DIR = "${pkgs.rocksdb}/lib";

cargoExtraArgs = "--all-features";
};
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
bin = craneLib.buildPackage (commonArgs // {
inherit cargoArtifacts ;
inherit cargoArtifacts;
});
in
with pkgs;
{
packages =
{
inherit bin;
default = bin;
blocks_iterator = bin;
};
packages = {
inherit bin;
default = bin;
blocks_iterator = bin;
};
devShells.default = mkShell {
inputsFrom = [ bin ];

Expand Down

0 comments on commit e9cf88e

Please sign in to comment.