2020-01-30 06:49:10 -05:00
|
|
|
with import <nixpkgs> {};
|
|
|
|
let
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mozilla";
|
|
|
|
repo = "nixpkgs-mozilla";
|
2020-11-04 13:34:21 -05:00
|
|
|
# commit from: 2019-07-15
|
|
|
|
rev = "8c007b60731c07dd7a052cce508de3bb1ae849b4";
|
|
|
|
sha256 = "sha256-RsNPnEKd7BcogwkqhaV5kI/HuNC4flH/OQCC/4W5y/8=";
|
2020-01-30 06:49:10 -05:00
|
|
|
};
|
2020-11-04 13:34:21 -05:00
|
|
|
rustOverlay = import "${src.out}/rust-overlay.nix" pkgs pkgs;
|
|
|
|
rustChannel = (rustOverlay.rustChannelOf { rustToolchain = ./rust-toolchain; });
|
2020-01-30 06:49:10 -05:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "rust-env";
|
|
|
|
buildInputs = [
|
2020-11-04 13:34:21 -05:00
|
|
|
rustChannel.rust
|
2020-01-30 06:49:10 -05:00
|
|
|
# latest.rustChannels.nightly.rust
|
|
|
|
# latest.rustChannels.stable.rust
|
|
|
|
|
|
|
|
clang
|
|
|
|
nettle
|
|
|
|
pkgconfig
|
2020-02-03 08:18:08 -05:00
|
|
|
|
|
|
|
gettext
|
|
|
|
transifex-client
|
2020-01-30 06:49:10 -05:00
|
|
|
];
|
|
|
|
|
|
|
|
# Set Environment Variables
|
|
|
|
RUST_BACKTRACE = 1;
|
|
|
|
|
|
|
|
# compilation of -sys packages requires manually setting this :(
|
|
|
|
shellHook = ''
|
|
|
|
export LIBCLANG_PATH="${pkgs.llvmPackages.libclang}/lib";
|
|
|
|
'';
|
|
|
|
}
|