Skip to content
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

explicitly set macos frameworks in devenv.nix #314

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions devenv.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:

{
# https://devenv.sh/basics/

# https://devenv.sh/packages/
# manually set rust packages rather than use devenv language support because
# it doesn't seem to be up to date for macos yet (link error)
packages = [ ];
# on macos frameworks have to be explicitly specified
# otherwise a linker error ocurs on rust packages
packages = lib.optionals pkgs.stdenv.isDarwin (with pkgs.darwin.apple_sdk; [
frameworks.CoreServices
frameworks.CoreFoundation
]);

# https://devenv.sh/scripts/
scripts.hello.exec = "echo Welcome to hugr dev shell!";
Expand All @@ -19,6 +22,7 @@
# https://devenv.sh/languages/
# https://devenv.sh/reference/options/#languagesrustversion
languages.rust = {
channel = "stable";
enable = true;
components = [ "rustc" "cargo" "clippy" "rustfmt" "rust-analyzer" ];
};
Expand Down