-
Notifications
You must be signed in to change notification settings - Fork 13
chore: add flake.nix
#113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
chore: add flake.nix
#113
Conversation
build with ``` nix build ``` run like ``` result/bin/ic-repl --help ```
basvandijk
left a comment
There was a problem hiding this 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"; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
build with
run like