Skip to content

Commit

Permalink
nix: add development environment configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
tilpner committed Nov 12, 2020
1 parent 80fcfae commit d35537e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
4 changes: 4 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
unstable_features = true
imports_layout = "mixed"
merge_imports = true
reorder_imports = true
36 changes: 36 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
with import <nixpkgs> {};

let
inherit (nur.repos.mozilla) rustChannelOf;

rustStable = rustChannelOf {
channel = "stable";
date = "2020-10-08";
};

rustNightly = rustChannelOf {
channel = "nightly";
date = "2020-10-08";
};

rust = rustStable.rust.override {
extensions = [ "rust-src" "llvm-tools-preview" ];
};

llvmPackages = llvmPackages_latest;
in (mkShell.override { inherit (llvmPackages) stdenv; }) {
RUSTFLAGS = "-C link-arg=-fuse-ld=lld";
QUICKCHECK_TESTS = 1;

nativeBuildInputs = [
rustNightly.rustfmt-preview
rust

cargo-outdated

pkgconfig
] ++ (with llvmPackages; [
libcxxClang
lldClang
]);
}

0 comments on commit d35537e

Please sign in to comment.