Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/formatter-csharpier.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Example generated by ../examples.sh
[formatter.csharpier]
command = "dotnet-csharpier"
command = "csharpier"
excludes = []
includes = ["*.cs"]
options = []
includes = ["*.cs", "*.csproj"]
options = ["format"]
43 changes: 12 additions & 31 deletions programs/csharpier.nix
Original file line number Diff line number Diff line change
@@ -1,39 +1,20 @@
{ mkFormatterModule, ... }:
{
lib,
pkgs,
config,
mkFormatterModule,
...
}:
let
cfg = config.programs.csharpier;
in
{
meta.maintainers = [ ];
meta.maintainers = [
"thomaslaich"
];

imports = [
(mkFormatterModule {
name = "csharpier";
includes = [ "*.cs" ];
package = "csharpier";
mainProgram = "csharpier";
args = [ "format" ];
includes = [
"*.cs"
"*.csproj"
# "*.slnx" # add this with 1.0.3 release

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this line be uncommented now that the package is at an appropriate version?

];
})
];

options.programs.csharpier = {
dotnet-sdk = lib.mkPackageOption pkgs "dotnet-sdk" { };
};

config = lib.mkIf cfg.enable {
settings.formatter.csharpier = {
command = pkgs.writeShellApplication {
name = "dotnet-csharpier";
runtimeInputs = with cfg; [
dotnet-sdk
package
];
text = ''
dotnet-csharpier "$@"
'';
};
};
};
}