Skip to content

Instantly share code, notes, and snippets.

@patrl
Last active September 10, 2018 20:17
Show Gist options
  • Save patrl/98729c1310f521972dd374410d2296f7 to your computer and use it in GitHub Desktop.
Save patrl/98729c1310f521972dd374410d2296f7 to your computer and use it in GitHub Desktop.
A nix environment for developing with dwarf-term-rs: https://github.com/Lokathor/dwarf-term-rs
# Latest Nightly
with import <nixos> {};
let src = fetchFromGitHub {
owner = "mozilla";
repo = "nixpkgs-mozilla";
rev = "136eacc0ceefa8fb44677799e5639e083606ee5d";
sha256 = "04bz093x3zjkzp7ba8mh876a1a34kp3jrys87m79gbln5qvcd2ir";
# date = 2018-09-06T17:09:51+02:00;
};
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.nightly.rust
# Add some extra dependencies from `pkgs`
pkgconfig
xorg.libX11
xorg.libXrandr
xorg.libXcursor
xorg.libxcb
xorg.xinput
xorg.libXi
xorg.libXinerama
xorg.libXft
xorg.libXxf86vm
libGLU_combined
];
LD_LIBRARY_PATH="${libGLU_combined}/lib";
# Set Environment Variables
RUST_BACKTRACE = 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment