switch to fenix to manage rust toolchain in nix
This commit is contained in:
parent
728847157b
commit
f1cc0e65d4
2 changed files with 59 additions and 2 deletions
22
flake.nix
22
flake.nix
|
|
@ -1,12 +1,30 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
fenix,
|
||||
}:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
rustPkgs = fenix.packages.x86_64-linux.default;
|
||||
|
||||
rustPlatform = pkgs.makeRustPlatform {
|
||||
inherit (rustPkgs)
|
||||
cargo
|
||||
rustc
|
||||
;
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
pkg-config
|
||||
m4
|
||||
|
|
@ -29,7 +47,7 @@
|
|||
};
|
||||
|
||||
devShells.x86_64-linux.default = mkShell {
|
||||
packages = [
|
||||
packages = with rustPkgs; [
|
||||
cargo
|
||||
clippy
|
||||
rustc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue