Added flake.nix
This commit is contained in:
parent
55db70e325
commit
0035d5bf3a
31
flake.nix
Normal file
31
flake.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
description = "Rust development environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
overlay-unstable = final: prev: {
|
||||
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
|
||||
};
|
||||
in {
|
||||
devShells.x86_64-linux.default =
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
fish
|
||||
rustc
|
||||
cargo
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "Running a nix development environment"
|
||||
exec fish
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user