flake: use new devshell format (#20)

Use devShells.${system}.default instead of devShell, since the latter is
deprecated
This commit is contained in:
Noa Aarts 2024-10-21 00:06:17 +02:00 committed by GitHub
commit 64961d11e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,13 +1,13 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/master";
fenix = { fenix = {
url = "github:nix-community/fenix"; url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = { self, fenix, nixpkgs, ... }: outputs = { fenix, nixpkgs, ... }:
let let
allSystems = [ allSystems = [
"x86_64-linux" # 64-bit Intel/AMD Linux "x86_64-linux" # 64-bit Intel/AMD Linux
@ -23,7 +23,7 @@
in in
{ {
packages = forAllSystems packages = forAllSystems
({ system, pkgs, fpkgs }: ({ pkgs, fpkgs, ... }:
let let
toolchain = fpkgs.minimal.toolchain; toolchain = fpkgs.minimal.toolchain;
in in
@ -37,19 +37,24 @@
src = pkgs.lib.cleanSource ./.; src = pkgs.lib.cleanSource ./.;
}; };
}); });
devShell = forAllSystems ({ system, pkgs, fpkgs }: devShells = forAllSystems
let ({ pkgs, fpkgs, ... }:
ffpkgs = fpkgs.complete; let
in ffpkgs = fpkgs.complete;
pkgs.mkShell { in
buildInputs = [ {
ffpkgs.cargo default = pkgs.mkShell
ffpkgs.clippy {
ffpkgs.rust-src buildInputs = [
ffpkgs.rustc ffpkgs.cargo
ffpkgs.rustfmt ffpkgs.clippy
]; ffpkgs.rust-src
}); ffpkgs.rustc
ffpkgs.rustfmt
pkgs.wgo
];
};
});
}; };
} }