diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..4a4726a --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use_nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..a238076 --- /dev/null +++ b/shell.nix @@ -0,0 +1,39 @@ +let + moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz); + nixpkgs = import { 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"; + }