fixup formatting issues

This commit is contained in:
DavHau 2022-03-07 17:47:49 +07:00
parent ae47597f4a
commit 6b015ff9f5
4 changed files with 17 additions and 38 deletions

View File

@ -234,7 +234,7 @@
l.toString
(pkgs.writeScript "format" ''
export PATH="${alejandra.defaultPackage.${system}}/bin"
${pkgs.treefmt}/bin/treefmt "$@"
${pkgs.treefmt}/bin/treefmt --clear-cache "$@"
'');
}
);
@ -255,8 +255,10 @@
++ lib.optionals pkgs.stdenv.isLinux [pkgs.cntr];
shellHook =
self.checks.${system}.pre-commit-check.shellHook
+ ''
# TODO: pre-commit shellHook disabled until this is solved:
# https://github.com/cachix/pre-commit-hooks.nix/issues/140
# self.checks.${system}.pre-commit-check.shellHook
''
export NIX_PATH=nixpkgs=${nixpkgs}
export d2nExternalDir=${externalDirFor."${system}"}
export dream2nixWithExternals=${dream2nixFor."${system}".dream2nixWithExternals}

View File

@ -13,13 +13,14 @@ in rec {
dream2nix = cli;
};
flakeApps = lib.mapAttrs (
appName: app: {
type = "app";
program = b.toString app.program;
}
)
apps;
flakeApps =
lib.mapAttrs (
appName: app: {
type = "app";
program = b.toString app.program;
}
)
apps;
# the dream2nix cli
cli = callPackageDream (import ./cli) {};

View File

@ -1,27 +0,0 @@
{
lib,
# dream2nix
utils,
}:
let
b = builtins;
testParseGitUrl =
let
testCases = [
{
input = "git+ssh://git@github.com/mattermost/marked.git#6ca9a6b3f4bdd35dbf58d06f5e53369791e05915";
output = { owner = "mattermost"; repo = "marked"; rev = "6ca9a6b3f4bdd35dbf58d06f5e53369791e05915"; };
}
{
input = "git+https://gitlab.com/openengiadina/js-eris.git#cbe42c8d1921837cc1780253dc9113622cd0826a";
output = { owner = "openengiadina"; repo = "js-eris"; rev = "cbe42c8d1921837cc1780253dc9113622cd0826a"; };
}
];
in
assert ! testParseGithu ->
throw "failed";
true

View File

@ -1,4 +1,7 @@
[formatter.nix]
command = "alejandra"
includes = ["*.nix"]
excludes = ["overrides/nodejs/electron/*"]
excludes = [
"overrides/nodejs/electron/*",
"src/templates/translators/*",
]