mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 14:31:55 +03:00
fixup formatting issues
This commit is contained in:
parent
ae47597f4a
commit
6b015ff9f5
@ -234,7 +234,7 @@
|
|||||||
l.toString
|
l.toString
|
||||||
(pkgs.writeScript "format" ''
|
(pkgs.writeScript "format" ''
|
||||||
export PATH="${alejandra.defaultPackage.${system}}/bin"
|
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];
|
++ lib.optionals pkgs.stdenv.isLinux [pkgs.cntr];
|
||||||
|
|
||||||
shellHook =
|
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 NIX_PATH=nixpkgs=${nixpkgs}
|
||||||
export d2nExternalDir=${externalDirFor."${system}"}
|
export d2nExternalDir=${externalDirFor."${system}"}
|
||||||
export dream2nixWithExternals=${dream2nixFor."${system}".dream2nixWithExternals}
|
export dream2nixWithExternals=${dream2nixFor."${system}".dream2nixWithExternals}
|
||||||
|
@ -13,7 +13,8 @@ in rec {
|
|||||||
dream2nix = cli;
|
dream2nix = cli;
|
||||||
};
|
};
|
||||||
|
|
||||||
flakeApps = lib.mapAttrs (
|
flakeApps =
|
||||||
|
lib.mapAttrs (
|
||||||
appName: app: {
|
appName: app: {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = b.toString app.program;
|
program = b.toString app.program;
|
||||||
|
@ -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
|
|
@ -1,4 +1,7 @@
|
|||||||
[formatter.nix]
|
[formatter.nix]
|
||||||
command = "alejandra"
|
command = "alejandra"
|
||||||
includes = ["*.nix"]
|
includes = ["*.nix"]
|
||||||
excludes = ["overrides/nodejs/electron/*"]
|
excludes = [
|
||||||
|
"overrides/nodejs/electron/*",
|
||||||
|
"src/templates/translators/*",
|
||||||
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user