Skip to content

Commit

Permalink
flake: Add nix flake and envrc for developers
Browse files Browse the repository at this point in the history
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
kinnison committed Nov 6, 2021
1 parent 59de864 commit d10af1a
Show file tree
Hide file tree
Showing 3 changed files with 25 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/home
/local-rustup
/snapcraft
flake.lock
23 changes: 23 additions & 0 deletions flake.nix
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
];
};
});
}

0 comments on commit d10af1a

Please sign in to comment.