exercism-solutions/flake.nix

48 lines
1.3 KiB
Nix
Raw Normal View History

2023-10-11 10:12:50 -05:00
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# SPDX-License-Identifier: MPL-2.0
{
inputs = {
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-10-24 13:03:22 -05:00
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-10-19 08:57:02 -05:00
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
2023-10-11 10:12:50 -05:00
};
outputs = {
devshell,
2024-10-24 13:03:22 -05:00
fenix,
2023-10-11 10:12:50 -05:00
flake-utils,
nixpkgs,
...
}: (flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
2024-10-24 13:03:22 -05:00
overlays = [
devshell.overlays.default
fenix.overlays.default
];
2023-10-11 10:12:50 -05:00
};
in {
formatter = pkgs.alejandra;
devShells.default = pkgs.devshell.mkShell {
commands = [
2024-10-24 13:03:22 -05:00
{package = pkgs.clangStdenv;}
{package = pkgs.fenix.default.toolchain; }
{package = pkgs.cargo-flamegraph;}
{package = pkgs.samply;}
{package = pkgs.hyperfine;}
2023-10-11 10:12:50 -05:00
{package = pkgs.exercism;}
{package = pkgs.nil;}
2024-10-24 13:03:22 -05:00
{package = pkgs.rust-analyzer-nightly;}
2023-10-11 10:12:50 -05:00
];
};
}));
}