Skip to content

Commit

Permalink
fix(units/configs/treefmt): compatible with the newest version
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Feb 24, 2024
1 parent 99ee35d commit e88b800
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 49 deletions.
6 changes: 3 additions & 3 deletions local/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 30 additions & 43 deletions local/lock/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion local/lock/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
devshell.inputs.nixpkgs.follows = "nixpkgs";

n2c.url = "github:nlewo/nix2container";
# n2c.inputs.nixpkgs.follows = "nixpkgs";
n2c.inputs.nixpkgs.follows = "nixpkgs";
n2c.inputs.flake-utils.follows = "flake-utils";

arion.url = "github:hercules-ci/arion";
Expand Down
15 changes: 13 additions & 2 deletions units/configs/treefmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
#
# SPDX-License-Identifier: MIT

{ inputs, omnibus }:
{
inputs,
omnibus,
lib,
}:
let
inherit
(omnibus.errors.requiredInputsLazily inputs "omnibus.pops.configs" [
Expand Down Expand Up @@ -38,7 +42,14 @@ in
command = "prettier";
options = [
"--plugin"
"${nixpkgs.nodePackages.prettier-plugin-toml}/lib/node_modules/prettier-plugin-toml/lib/api.js"
"${nixpkgs.nodePackages.prettier-plugin-toml}/lib/node_modules/prettier-plugin-toml/lib/${
if
lib.strings.versionOlder nixpkgs.nodePackages.prettier-plugin-toml.version "2.0.1"
then
"api.js"
else
"index.js"
}"
"--write"
];
includes = [
Expand Down

0 comments on commit e88b800

Please sign in to comment.