Skip to content

Commit

Permalink
explicitly set macos frameworks in devenv.nix (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
ss2165 authored Jul 28, 2023
1 parent 05cebc5 commit 346fa9c
Showing 1 changed file with 8 additions and 4 deletions.
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

0 comments on commit 346fa9c

Please sign in to comment.