Skip to content

Instantly share code, notes, and snippets.

@soasme
Created June 27, 2023 23:12
Show Gist options
  • Save soasme/0c5aa071c0ec82a1eac63bea98394a51 to your computer and use it in GitHub Desktop.
Save soasme/0c5aa071c0ec82a1eac63bea98394a51 to your computer and use it in GitHub Desktop.
{ pkgs ? import <nixpkgs> {}}:
with pkgs; mkShell {
# Include C++ headers for regular clang calls:
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [
"-I${lib.getDev libcxx}/include/c++/v1"
];
nativeBuildInputs = [
...
] ++ lib.optionals stdenv.isDarwin [
# Add any Apple framework libraries your package needs, e.g.
darwin.apple_sdk.frameworks.IOKit
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment