Skip to content

Commit

Permalink
feat: Add agent-rs binaries (dfinity#1630)
Browse files Browse the repository at this point in the history
This adds agent-rs package to nix, and icx and icx-proxy to nix-shell.
  • Loading branch information
ninegua authored May 13, 2021
1 parent 417c5c5 commit 4ae0715
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions dfx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ let
pkgs.mkCompositeShell {
name = "dfinity-sdk-rust-env";
nativeBuildInputs = [
pkgs.agent-rs # for icx and icx-proxy
pkgs.rls
# wabt-sys needs file in path, as well as cc (for cmake).
pkgs.file
Expand Down
7 changes: 7 additions & 0 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ let
in
{
motoko = import self.sources.motoko { inherit (self) system; };
agent-rs = self.naersk.buildPackage {
name = "agent-rs";
root = self.sources.agent-rs;
cargoBuildOptions = x: x ++ [ "-p" "icx" "-p" "icx-proxy" ];
cargoTestOptions = x: x ++ [ "-p" "icx" "-p" "icx-proxy" ];
buildInputs = [ self.openssl self.pkg-config ] ++ self.lib.optional self.stdenv.isDarwin pkgs.libiconv;
};
dfinity = (import self.sources.dfinity { inherit (self) system; }).dfinity.rs;
napalm = self.callPackage self.sources.napalm {
pkgs = self // { nodejs = self.nodejs-12_x; };
Expand Down
8 changes: 7 additions & 1 deletion nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
"url": "https://github.com/RustSec/advisory-db/archive/bd8a0f67004bbe3c65153820076d56d3ca5fb7f0.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"agent-rs": {
"branch": "ericswanson/build-on-rust-1.45.2-for-sdk-under-nix",
"repo": "https://github.com/dfinity/agent-rs",
"rev": "e6bf42ed697db37a252f019563c36160f72d8cd8",
"type": "git"
},
"bats-support": {
"branch": "v0.3.0",
"builtin": false,
Expand All @@ -28,7 +34,7 @@
"common": {
"branch": "master",
"repo": "ssh://[email protected]/dfinity-lab/common",
"rev": "ed5e16c4aa775ab21383b36c1b6d634ef15f087a",
"rev": "9960cc13ad2e8bcf1af5ea820fc50a2456ccc1db",
"type": "git"
},
"dfinity": {
Expand Down

0 comments on commit 4ae0715

Please sign in to comment.