Skip to content

Instantly share code, notes, and snippets.

@r17x
Created February 7, 2022 14:18
Show Gist options
  • Select an option

  • Save r17x/a8ba0b76c3e108ee7d9e149575511408 to your computer and use it in GitHub Desktop.

Select an option

Save r17x/a8ba0b76c3e108ee7d9e149575511408 to your computer and use it in GitHub Desktop.
Nix-Shell w/ rust

Rust Development w/ nix

Prerequisite

Step

  1. create project directory
  2. create .envrc
  3. create shell.nix
  4. Done

Thanks

# See docs/cross_compilation.md for details.
( import <nixpkgs> {
overlays = [ (import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz")) ];
}).callPackage (
{ mkShell, stdenv, rust-bin, pkg-config, openssl, qemu }:
mkShell {
nativeBuildInputs = [
rust-bin.stable.latest.minimal
pkg-config
];
buildInputs = [ openssl ];
}) {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment