Created
July 15, 2021 18:17
-
-
Save mogenson/e8ab6079e1f53aa66cdba1060b7ce0e4 to your computer and use it in GitHub Desktop.
Nix shell to build CircuitPython on MacOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/21.05.tar.gz") { } | |
, pkgs_x86_64 ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/refs/tags/21.05.tar.gz") { localSystem = "x86_64-darwin"; } | |
}: | |
with pkgs.python38Packages; | |
let | |
cascadetoml = buildPythonPackage rec { | |
pname = "cascadetoml"; | |
version = "0.3.0"; | |
src = fetchPypi { | |
inherit pname version; | |
sha256 = "1i2n54q80g1kn06a9y1bvi5gsl76mcazjqq93bmy9gpr6sqx13yy"; | |
}; | |
propagatedBuildInputs = [ parse tabulate tomlkit typer ]; | |
doCheck = false; | |
}; | |
python = pkgs.python38.withPackages ( | |
ps: [ cascadetoml jinja2 ] | |
); | |
in | |
pkgs.mkShell { | |
buildInputs = with pkgs; [ | |
gettext | |
git | |
libffi | |
pkgconfig | |
pkgs_x86_64.gcc-arm-embedded | |
python | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should be enough to build Cortex-M and Unix ports on x86_64 or aarch64 based Darwin systems.
eg: