Artemis Tosini
a9a0d4aa30
Flake lock file updates: • Updated input 'artemist-packages': 'git+https://git.mildlyfunctional.gay/artemist/packages.git?ref=refs/heads/canon&rev=4dc6a6a61ae68c559f56f28c778ddb1ebc8c9f9e' (2024-06-06) → 'git+https://git.mildlyfunctional.gay/artemist/packages.git?ref=refs/heads/canon&rev=6d911ad15d938a2a6bbef536a4135235f6af9126' (2024-10-02) • Removed input 'artemist-packages/utils' • Updated input 'nixpkgs': 'github:nixos/nixpkgs/4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb' (2024-07-05) → 'github:nixos/nixpkgs/b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221' (2024-10-10) • Updated input 'rust-overlay': 'github:oxalica/rust-overlay/3eed08a074cd2000884a69d448d70da2843f7103' (2024-07-07) → 'github:oxalica/rust-overlay/ca93f28abd2147dd9997261dcaeacc5a30dba463' (2024-10-11) • Updated input 'utils': 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11) → 'github:numtide/flake-utils/c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a' (2024-09-17)
162 lines
4.7 KiB
Nix
162 lines
4.7 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
artemist-packages = {
|
|
url = "git+https://git.mildlyfunctional.gay/artemist/packages.git";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
utils,
|
|
artemist-packages,
|
|
rust-overlay,
|
|
}:
|
|
utils.lib.eachDefaultSystem (
|
|
system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [
|
|
artemist-packages.overlays.default
|
|
rust-overlay.overlays.default
|
|
];
|
|
};
|
|
in
|
|
rec {
|
|
devShells.zephyr = artemist-packages.devShells.${system}.zephyr.override {
|
|
toolchains = with pkgs.zephyrPackages.toolchains; [
|
|
arm-zephyr-eabi
|
|
riscv64-zephyr-elf
|
|
];
|
|
modules = with pkgs.zephyrPackages.modules; [
|
|
mbedtls
|
|
hal_rpi_pico
|
|
hal_atmel
|
|
cmsis
|
|
];
|
|
extraPackages = with pkgs; [ pyocd ];
|
|
};
|
|
devShells.zephyr-west = devShells.zephyr.override {
|
|
enableWest = true;
|
|
zephyrSrc = null;
|
|
modules = [ ];
|
|
};
|
|
devShells.rust-embedded =
|
|
let
|
|
rust = pkgs.rust-bin.stable.latest.default.override {
|
|
extensions = [
|
|
"rust-src"
|
|
"llvm-tools-preview"
|
|
"clippy"
|
|
];
|
|
# just use all of them, why not
|
|
targets = [
|
|
"thumbv6m-none-eabi"
|
|
"thumbv7m-none-eabi"
|
|
"thumbv7em-none-eabi"
|
|
"thumbv7em-none-eabihf"
|
|
"riscv32imac-unknown-none-elf"
|
|
];
|
|
};
|
|
rust-form = pkgs.rustPlatform.buildRustPackage rec {
|
|
pname = "form";
|
|
version = "0.10.0";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "djmcgill";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-cqoc2sTtVdhTAQ65oaJKo1+YMfQu7eHCe8zjRPDz9zg=";
|
|
};
|
|
cargoHash = "sha256-dhPp93AH4VlOVJWXMMUwv8b53vLPdBY3WyaXE4kcEm4=";
|
|
};
|
|
in
|
|
with pkgs;
|
|
mkShell {
|
|
packages = [
|
|
cargo-binutils
|
|
cargo-generate
|
|
gdb
|
|
openocd
|
|
probe-rs
|
|
rust
|
|
rust-form
|
|
svd2rust
|
|
svdtools
|
|
|
|
];
|
|
RUST_SRC_PATH = "${rust}/lib/rustlib/src/rust/library";
|
|
};
|
|
devShells.rust =
|
|
with pkgs;
|
|
mkShell {
|
|
nativeBuildInputs = [
|
|
rustc
|
|
cargo
|
|
rustfmt
|
|
clippy
|
|
];
|
|
RUST_SRC_PATH = "${rust.packages.stable.rustPlatform.rustLibSrc}";
|
|
};
|
|
devShells.avr =
|
|
with pkgs;
|
|
pkgsCross.avr.mkShell {
|
|
packages = [
|
|
avrdude
|
|
gnumake
|
|
];
|
|
|
|
LIBC = pkgsCross.avr.avrlibc;
|
|
};
|
|
devShells.emoji =
|
|
with pkgs;
|
|
mkShell {
|
|
packages = [
|
|
chromedriver
|
|
chromium
|
|
python3
|
|
python3Packages.aiohttp
|
|
python3Packages.black
|
|
python3Packages.ipython
|
|
python3Packages.trio
|
|
python3Packages.gql
|
|
(python3Packages.selenium.overrideAttrs (old: {
|
|
postInstall =
|
|
old.postInstall
|
|
+ ''
|
|
for ver in v85 v120 v121 v122; do
|
|
DEVTOOLS=../common/devtools/chromium/$ver
|
|
for proto in js browser; do
|
|
python3 ../common/devtools/convert_protocol_to_json.py \
|
|
$DEVTOOLS/"$proto"_protocol.pdl \
|
|
--map_binary_to_string=true \
|
|
$DEVTOOLS/"$proto"_protocol.json
|
|
done
|
|
mkdir -p $DST_PREFIX/common/devtools/$ver
|
|
python3 generate.py \
|
|
$DEVTOOLS/browser_protocol.json \
|
|
$DEVTOOLS/js_protocol.json \
|
|
$DST_PREFIX/common/devtools/$ver
|
|
done
|
|
'';
|
|
|
|
nativeBuildInputs = old.nativeBuildInputs ++ [ python3Packages.inflection ];
|
|
}))
|
|
];
|
|
|
|
CHROME = "${chromium}/bin/chromium";
|
|
};
|
|
devShells.typst = with pkgs; mkShell { packages = [ typst ]; };
|
|
formatter = pkgs.nixfmt-rfc-style;
|
|
}
|
|
);
|
|
|
|
}
|