I have this as default.nix, then use a nix-env in which i run cargo build ``` let moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz); nixpkgs = import { overlays = [ moz_overlay ]; }; ruststable = (nixpkgs.latest.rustChannels.stable.rust.override { extensions = [ "rust-src" "rls-preview" "rust-analysis" "rustfmt-preview" ];}); in with nixpkgs; stdenv.mkDerivation { name = "rust"; buildInputs = [ openssl pkg-config nasm rustup ruststable cmake zlib glib glibc libnice llvmPackages.libclang ]; shellHook = '' export OPENSSL_DIR="${openssl.dev}" export OPENSSL_LIB_DIR="${openssl.out}/lib" export LIBCLANG_PATH="${llvmPackages.libclang}/lib" export LD_LIBRARY_PATH="${libnice.dev}/include" ''; } ```