Created
September 12, 2018 20:18
-
-
Save patrl/d72f7aca39f3d423e42c10d9dfd82c47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
let src = fetchFromGitHub { | |
owner = "mozilla"; | |
repo = "nixpkgs-mozilla"; | |
# commit from: 2018-03-27 | |
rev = "136eacc0ceefa8fb44677799e5639e083606ee5d"; | |
sha256 = "04bz093x3zjkzp7ba8mh876a1a34kp3jrys87m79gbln5qvcd2ir"; | |
# date = 2018-09-06T17:09:51+02:00; | |
}; | |
myrust = (latest.rustChannels.stable.rust.override { extensions = [ "rust-src" ]; }); | |
in | |
with import "${src.out}/rust-overlay.nix" pkgs pkgs; | |
stdenv.mkDerivation { | |
name = "rust-env"; | |
buildInputs = [ | |
# Note: to use use stable, just replace `nightly` with `stable` | |
# latest.rustChannels.stable.rust | |
myrust | |
pkgconfig | |
# Add some extra dependencies from `pkgs` | |
SDL2 | |
alsaLib | |
]; | |
RUST_SRC_PATH= "${myrust}/lib/rustlib/src/rust/src"; | |
# Set Environment Variables | |
RUST_BACKTRACE = 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment