-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* nix flake build * set toolchain to 1.67.0 * Test Rust install on CI * Another test * Fix CI * Fix CI --------- Co-authored-by: Samuel Burnham <[email protected]>
- Loading branch information
1 parent
a246de8
commit 00dbd07
Showing
6 changed files
with
163 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
naersk = { | ||
url = "github:nix-community/naersk"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
fenix = { | ||
url = "github:nix-community/fenix"; | ||
inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils, naersk, fenix }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = (import nixpkgs) { | ||
inherit system; | ||
}; | ||
|
||
toolchain = with fenix.packages.${system}; fromToolchainFile { | ||
file = ./rust-toolchain.toml; # alternatively, dir = ./.; | ||
sha256 = "sha256-riZUc+R9V35c/9e8KJUE+8pzpXyl0lRXt3ZkKlxoY0g="; | ||
}; | ||
|
||
in rec { | ||
defaultPackage = (naersk.lib.${system}.override { | ||
# For `nix build` & `nix run`: | ||
cargo = toolchain; | ||
rustc = toolchain; | ||
}).buildPackage { | ||
src = ./.; | ||
}; | ||
|
||
# For `nix develop` or `direnv allow`: | ||
devShell = pkgs.mkShell { | ||
buildInputs = with pkgs; [ | ||
ocl-icd | ||
toolchain | ||
]; | ||
}; | ||
} | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[toolchain] | ||
channel = "1.67.0" | ||
targets = [ "aarch64-unknown-linux-gnu", "x86_64-unknown-linux-gnu", "x86_64-apple-darwin", "wasm32-unknown-unknown" ] | ||
components = [ "rustc", "cargo", "clippy", "rustfmt", "rust-src", | ||
"rust-analysis", "rust-analyzer" ] | ||
profile = "default" | ||
|