You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.4 KiB
53 lines
1.4 KiB
{ |
|
inputs.nixpkgs.url = "nixpkgs"; |
|
inputs.nixpkgs-unstable.url = "nixpkgs-unstable"; |
|
|
|
outputs = { self, nixpkgs, nixpkgs-unstable, ... }: |
|
let |
|
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ]; |
|
forAllSystems' = systems: f: nixpkgs.lib.genAttrs systems f; |
|
forAllSystems = forAllSystems' supportedSystems; |
|
in |
|
{ |
|
overlay = prev: final: |
|
{ |
|
xtensa-elf-binutils = prev.callPackage ./nix/xtensa-elf-binutils.nix {}; |
|
xtensa-elf-gcc = prev.callPackage ./nix/xtensa-elf-gcc.nix {}; |
|
}; |
|
defaultPackage = forAllSystems (system: |
|
let |
|
pkgs = import nixpkgs |
|
{ inherit system; |
|
overlays = [ self.overlay ]; |
|
}; |
|
in |
|
pkgs.xtensa-elf-gcc |
|
); |
|
|
|
packages = forAllSystems (system: |
|
import nixpkgs |
|
{ inherit system; |
|
overlays = [ self.overlay ]; |
|
} |
|
); |
|
|
|
devShell = forAllSystems (system: |
|
let |
|
pkgs = import nixpkgs |
|
{ inherit system; |
|
overlays = [ self.overlay ]; |
|
}; |
|
in |
|
pkgs.mkShell { |
|
buildInputs = with pkgs; [ |
|
xtensa-elf-gcc |
|
xtensa-elf-binutils |
|
(import nixpkgs-unstable { inherit system; }).esptool |
|
qemu |
|
meson |
|
ninja |
|
]; |
|
} |
|
); |
|
}; |
|
}
|
|
|