Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nix flake #3780

Merged
merged 4 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ clean-all: clean ## Clean all artifacts

.PHONY: generate
generate: install-tools generate-swagger ## Run all code generations
go generate ./...
CGO_ENABLED=0 go generate ./...

generate-swagger: install-tools ## Run swagger code generation
swag init -g server/api/ -g cmd/server/swagger.go --outputTypes go -output cmd/server/docs
go generate cmd/server/swagger.go
CGO_ENABLED=0 go generate cmd/server/swagger.go

generate-license-header: install-tools
addlicense -c "Woodpecker Authors" -ignore "vendor/**" **/*.go
Expand Down Expand Up @@ -317,7 +317,7 @@ spellcheck:
##@ Docs
.PHONY: docs
docs: ## Generate docs (currently only for the cli)
go generate cmd/cli/app.go
go generate cmd/server/swagger.go
CGO_ENABLED=0 go generate cmd/cli/app.go
CGO_ENABLED=0 go generate cmd/server/swagger.go

endif
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
# Override nixpkgs to use the latest set of node packages
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/master";
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

Expand All @@ -10,7 +9,7 @@
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
Expand All @@ -20,18 +19,21 @@
gnutar

# frontend
nodejs
nodePackages.pnpm
nodejs_20
pnpm
nodePackages.typescript
nodePackages.typescript-language-server

# backend
go
go_1_22
glibc.static
gofumpt
golangci-lint
go-mockery
protobuf
];
CFLAGS = "-I${pkgs.glibc.dev}/include";
LDFLAGS = "-L${pkgs.glibc}/lib";
};
}
);
Expand Down