Skip to content

Commit 0afddda

Browse files
authored
Merge pull request #2891 from kinnison/nix-support
flake: Add nix flake and envrc for developers
2 parents 59de864 + d10af1a commit 0afddda

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
/home
99
/local-rustup
1010
/snapcraft
11+
flake.lock

flake.nix

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This is a cheap nix flake for direnv use for developing
2+
# Rustup if you are running on NixOS.
3+
#
4+
# We deliberately don't commit a flake.lock because we only
5+
# provide this for developers, not as a way to have rustup
6+
# built for NixOS.
7+
8+
{
9+
inputs = { flake-utils.url = "github:numtide/flake-utils"; };
10+
11+
outputs = { self, nixpkgs, flake-utils }:
12+
flake-utils.lib.eachDefaultSystem (system:
13+
let pkgs = nixpkgs.legacyPackages.${system};
14+
in {
15+
devShell = pkgs.mkShell {
16+
buildInputs = with pkgs; [
17+
stdenv
18+
openssl
19+
pkg-config
20+
];
21+
};
22+
});
23+
}

0 commit comments

Comments
 (0)