Skip to content

Conversation

@ggreif
Copy link
Contributor

@ggreif ggreif commented May 15, 2025

build with

nix build

run like

result/bin/ic-repl --help

build with
```
nix build
```
run like
```
result/bin/ic-repl --help
```
@ggreif ggreif requested a review from a team as a code owner May 15, 2025 07:40
@ggreif ggreif requested a review from basvandijk May 15, 2025 07:40
Copy link

@basvandijk basvandijk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

nixpkgs,
rust-overlay,
}: let
system = "aarch64-darwin";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also consider using flake-utils like we do in motoko to support all common systems.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, gonna cross-study. I am at present just copying the ggreif/sdk flake recipe!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't get nix develop working yet! Any idea what I am getting wrong?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You correctly added a devShells.${system}.default so that''s good. What error are you getting?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also seems you're using pkgs.mkShell correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ nix develop
error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:37:12:
           36|
           37|   strict = derivationStrict drvAttrs;
             |            ^
           38|

       … while evaluating derivation 'nix-shell'
         whose name attribute is located at /nix/store/x9wnkly3k1gkq580m90jjn32q9f05q2v-source/pkgs/stdenv/generic/make-derivation.nix:439:13

       … while evaluating attribute '__impureHostDeps' of derivation 'nix-shell'
         at /nix/store/x9wnkly3k1gkq580m90jjn32q9f05q2v-source/pkgs/stdenv/generic/make-derivation.nix:579:15:
          578|               );
          579|               __impureHostDeps =
             |               ^
          580|                 computedImpureHostDeps

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: opening file '/nix/store/jwjajnviyim6mzpsbdwin496gv88x04b-source/rust-toolchain.toml': No such file or directory

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this dev-dependency needs to be declared?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It means you didn't add rust-toolchain.toml to git.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there is no such file. Maybe later. Kind-of negates devShell, but no biggie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants