commit 09233e1e9914bd6de0a147985c82412969d31a17 Author: Daniel Olsen Date: Fri Jan 1 19:04:22 2021 +0100 init 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/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..bae83bd --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "Mercury" +version = "0.1.0" +authors = ["Daniel Olsen "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..8b349a6 --- /dev/null +++ b/shell.nix @@ -0,0 +1,27 @@ +let + moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz); + nixpkgs = import { overlays = [ moz_overlay ]; }; + rustNightlyChannel = (nixpkgs.rustChannelOf { date = "2020-03-19"; channel = "nightly"; }).rust.override { + extensions = [ + "rust-src" + "rls-preview" + "clippy-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 = [ + rustStableChannel + ]; + } diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}