-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathflake.nix
60 lines (58 loc) · 1.67 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
# This is a Nix Flake that defines development environment for this project.
#
# Using Nix is NOT required to develop this project.
#
# Nix provides a declariative way to define reproducible development environment
# and aims to remove the issue of "works on my machine".
#
# If you use Nix, you can install and activate all dependencies required to
# develop on this project with:
#
# $ nix develop
#
# If in addition you have `direnv` installed, you can create `.envrc` file with
# `use flake` content, so that development environment activates automatically
# when the project root directory is entered.
#
# More information:
# - Nix: https://nixos.org
# - Nix flakes: https://wiki.nixos.org/wiki/Flakes
# - Direnv: https://direnv.net
description = "The New Nushell Parser";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
nixpkgs,
rust-overlay,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
in
{
devShells.default = pkgs.mkShell {
nativeBuildInputs = [
(rustToolchain.override {
extensions = [
"rust-src"
"rust-analyzer"
];
})
];
};
}
);
}