mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-13 22:06:55 +00:00
ed5fcfef9e
This comes with some formatting changes due to a `clang-format` update.
41 lines
1013 B
Nix
41 lines
1013 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;
|
|
}
|
|
);
|
|
}
|