Skip to content

Commit

Permalink
add nrf5 sdk to flake
Browse files Browse the repository at this point in the history
  • Loading branch information
StarGate01 committed Jun 24, 2022
1 parent db17be5 commit 2d0f716
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
17 changes: 17 additions & 0 deletions flake.lock

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

10 changes: 8 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
nixpkgs-fontconv.url = "github:jvanbruegge/nixpkgs/lv_font_conv";
nixpkgs-pyanrfutil.url = "github:StarGate01/nixpkgs/pyanrfutil-fix";
nixpkgs-nrf.url = "github:StarGate01/nixpkgs/nrf-command-line-tools";
nixpkgs-nrfsdk.url = "github:StarGate01/nixpkgs/nrf-sdk";
nixpkgs-newt.url = "github:StarGate01/nixpkgs/mynewt-newt";
};

outputs = { self, nixpkgs, nixpkgs-fontconv, nixpkgs-pyanrfutil, nixpkgs-nrf, nixpkgs-newt }:
outputs = { self, nixpkgs, nixpkgs-fontconv, nixpkgs-pyanrfutil, nixpkgs-nrf, nixpkgs-newt, nixpkgs-nrfsdk }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
pkgs-fontconv = nixpkgs-fontconv.legacyPackages.x86_64-linux;
Expand All @@ -17,14 +18,18 @@
config.allowUnfree = true;
config.segger-jlink.acceptLicense = true;
};
pkgs-nrfsdk = import nixpkgs-nrfsdk {
system = "x86_64-linux";
config.allowUnfree = true;
};
pkgs-newt = nixpkgs-newt.legacyPackages.x86_64-linux;
in
{
devShell.x86_64-linux =
pkgs.mkShell {
shellHook = ''
export ARM_NONE_EABI_TOOLCHAIN_PATH="${pkgs.gcc-arm-embedded}"
export NRF5_SDK_PATH=~/Documents/nRF5_SDK_17.1.0
export NRF5_SDK_PATH="${pkgs-nrfsdk.nrf5-sdk}/share/nRF5_SDK"
'';

buildInputs = with pkgs; [
Expand All @@ -36,6 +41,7 @@
pkgs-nrf.segger-jlink
pkgs-nrf.nrf-command-line-tools
pkgs-newt.mynewt-newt
pkgs-nrfsdk.nrf5-sdk
(python3.withPackages (ps: with ps; [
cbor
click
Expand Down

0 comments on commit 2d0f716

Please sign in to comment.