Add nixos dev config

This commit is contained in:
Kevin Hamacher 2020-02-20 19:57:03 +01:00
parent 76059f1e85
commit 3b28268279
2 changed files with 40 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use_nix

39
shell.nix Normal file
View File

@ -0,0 +1,39 @@
let
moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
nixpkgs = import <nixpkgs> { overlays = [ moz_overlay ]; };
rustNightlyChannelClippy = (nixpkgs.rustChannelOf { date = "2020-01-29"; channel = "nightly"; }).rust.override {
extensions = [
"rust-src"
"rls-preview"
"rustfmt-preview"
];
};
rustNightlyChannel = nixpkgs.latest.rustChannels.nightly.rust.override {
extensions = [
"rust-src"
"rls-preview"
"rustfmt-preview"
];
};
rustStableChannel = nixpkgs.latest.rustChannels.stable.rust.override {
extensions = [
"rust-src"
"rls-preview"
"clippy-preview"
"rustfmt-preview"
];
};
in
with nixpkgs;
stdenv.mkDerivation {
name = "moz_overlay_shell";
buildInputs = [
rustNightlyChannelClippy
rls
rustup
pkg-config
SDL2
pulseaudio
];
TELOXIDE_TOKEN = "916718418:AAFFtn9WmqipuKCvwiXZ2cEIA_IuNqlO94I";
}