From f6747a25deb18676bca21290850eebc7cb41163f Mon Sep 17 00:00:00 2001 From: Jakob Lechner Date: Fri, 7 Feb 2025 23:13:28 +0100 Subject: [PATCH] Add nix stuff --- .envrc | 1 + .gitignore | 1 + shell.nix | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1d953f4 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8361884 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.direnv/* diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..1c97ea2 --- /dev/null +++ b/shell.nix @@ -0,0 +1,9 @@ +{ pkgs ? import {} }: + pkgs.mkShell { + nativeBuildInputs = with pkgs.buildPackages; [ + python3.pkgs.pyserial + (writeShellScriptBin "flash-thb1" '' + python3 rdwr_phy62x2.py -p /dev/ttyUSB0 -b 115200 -e -r wh ./bin/BOOT_THB1_v*.hex + '') + ]; +}