forked from Skynet/discord-bot
feat: lock down to using the specific rust version
This commit is contained in:
parent
76cddde36d
commit
421d425f5d
1 changed files with 10 additions and 1 deletions
11
flake.nix
11
flake.nix
|
@ -20,6 +20,7 @@
|
|||
}:
|
||||
utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
overrides = (builtins.fromTOML (builtins.readFile ./rust-toolchain.toml));
|
||||
pkgs = (import nixpkgs) {inherit system;};
|
||||
naersk' = pkgs.callPackage naersk {};
|
||||
package_name = "skynet_discord_bot";
|
||||
|
@ -62,7 +63,15 @@
|
|||
|
||||
# `nix develop`
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [rustc cargo pkg-config openssl rustfmt];
|
||||
nativeBuildInputs = with pkgs; [rustup rustPlatform.bindgenHook pkg-config openssl];
|
||||
# libraries here
|
||||
buildInputs = [ ];
|
||||
RUSTC_VERSION = overrides.toolchain.channel;
|
||||
# https://github.com/rust-lang/rust-bindgen#environment-variables
|
||||
shellHook = ''
|
||||
export PATH="''${CARGO_HOME:-~/.cargo}/bin":"$PATH"
|
||||
export PATH="''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-${pkgs.stdenv.hostPlatform.rust.rustcTarget}/bin":"$PATH"
|
||||
'';
|
||||
};
|
||||
|
||||
nixosModule = {
|
||||
|
|
Loading…
Add table
Reference in a new issue