-
-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Nix development environment for the Nix users out there (#9)
This PR adds a Nix development environment that will allow Nix users to easily build and work on valence without having to write their own. If using flakes you can get into the development shell using `nix develop`, otherwise you can use `nix-shell`
- Loading branch information
1 parent
7cd3f5b
commit 2775646
Showing
3 changed files
with
151 additions
and
0 deletions.
There are no files selected for viewing
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,31 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/master"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
rust-overlay.url = "github:oxalica/rust-overlay"; | ||
flake-compat = { | ||
url = "github:edolstra/flake-compat"; | ||
flake = false; | ||
}; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils, rust-overlay, ... }: | ||
flake-utils.lib.eachSystem | ||
[ "x86_64-linux" ] | ||
(system: | ||
let | ||
overlays = [ (import rust-overlay) ]; | ||
pkgs = import nixpkgs { | ||
inherit system overlays; | ||
}; | ||
in | ||
rec | ||
{ | ||
devShell = pkgs.mkShell { | ||
buildInputs = with pkgs; [ | ||
(rust-bin.selectLatestNightlyWith (toolchain: toolchain.default)) | ||
rust-analyzer | ||
]; | ||
}; | ||
}); | ||
} |
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,9 @@ | ||
(import ( | ||
let | ||
lock = builtins.fromJSON (builtins.readFile ./flake.lock); | ||
in fetchTarball { | ||
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; | ||
sha256 = lock.nodes.flake-compat.locked.narHash; } | ||
) { | ||
src = ./.; | ||
}).shellNix |