Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Nix flake build static with sqlite support#35149

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@6543
Copy link
Member

withnix develop -c $SHELL you can enter the dev environment.
now withmake clean-all generate build -j1 you will get a static linked binary that has sqlite support

example:
image

@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelJul 23, 2025
@65436543 changed the titleNix flake build static with sqlite supportWIP: Nix flake build static with sqlite supportJul 23, 2025
@65436543 added the pr/wipThis PR is not ready for review labelJul 23, 2025
@6543
Copy link
MemberAuthor

Before, we can build (cross-compile) Gitea without CGO

@wxiaoguang now it should not break anything :)

You could probably put this env var in the nix flake though.

done ...

I suggest something like GO_BUILD_VARS ?= in the Makefile ...

well the makefile could be reworked to use less specific env vars and build things up to be collected in one var ... but I think this is some refactor to be done in another pull dedicated to it ... if one wants to

Same question, why CGO_ENABLED is needed, why -extldflags -static is needed

because if you dont build static in nixos the gitea binary just panics:

image

@65436543 changed the titleWIP: Nix flake build static with sqlite supportNix flake build static with sqlite supportJul 24, 2025
@65436543 removed the pr/wipThis PR is not ready for review labelJul 24, 2025
@6543
Copy link
MemberAuthor

image

@6543
Copy link
MemberAuthor

@techknowlogick pam needs cgo too - added :)

and it does not support static linking ...

@65436543 added the pr/wipThis PR is not ready for review labelAug 6, 2025
@6543
Copy link
MemberAuthor

6543 commentedAug 6, 2025
edited
Loading

@techknowlogick static also works on windows :)

no static:
image

with static:
image
image

techknowlogick reacted with heart emoji

@65436543 removed the pr/wipThis PR is not ready for review labelAug 6, 2025
@techknowlogicktechknowlogickenabled auto-merge (squash)August 6, 2025 17:00
Copy link
Member

@techknowlogicktechknowlogick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks :)

@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelsAug 6, 2025
@techknowlogicktechknowlogick added skip-changelogThis PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. reviewed/wait-mergeThis pull request is part of the merge queue. It will be merged soon. labelsAug 6, 2025
@65436543 requested a review fromsilverwindAugust 6, 2025 17:46
@GiteaBotGiteaBot added lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1This PR needs approval from one additional maintainer to be merged. labelsAug 6, 2025
@techknowlogicktechknowlogick merged commit28a7cc4 intogo-gitea:mainAug 6, 2025
26 checks passed
@GiteaBotGiteaBot added this to the1.25.0 milestoneAug 6, 2025
@GiteaBotGiteaBot removed the reviewed/wait-mergeThis pull request is part of the merge queue. It will be merged soon. labelAug 6, 2025
@lafrikslafriks deleted the nix-flake_allow-CGO-builds branchAugust 6, 2025 20:22
@65436543 added the backport/v1.24This PR should be backported to Gitea 1.24 labelAug 6, 2025
6543 added a commit to 6543-forks/gitea that referenced this pull requestAug 6, 2025
with `nix develop -c $SHELL` you can enter the dev environment.now with `make clean-all generate build -j1` you will get a staticlinked binary that has sqlite support
@6543
Copy link
MemberAuthor

6543 commentedAug 6, 2025

backpott ->#35225

@65436543 added the backport/doneAll backports for this PR have been created labelAug 6, 2025
zjjhot added a commit to zjjhot/gitea that referenced this pull requestAug 7, 2025
* giteaofficial/main:  Nix flake build static with sqlite support (go-gitea#35149)  Vertically center "Show Resolved" (go-gitea#35211)  [skip ci] Updated translations via Crowdin
lafriks pushed a commit that referenced this pull requestAug 7, 2025
Backport#35149with `nix develop -c $SHELL` you can enter the dev environment. now with`make clean-all generate build -j1` you will get a static linked binarythat has sqlite supportoutside of an nix dev shell if you set `STATIC=true` you also will get astatic binary
hiifong added a commit to hiifong/gitea that referenced this pull requestAug 11, 2025
* upstream/main:  [skip ci] Updated translations via Crowdin  [skip ci] Updated translations via Crowdin  Update stylelint, enable `report*` options (go-gitea#35236)  Add `has_code` to repository REST API (go-gitea#35214)  Upgrade go to 1.24.6 (go-gitea#35235)  [skip ci] Updated translations via Crowdin  Nix flake build static with sqlite support (go-gitea#35149)
@go-giteago-gitea locked asresolvedand limited conversation to collaboratorsNov 5, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@wxiaoguangwxiaoguangwxiaoguang left review comments

@techknowlogicktechknowlogicktechknowlogick approved these changes

@lafrikslafrikslafriks approved these changes

@silverwindsilverwindAwaiting requested review from silverwind

Assignees

No one assigned

Labels

backport/doneAll backports for this PR have been createdbackport/v1.24This PR should be backported to Gitea 1.24lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore.modifies/internalskip-changelogThis PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.

Projects

None yet

Milestone

1.25.0

Development

Successfully merging this pull request may close these issues.

6 participants

@6543@silverwind@techknowlogick@lafriks@wxiaoguang@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp