treefmt/flake.nix
zimbatm 87cdaeabdc
make treefmt the default package
Allow `nix run github:numtide/treefmt`
2023-01-05 14:57:30 +01:00

32 lines
977 B
Nix

{
description = "treefmt";
# To update all inputs:
# $ nix flake update --recreate-lock-file
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
inputs.flake-parts.inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-overlay.url = "github:oxalica/rust-overlay";
inputs.rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
outputs = { self, nixpkgs, flake-parts, rust-overlay }@inputs:
flake-parts.lib.mkFlake { inherit self; } {
systems = nixpkgs.lib.systems.flakeExposed;
perSystem = { system, pkgs, ... }:
let
packages = import ./. {
inherit system;
};
in
{
# This contains a mix of packages, modules, ...
legacyPackages = packages;
# Allow `nix run github:numtide/treefmt`.
packages.default = packages.treefmt;
devShells.default = packages.devShell;
};
};
}