-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathflake.nix
More file actions
26 lines (24 loc) · 790 Bytes
/
flake.nix
File metadata and controls
26 lines (24 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
description = "rust-gpu";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ (import rust-overlay) ];
config.allowUnfree = true;
};
rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
in
{
devShells = {
default = pkgs.callPackage ./shell.nix { inherit rustToolchain; };
android = pkgs.callPackage ./android.nix { inherit rustToolchain; };
};
});
}