Skip to content

Commit

Permalink
Merge pull request #1 from vexide/feat/nixos-support
Browse files Browse the repository at this point in the history
feat: add support and instructions for nixos
  • Loading branch information
doinkythederp authored Apr 11, 2024
2 parents 88dfeb5 + 0e9e755 commit 8d5c1bb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake .
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ Run the following terminal commands to set up your Mac for development.
cargo install --git "https://github.com/vexide/cargo-pros.git#feat/vexide-support"
```

## Getting Started (NixOS)

The Nix flake includes a devshell with every tool you need for building and uploading vexide projects.
You still need to run ``rustup component add llvm-tools-preview`` if you haven't already.

There is a `.envrc` file for Nix + Direnv users.

## Getting Started (Debian/Ubuntu Linux)

Run the following terminal commands to set up your PC for development on Debian or Ubuntu.
Expand Down
19 changes: 19 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
cargo-pros.url = "github:vexide/cargo-pros";
pros-cli-nix.url = "github:BattleCh1cken/pros-cli-nix";
};

outputs = { nixpkgs, flake-utils, cargo-pros, pros-cli-nix, ... }:
(flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
cargo-pros' = cargo-pros.packages.${system}.default;
pros-cli = pros-cli-nix.packages.${system}.default;
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [ cargo-pros' pros-cli ];
};
}));
}

0 comments on commit 8d5c1bb

Please sign in to comment.