forked from rust-lang/rustup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flake: Add nix flake and envrc for developers
This adds a flake.nix and direnv's envrc for developing rustup on a NixOS host. This is explicitly *NOT* for constructing rustup for NixOS users. Signed-off-by: Daniel Silverstone <[email protected]>
- Loading branch information
Showing
3 changed files
with
25 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 @@ | ||
use flake |
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
/home | ||
/local-rustup | ||
/snapcraft | ||
flake.lock |
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,23 @@ | ||
# This is a cheap nix flake for direnv use for developing | ||
# Rustup if you are running on NixOS. | ||
# | ||
# We deliberately don't commit a flake.lock because we only | ||
# provide this for developers, not as a way to have rustup | ||
# built for NixOS. | ||
|
||
{ | ||
inputs = { flake-utils.url = "github:numtide/flake-utils"; }; | ||
|
||
outputs = { self, nixpkgs, flake-utils }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let pkgs = nixpkgs.legacyPackages.${system}; | ||
in { | ||
devShell = pkgs.mkShell { | ||
buildInputs = with pkgs; [ | ||
stdenv | ||
openssl | ||
pkg-config | ||
]; | ||
}; | ||
}); | ||
} |