add deadnix to formatter
This commit is contained in:
@@ -9,8 +9,21 @@
|
|||||||
treefmt.projectRootFile = "flake.nix";
|
treefmt.projectRootFile = "flake.nix";
|
||||||
treefmt.flakeCheck = true;
|
treefmt.flakeCheck = true;
|
||||||
treefmt.flakeFormatter = true;
|
treefmt.flakeFormatter = true;
|
||||||
treefmt.programs.nixpkgs-fmt.enable = true;
|
|
||||||
treefmt.programs.shellcheck.enable = true;
|
treefmt.programs.shellcheck.enable = true;
|
||||||
|
treefmt.settings.formatter.nix = {
|
||||||
|
command = "sh";
|
||||||
|
options = [
|
||||||
|
"-eucx"
|
||||||
|
''
|
||||||
|
# First deadnix
|
||||||
|
${lib.getExe pkgs.deadnix} --edit "$@"
|
||||||
|
# Then nixpkgs-fmt
|
||||||
|
${lib.getExe pkgs.nixpkgs-fmt} "$@"
|
||||||
|
''
|
||||||
|
"--" # this argument is ignored by bash
|
||||||
|
];
|
||||||
|
includes = [ "*.nix" ];
|
||||||
|
};
|
||||||
treefmt.settings.formatter.python = {
|
treefmt.settings.formatter.python = {
|
||||||
command = "sh";
|
command = "sh";
|
||||||
options = [
|
options = [
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ self, ... }: {
|
{ ... }: {
|
||||||
pre-commit.settings.hooks.alejandra.enable = true;
|
pre-commit.settings.hooks.alejandra.enable = true;
|
||||||
pre-commit.settings.hooks.shellcheck.enable = true;
|
pre-commit.settings.hooks.shellcheck.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
outputs = inputs @ { flake-parts, ... }:
|
outputs = inputs @ { flake-parts, ... }:
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } ({ lib
|
flake-parts.lib.mkFlake { inherit inputs; } ({ lib
|
||||||
, config
|
, config
|
||||||
, self
|
|
||||||
, ...
|
, ...
|
||||||
}: {
|
}: {
|
||||||
systems = lib.systems.flakeExposed;
|
systems = lib.systems.flakeExposed;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ config
|
{ lib
|
||||||
, lib
|
|
||||||
, pkgs
|
, pkgs
|
||||||
, ...
|
, ...
|
||||||
}: {
|
}: {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
checkPython = python3.withPackages (ps: devDependencies ++ dependencies);
|
checkPython = python3.withPackages (_ps: devDependencies ++ dependencies);
|
||||||
|
|
||||||
check = runCommand "${name}-check" { } ''
|
check = runCommand "${name}-check" { } ''
|
||||||
cp -r ${src} ./src
|
cp -r ${src} ./src
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ pkgs ? import <nixpkgs> { }
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, system ? builtins.currentSystem
|
|
||||||
,
|
,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ let
|
|||||||
passthru.devDependencies = devDependencies;
|
passthru.devDependencies = devDependencies;
|
||||||
};
|
};
|
||||||
|
|
||||||
checkPython = python3.withPackages (ps: devDependencies ++ dependencies);
|
checkPython = python3.withPackages (_ps: devDependencies ++ dependencies);
|
||||||
|
|
||||||
check = runCommand "${name}-check" { } ''
|
check = runCommand "${name}-check" { } ''
|
||||||
cp -r ${src} ./src
|
cp -r ${src} ./src
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
{
|
{
|
||||||
perSystem = { pkgs, ... }:
|
perSystem = { pkgs, ... }:
|
||||||
let
|
let
|
||||||
pyproject = builtins.fromTOML (builtins.readFile ./pyproject.toml);
|
|
||||||
name = pyproject.project.name;
|
|
||||||
package = pkgs.callPackage ./default.nix { };
|
package = pkgs.callPackage ./default.nix { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{ pkgs ? import <nixpkgs> { }
|
{ pkgs ? import <nixpkgs> { }
|
||||||
, system ? builtins.currentSystem
|
|
||||||
,
|
,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|||||||
Reference in New Issue
Block a user