-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(nix): Use crane to cache cargo dependencies (#121)
* Add crane * switch rust toolchain to come from fenix * touch buildscript before executing cargo build * add clippy and build checks * rename arrowstore build script * rename raft build script
- Loading branch information
1 parent
9994be0
commit 9fa25a8
Showing
9 changed files
with
145 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,35 @@ | ||
{ | ||
inputs, | ||
self, | ||
lib, | ||
... | ||
}: let | ||
inherit (inputs.gitignore.lib) gitignoreSource; | ||
in { | ||
flake.lib = { | ||
flake_source = gitignoreSource ../..; | ||
cargo_lock = ../../Cargo.lock; | ||
rust-stable = system: inputs.rust-overlay.packages.${system}.rust; | ||
rust-nightly = system: inputs.rust-overlay.packages.${system}.rust-nightly; | ||
|
||
otherNativeBuildInputs = pkgs: with pkgs; [pkgconfig openssl openssl.dev llvmPackages.bintools llvmPackages.libclang]; | ||
otherBuildInputs = pkgs: | ||
with pkgs; [ | ||
clang | ||
openssl | ||
protobuf | ||
]; | ||
|
||
# Filters for files to include in nix store | ||
filterProto = orig_path: type: | ||
let | ||
path = (toString orig_path); | ||
base = baseNameOf path; | ||
|
||
matchesSuffix = lib.any (suffix: lib.hasSuffix suffix base) [ | ||
# Include all proto files | ||
".proto" | ||
]; | ||
in | ||
type == "directory" || matchesSuffix; | ||
|
||
filterSrc = craneLib: orig_path: type: | ||
(self.lib.filterProto orig_path type) || (craneLib.filterCargoSources orig_path type); | ||
|
||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters