mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-09 21:24:14 +00:00
31 lines
957 B
Nix
31 lines
957 B
Nix
{
|
|
description = "A flake for building Object Introspection.";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
treefmt-nix.url = "github:numtide/treefmt-nix";
|
|
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils, treefmt-nix, ... }@inputs:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
treefmtEval = treefmt-nix.lib.evalModule pkgs (pkgs: {
|
|
projectRootFile = "flake.nix";
|
|
settings.global.excludes = [ "./extern/**" ];
|
|
|
|
programs.nixfmt.enable = true;
|
|
programs.clang-format.enable = true;
|
|
programs.black.enable = true;
|
|
programs.isort.enable = true;
|
|
});
|
|
in {
|
|
formatter = treefmtEval.config.build.wrapper;
|
|
checks.formatting = treefmtEval.config.build.check self;
|
|
});
|
|
}
|