meta: refactor repository
This commit is contained in:
parent
a306e192a4
commit
599fe1903f
28 changed files with 276 additions and 136 deletions
10
templates/go/flake/formatter.nix
Normal file
10
templates/go/flake/formatter.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ writeShellApplication, fd, nixfmt, deadnix, statix, go }:
|
||||
writeShellApplication {
|
||||
name = "linter";
|
||||
runtimeInputs = [ fd nixfmt deadnix statix go ];
|
||||
text = ''
|
||||
fd -e nix -X nixfmt {} \; -X deadnix -e {} \;
|
||||
fd -e nix -x statix fix {} \;
|
||||
fd -e rs -X go fmt {} \; -X go vet {} \;
|
||||
'';
|
||||
}
|
9
templates/go/flake/package.nix
Normal file
9
templates/go/flake/package.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ buildGoModule }:
|
||||
let
|
||||
pname = "CHANGE_ME";
|
||||
version = "CHANGE_VER";
|
||||
in buildGoModule {
|
||||
inherit pname version;
|
||||
src = ../.;
|
||||
vendorHash = null;
|
||||
}
|
9
templates/go/flake/shell.nix
Normal file
9
templates/go/flake/shell.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ mkShell, go, gopls, go-tools }:
|
||||
mkShell {
|
||||
name = "go";
|
||||
packages = [
|
||||
go
|
||||
gopls
|
||||
go-tools
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue