Skip to content

Instantly share code, notes, and snippets.

@ciiqr
Created September 25, 2022 23:57
Show Gist options
  • Save ciiqr/26a66d614955e7f51533fb5342efc421 to your computer and use it in GitHub Desktop.
Save ciiqr/26a66d614955e7f51533fb5342efc421 to your computer and use it in GitHub Desktop.
nix devshell node "canvas" dependencies for maco m1 (arm)

usage:

  • nix flake new -t "github:numtide/devshell" .
  • replace devshell.toml with version from this gist
[devshell]
packages = [
# node
"nodejs-18_x",
# node canvas deps
"pkg-config",
"cairo",
"cairo.dev",
"pango",
"pango.dev",
"glib.dev",
"harfbuzz",
"harfbuzz.dev",
"freetype",
"freetype.dev",
"libpng",
"libpng.dev",
"zlib",
"zlib.dev",
"libjpeg",
"giflib",
"librsvg",
"pixman",
]
[[env]]
name = "PKG_CONFIG_PATH"
eval = "$DEVSHELL_DIR/lib/pkgconfig"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment