-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up a development shell with Nix.
Just for local development; no one's shipping anything with this thing.
- Loading branch information
1 parent
dc82a99
commit 467f48b
Showing
6 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
source_env_if_exists ./.envrc.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
use flake | ||
|
||
source_env ../.envrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: test Nix support | ||
|
||
on: push | ||
|
||
jobs: | ||
evaluate-nix-shell: | ||
name: Evaluate the Nix shell | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Nix ❄ | ||
uses: DeterminateSystems/nix-installer-action@v4 | ||
|
||
- name: Run the Magic Nix Cache 🔌 | ||
uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
|
||
- name: Evaluate the Nix shell | ||
run: nix develop -c "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
# Rust | ||
/target | ||
|
||
# direnv | ||
/.direnv |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
description = "ndc-sdk"; | ||
|
||
inputs = { | ||
flake-utils.url = github:numtide/flake-utils; | ||
nixpkgs.url = github:NixOS/nixpkgs/master; | ||
}; | ||
|
||
outputs = | ||
{ self | ||
, flake-utils | ||
, nixpkgs | ||
}: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = import nixpkgs { inherit system; }; | ||
in | ||
{ | ||
devShells.default = pkgs.mkShell { | ||
nativeBuildInputs = [ | ||
pkgs.cargo | ||
pkgs.cargo-edit | ||
pkgs.cargo-machete | ||
pkgs.clippy | ||
pkgs.rust-analyzer | ||
pkgs.rustPlatform.rustcSrc | ||
pkgs.rustc | ||
pkgs.rustfmt | ||
]; | ||
|
||
buildInputs = pkgs.lib.optionals pkgs.stdenv.isDarwin [ | ||
pkgs.darwin.apple_sdk.frameworks.Security | ||
pkgs.libiconv | ||
]; | ||
}; | ||
|
||
formatter = pkgs.nixpkgs-fmt; | ||
}); | ||
} |