Skip to content

Commit

Permalink
Pin to an older nixpkgs with a gcc-arm-embedded that builds
Browse files Browse the repository at this point in the history
To build with a newer gcc requires fixing `-Werror=array-bounds` issues in the bootloader.
  • Loading branch information
chrisandreae committed Sep 23, 2024
1 parent 3a3d13b commit bb68c75
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
4 changes: 4 additions & 0 deletions nix/pinned-nixpkgs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"url": "https://releases.nixos.org/nixpkgs/22.05-darwin/nixpkgs-darwin-22.05pre383202.058d97782ed/nixexprs.tar.xz",
"sha256": "0m00195y7l2b3mrzi26ljm32s24qp5paz15fqbd49iyfjzxv7xb8"
}
17 changes: 17 additions & 0 deletions nix/pinned-nixpkgs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ system ? builtins.currentSystem }:

let
pin = builtins.fromJSON (builtins.readFile ./pinned-nixpkgs.json);

nixpkgsSrc = builtins.fetchTarball {
inherit (pin) url sha256;
};
in

import nixpkgsSrc {
inherit system;
config = {
allowUnfree = true;
};
overlays = []; # prevent impure overlays
}
6 changes: 3 additions & 3 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
with (import <nixpkgs> {});
{ pkgs ? (import ./nix/pinned-nixpkgs.nix {}) }:

with pkgs;
stdenv.mkDerivation {
name = "env";
buildInputs = [
gcc-arm-embedded

(
python38.withPackages(ps: [
python3.withPackages(ps: [
ps.intelhex
(ps.callPackage ./nix/adafruit-nrfutil.nix {})
])
Expand Down

0 comments on commit bb68c75

Please sign in to comment.