nix: update shell.nix
This commit is contained in:
parent
9d5ec287a9
commit
3aa26c10f3
37
shell.nix
37
shell.nix
|
@ -1,21 +1,23 @@
|
||||||
with import <nixpkgs> {};
|
|
||||||
let
|
let
|
||||||
src = fetchFromGitHub {
|
oxalica_overlay = import (builtins.fetchTarball
|
||||||
owner = "mozilla";
|
"https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
|
||||||
repo = "nixpkgs-mozilla";
|
|
||||||
# commit from: 2019-07-15
|
pkgs = import <nixpkgs> { overlays = [ oxalica_overlay ]; };
|
||||||
rev = "8c007b60731c07dd7a052cce508de3bb1ae849b4";
|
rust_channel = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain;
|
||||||
sha256 = "sha256-RsNPnEKd7BcogwkqhaV5kI/HuNC4flH/OQCC/4W5y/8=";
|
#rust_channel = pkgs.rust-bin.stable.latest.default;
|
||||||
};
|
|
||||||
rustOverlay = import "${src.out}/rust-overlay.nix" pkgs pkgs;
|
|
||||||
rustChannel = (rustOverlay.rustChannelOf { rustToolchain = ./rust-toolchain; });
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
pkgs.mkShell {
|
||||||
name = "rust-env";
|
nativeBuildInputs = [
|
||||||
buildInputs = [
|
(rust_channel.override {
|
||||||
rustChannel.rust
|
extensions = [ "rust-src" "rust-std" "clippy" ];
|
||||||
# latest.rustChannels.nightly.rust
|
targets = [
|
||||||
# latest.rustChannels.stable.rust
|
"x86_64-unknown-linux-gnu"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
openssl
|
||||||
|
|
||||||
clang
|
clang
|
||||||
nettle
|
nettle
|
||||||
|
@ -30,6 +32,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
# compilation of -sys packages requires manually setting this :(
|
# compilation of -sys packages requires manually setting this :(
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export LIBCLANG_PATH="${pkgs.llvmPackages.libclang}/lib";
|
export LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue