diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..be81fed --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +eval "$(lorri direnv)" \ No newline at end of file diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..36f7cff --- /dev/null +++ b/shell.nix @@ -0,0 +1,32 @@ +with import {}; +let + src = fetchFromGitHub { + owner = "mozilla"; + repo = "nixpkgs-mozilla"; + # commit from: 2019-05-15 + rev = "c482bfd3dab1bde9590b03e712d73ced15385be4"; + sha256 = "18sxl0fxhbdnrfmkbmgxwsn12qy8dbv6ccb3imyyqbjqb76j8dpi"; + }; +in +with import "${src.out}/rust-overlay.nix" pkgs pkgs; +stdenv.mkDerivation { + name = "rust-env"; + buildInputs = [ + (rustChannelOf { rustToolchain = ./rust-toolchain; }).rust + # latest.rustChannels.nightly.rust + # latest.rustChannels.stable.rust + + clang + gettext + nettle + pkgconfig + ]; + + # Set Environment Variables + RUST_BACKTRACE = 1; + + # compilation of -sys packages requires manually setting this :( + shellHook = '' + export LIBCLANG_PATH="${pkgs.llvmPackages.libclang}/lib"; + ''; +}