chore: add nix shell configuration

This commit is contained in:
Paul Makles
2023-08-14 10:14:54 +01:00
parent bde432cb75
commit 3d0914ce52
2 changed files with 37 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
{
"editor.formatOnSave": true,
"rust-analyzer.checkOnSave.command": "clippy"
}
"editor.formatOnSave": true,
"rust-analyzer.checkOnSave.command": "clippy",
"nixEnvSelector.nixFile": "${workspaceRoot}/default.nix"
}

33
default.nix Normal file
View File

@@ -0,0 +1,33 @@
let
# Pinned nixpkgs, deterministic. Last updated: 11-08-2023.
pkgs = import (fetchTarball("https://github.com/NixOS/nixpkgs/archive/bb9707ef2ea4a5b749b362d5cf81ada3ded2c53f.tar.gz")) {};
# Rolling updates, not deterministic.
# pkgs = import (fetchTarball("channel:nixpkgs-unstable")) {};
in pkgs.mkShell {
name = "revoltEnv";
# LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
# pkgs.gcc-unwrapped
# pkgs.zlib
# pkgs.glib
# pkgs.libGL
# ];
buildInputs = [
# Tools
pkgs.git
# Database
# pkgs.mongodb
# Rust
pkgs.cargo
pkgs.rustc
pkgs.clippy
pkgs.pkgconfig
pkgs.openssl.dev
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
}