mirror of
https://github.com/numtide/treefmt.git
synced 2024-10-04 04:27:21 +03:00
87cdaeabdc
Allow `nix run github:numtide/treefmt`
32 lines
977 B
Nix
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;
|
|
};
|
|
};
|
|
}
|