mirror of
https://github.com/roc-lang/roc.git
synced 2024-08-17 06:41:22 +03:00
use rust toolchain file
This commit is contained in:
parent
3b7ef7b3ca
commit
ebf5b41ef3
@ -3,18 +3,16 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
zig.url = "github:roarkanize/zig-overlay";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, rust-overlay, zig, flake-utils }:
|
||||
outputs = { self, nixpkgs, rust-overlay, zig, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
unstable-pkgs = nixpkgs-unstable.legacyPackages.${system};
|
||||
llvmPkgs = pkgs.llvmPackages_12;
|
||||
|
||||
# get current working directory
|
||||
|
15
shell.nix
15
shell.nix
@ -2,8 +2,13 @@
|
||||
|
||||
let
|
||||
sources = import nix/sources.nix { };
|
||||
pkgs = import sources.nixpkgs { };
|
||||
unstable-pkgs = import sources.nixpkgs-unstable { };
|
||||
rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
|
||||
pkgs = import sources.nixpkgs {
|
||||
overlays = [ rust_overlay ];
|
||||
};
|
||||
rust_toolchain = (pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml);
|
||||
|
||||
#unstable-pkgs = import sources.nixpkgs-unstable { };
|
||||
|
||||
darwinInputs = with pkgs;
|
||||
lib.optionals stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [
|
||||
@ -65,9 +70,9 @@ let
|
||||
|
||||
# tools for development environment
|
||||
less
|
||||
]) ++ (with unstable-pkgs; [
|
||||
rustup
|
||||
]);
|
||||
]) ++ [
|
||||
rust_toolchain
|
||||
];
|
||||
|
||||
in pkgs.mkShell {
|
||||
buildInputs = inputs ++ darwinInputs ++ linuxInputs;
|
||||
|
Loading…
Reference in New Issue
Block a user