Files
moslab-code/nix/flake.nix
vreusch 34e39dc2b6 add nix flake for development shell
It does not support cross compilation but requires x86_64-linux.
2025-09-12 15:56:03 +02:00

36 lines
826 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
outputs =
{ self, nixpkgs }:
let
shell =
{ pkgs }:
pkgs.mkShell {
packages = with pkgs; [
ncurses
dialog
perl
bashInteractive
flex
bison
buildPackages.qemu
];
shellHook = ''
# Do not attempt cross compilation.
export CROSS_COMPILE=
# These are set by the compilers shellHook but mk refuses to work when these are set.
unset CC CPP CXX AR AS LD
'';
};
lib = import "${nixpkgs}/lib";
forAll = list: f: lib.genAttrs list f;
in
{
devShells = forAll [ "x86_64-linux" ] (system: {
default = shell {
pkgs = nixpkgs.legacyPackages.${system};
};
});
};
}