~jhagborg/frc-systems-nix

Nix definition of the roboRIO platform
Fix typo in README.md
Add LICENSE, README, and an overlay

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~jhagborg/frc-systems-nix
read/write
git@git.sr.ht:~jhagborg/frc-systems-nix

You can also use your local clone with git send-email.

#Nix definition of roboRIO platform

This flake provides a definition of the roboRIO platform, for use in Nix. It also provides an overlay which adds the necessary compiler flags for building software on the roboRIO. Specifically, it adds -D__FRC_ROBORIO__=..., which is necessary for WPILib to build correctly.

#Example

The following example flake will cross-compile GNU Hello for the roboRIO:

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs";
    flake-utils.url = "github:numtide/flake-utils";
    frc-systems.url = "sourcehut:~jhagborg/frc-systems-nix";
  };

  outputs = { nixpkgs, flake-utils, frc-systems, ... }:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs {
          inherit system;
          crossSystem = frc-systems.lib.roborio;
          crossOverlays = [ frc-systems.overlays.roborio ];
        };
      in {
        defaultPackage = pkgs.hello;
      }
    );
}

#Contributing

Contributions welcome! See the Sourcehut project hub for how to join the discussion, report bugs, and submit patches.

#License

The Nix expressions provided here are licensed under the BSD 3-clause license.