Skip to content

Commit

Permalink
Merge pull request #59 from argonarch/main
Browse files Browse the repository at this point in the history
add platformio framework and add jupyter
  • Loading branch information
lucperkins authored Sep 12, 2024
2 parents 42960d4 + c5c491c commit 84f2c6e
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 0 deletions.
1 change: 1 addition & 0 deletions jupyter/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
25 changes: 25 additions & 0 deletions jupyter/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions jupyter/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
description = "A Nix-flake-based Python development environment";

inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";

outputs = {
self,
nixpkgs,
}: let
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
forEachSupportedSystem = f:
nixpkgs.lib.genAttrs supportedSystems (system:
f {
pkgs = import nixpkgs {inherit system;};
});
in {
devShells = forEachSupportedSystem ({pkgs}: {
default = pkgs.mkShell {
venvDir = ".venv";
packages = with pkgs;
[python311]
++ (with pkgs.python311Packages; [
pip
venvShellHook
ipykernel
])
++ (with pkgs; [poetry]);
};
});
};
}
14 changes: 14 additions & 0 deletions jupyter/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tool.poetry]
name = "sample-project"
version = "0.1.0"
description = ""
authors = ["user <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
1 change: 1 addition & 0 deletions platformio/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
25 changes: 25 additions & 0 deletions platformio/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions platformio/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
description = "A Nix-flake-based C/C++ development environment";

inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";

outputs = {
self,
nixpkgs,
}: let
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
forEachSupportedSystem = f:
nixpkgs.lib.genAttrs supportedSystems (system:
f {
pkgs = import nixpkgs {inherit system;};
});
in {
devShells = forEachSupportedSystem ({pkgs}: {
default = pkgs.mkShell {
shellHook = ''
export PLATFORMIO_CORE_DIR=$PWD/.platformio
'';
buildInputs = with pkgs; [
platformio
];
packages = with pkgs;
[
clang-tools
cmake
codespell
conan
cppcheck
doxygen
gtest
lcov
vcpkg
vcpkg-tool
]
++ (
if system == "aarch64-darwin"
then []
else [gdb]
);
};
});
};
}

0 comments on commit 84f2c6e

Please sign in to comment.