-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
78 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,87 @@ | ||
{ | ||
self, | ||
inputs, | ||
... | ||
{ self | ||
, inputs | ||
, ... | ||
}: { | ||
perSystem = { | ||
inputs', | ||
self', | ||
pkgs, | ||
system, | ||
... | ||
}: let | ||
isDarwin = pkgs.lib.hasSuffix "darwin" system; | ||
fenixPkgs = inputs'.fenix.packages; | ||
rustToolchain = with fenixPkgs; | ||
fromToolchainFile { | ||
file = ../../rust-toolchain.toml; | ||
sha256 = "VZZnlyP69+Y3crrLHQyJirqlHrTtGTsyiSnZB8jEvVo="; | ||
}; | ||
in { | ||
devShells = { | ||
default = pkgs.mkShell { | ||
# envs needed for rust toochain | ||
RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library"; | ||
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib"; | ||
LD_LIBRARY_PATH = "${rustToolchain}/lib"; | ||
perSystem = | ||
{ inputs' | ||
, self' | ||
, pkgs | ||
, system | ||
, ... | ||
}: | ||
let | ||
isDarwin = pkgs.lib.hasSuffix "darwin" system; | ||
fenixPkgs = inputs'.fenix.packages; | ||
rustToolchain = with fenixPkgs; | ||
fromToolchainFile { | ||
file = ../../rust-toolchain.toml; | ||
sha256 = "VZZnlyP69+Y3crrLHQyJirqlHrTtGTsyiSnZB8jEvVo="; | ||
}; | ||
in | ||
{ | ||
devShells = { | ||
default = pkgs.mkShell { | ||
# envs needed for rust toochain | ||
RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library"; | ||
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib"; | ||
LD_LIBRARY_PATH = "${rustToolchain}/lib"; | ||
|
||
# envs needed in order to construct some of the rust crates | ||
ROCKSDB_LIB_DIR = "${pkgs.rocksdb}/lib/"; | ||
OPENSSL_NO_VENDOR = 1; | ||
OPENSSL_DIR = "${pkgs.openssl.dev}"; | ||
OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include"; | ||
OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib"; | ||
packages = with pkgs; [ | ||
# core tooling to share across linux/macos | ||
coreutils | ||
pkg-config | ||
protobuf | ||
libiconv | ||
openssl | ||
gnumake | ||
# envs needed in order to construct some of the rust crates | ||
ROCKSDB_LIB_DIR = "${pkgs.rocksdb}/lib/"; | ||
OPENSSL_NO_VENDOR = 1; | ||
OPENSSL_DIR = "${pkgs.openssl.dev}"; | ||
OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include"; | ||
OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib"; | ||
packages = with pkgs; [ | ||
# core tooling to share across linux/macos | ||
coreutils | ||
pkg-config | ||
protobuf | ||
libiconv | ||
openssl | ||
gnumake | ||
|
||
# tools for e2e testing | ||
docker-compose | ||
python311 | ||
python311Packages.pip | ||
python311Packages.virtualenv | ||
sops | ||
# tools for e2e testing | ||
docker-compose | ||
python312 | ||
python312Packages.pip | ||
python312Packages.virtualenv | ||
sops | ||
|
||
# local development tools | ||
rustToolchain | ||
nodejs | ||
gawk | ||
cargo-edit | ||
cargo-license | ||
perl | ||
# local development tools | ||
rustToolchain | ||
nodejs | ||
gawk | ||
cargo-edit | ||
cargo-license | ||
perl | ||
|
||
# infra packages | ||
earthly | ||
awscli2 | ||
kubectl | ||
kubernetes-helm | ||
# infra packages | ||
earthly | ||
awscli2 | ||
kubectl | ||
kubernetes-helm | ||
|
||
# our local packages | ||
self'.packages.cardano-cli | ||
] | ||
++ ( | ||
if isDarwin | ||
then | ||
[ pkgs.darwin.apple_sdk.frameworks.SystemConfiguration ] | ||
else [ pkgs.clang ] | ||
); | ||
}; | ||
process-compose = pkgs.mkShell { | ||
inputsFrom = [ self'.devShells.default ]; | ||
packages = [ | ||
self'.packages.partnerchains-stack | ||
]; | ||
shellHook = '' | ||
echo "Partner Chains dependency stack devshell"; | ||
echo "useage: -n <network> to specify networks." | ||
''; | ||
# our local packages | ||
self'.packages.cardano-cli | ||
] | ||
++ ( | ||
if isDarwin | ||
then | ||
[ pkgs.darwin.apple_sdk.frameworks.SystemConfiguration ] | ||
else [ pkgs.clang ] | ||
); | ||
}; | ||
process-compose = pkgs.mkShell { | ||
inputsFrom = [ self'.devShells.default ]; | ||
packages = [ | ||
self'.packages.partnerchains-stack | ||
]; | ||
shellHook = '' | ||
echo "Partner Chains dependency stack devshell"; | ||
echo "useage: -n <network> to specify networks." | ||
''; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |