aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..aedb381
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,35 @@
+{
+ 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 rec {
+ buildInputs = with pkgs; [
+ (rust-bin.selectLatestNightlyWith (toolchain: toolchain.default))
+ rust-analyzer
+ cargo-deny
+ cargo-release
+ ];
+
+ LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
+ };
+ });
+}