Files
nix-js/flake.nix
2026-01-02 02:54:52 +08:00

42 lines
1.0 KiB
Nix

{
nixConfig = {
extra-substituters = [
"https://cache.garnix.io"
];
extra-trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { nixpkgs, fenix, ... }:
let
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
in
{
devShells = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; in
{
default = pkgs.mkShell {
packages = with pkgs; [
(fenix.packages.${system}.stable.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
"rust-analyzer"
])
lldb
valgrind
claude-code
];
};
}
);
};
}