forked from genshinsim/gcsim
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
63 lines (57 loc) · 1.44 KB
/
flake.nix
File metadata and controls
63 lines (57 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;
perSystem =
{
lib,
pkgs,
self',
...
}:
{
formatter = pkgs.nixfmt-tree;
packages.golangci-lint-v2 = pkgs.runCommandLocal "golangci-lint-v2" { } ''
mkdir -p $out/bin
cp ${lib.getExe pkgs.golangci-lint} $out/bin/$name
'';
devShells.default = pkgs.mkShell {
nativeBuildInputs =
with pkgs;
let
go = go_1_25;
nodejs = nodejs_24;
yarn = yarn-berry_3;
in
[
git
git-lfs
# core
go
go-task
gofumpt
golangci-lint
self'.packages.golangci-lint-v2
gopls
gotools
# ui
nodejs
yarn
# protobuf
protobuf
protoc-gen-go
protoc-gen-go-grpc
];
};
};
};
}