-
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #511 from nix-community/joerg-ci
replace nixpkgs-fmt with nixfmt-rfc-style
- Loading branch information
Showing
15 changed files
with
147 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# shellcheck shell=bash | ||
strict_env | ||
source ./direnvrc | ||
watch_file direnvrc *.nix | ||
watch_file direnvrc ./*.nix | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
{ self, withSystem, ... }: { | ||
flake.packages.x86_64-linux = withSystem "x86_64-linux" | ||
({ pkgs, ... }: { | ||
{ self, withSystem, ... }: | ||
{ | ||
flake.packages.x86_64-linux = withSystem "x86_64-linux" ( | ||
{ pkgs, ... }: | ||
{ | ||
bash4 = pkgs.callPackage ./. { }; | ||
direnv-bash4 = pkgs.direnv.override { | ||
bash = self.packages.x86_64-linux.bash4; | ||
}; | ||
direnv-bash4 = pkgs.direnv.override { bash = self.packages.x86_64-linux.bash4; }; | ||
test-runner-bash4 = pkgs.callPackage ../../test-runner.nix { | ||
nixVersion = "stable"; | ||
direnv = self.packages.x86_64-linux.direnv-bash4; | ||
}; | ||
}); | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# shellcheck shell=bash | ||
if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then | ||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w=" | ||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w=" | ||
fi | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
{ pkgs ? import (builtins.getFlake (toString ./.)).inputs.nixpkgs { } | ||
, someArg ? null | ||
, shellHook ? '' | ||
{ | ||
pkgs ? import (builtins.getFlake (toString ./.)).inputs.nixpkgs { }, | ||
someArg ? null, | ||
shellHook ? '' | ||
echo "Executing shellHook." | ||
'' | ||
'', | ||
}: | ||
pkgs.mkShellNoCC { | ||
inherit shellHook; | ||
|
||
nativeBuildInputs = [ pkgs.hello ]; | ||
SHOULD_BE_SET = someArg; | ||
|
||
passthru = { subshell = pkgs.mkShellNoCC { THIS_IS_A_SUBSHELL = "OK"; }; }; | ||
passthru = { | ||
subshell = pkgs.mkShellNoCC { THIS_IS_A_SUBSHELL = "OK"; }; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
{ inputs, ... }: { | ||
imports = [ | ||
inputs.treefmt-nix.flakeModule | ||
]; | ||
{ inputs, ... }: | ||
{ | ||
imports = [ inputs.treefmt-nix.flakeModule ]; | ||
|
||
perSystem = { | ||
treefmt = { | ||
# Used to find the project root | ||
projectRootFile = ".git/config"; | ||
perSystem = | ||
{ pkgs, ... }: | ||
{ | ||
treefmt = { | ||
# Used to find the project root | ||
projectRootFile = ".git/config"; | ||
|
||
programs = { | ||
deadnix.enable = true; | ||
deno.enable = true; | ||
mypy.enable = true; | ||
ruff.check = true; | ||
ruff.format = true; | ||
nixpkgs-fmt.enable = true; | ||
shellcheck.enable = true; | ||
shfmt.enable = true; | ||
statix.enable = true; | ||
}; | ||
programs = { | ||
deadnix.enable = true; | ||
deno.enable = true; | ||
mypy.enable = true; | ||
ruff.check = true; | ||
ruff.format = true; | ||
nixfmt.enable = true; | ||
nixfmt.package = pkgs.nixfmt-rfc-style; | ||
shellcheck.enable = true; | ||
shfmt.enable = true; | ||
statix.enable = true; | ||
yamlfmt.enable = true; | ||
}; | ||
|
||
settings.formatter = | ||
let | ||
shellIncludes = [ "*.sh" "direnvrc" ]; | ||
in | ||
{ | ||
shellcheck.includes = shellIncludes; | ||
shfmt.includes = shellIncludes; | ||
settings.formatter = { | ||
shellcheck.includes = [ "direnvrc" ]; | ||
shfmt.includes = [ "direnvrc" ]; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |