diff options
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | flake.nix | 60 | ||||
-rw-r--r-- | options/locale/locale_fr-FR.ini | 2 | ||||
-rw-r--r-- | options/locale/locale_ga-IE.ini | 1 |
4 files changed, 53 insertions, 26 deletions
@@ -48,6 +48,17 @@ ifeq ($(HAS_GO), yes) CGO_CFLAGS ?= $(shell $(GO) env CGO_CFLAGS) $(CGO_EXTRA_CFLAGS) endif +CGO_ENABLED ?= 0 +ifneq (,$(findstring sqlite,$(TAGS))$(findstring pam,$(TAGS))) + CGO_ENABLED = 1 +endif + +STATIC ?= +EXTLDFLAGS ?= +ifneq ($(STATIC),) + EXTLDFLAGS = -extldflags "-static" +endif + ifeq ($(GOOS),windows) IS_WINDOWS := yes else ifeq ($(patsubst Windows%,Windows,$(OS)),Windows) @@ -746,7 +757,10 @@ security-check: go run $(GOVULNCHECK_PACKAGE) -show color ./... $(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ) - CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ +ifneq ($(and $(STATIC),$(findstring pam,$(TAGS))),) + $(error pam support set via TAGS doesn't support static builds) +endif + CGO_ENABLED="$(CGO_ENABLED)" CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(EXTLDFLAGS) $(LDFLAGS)' -o $@ .PHONY: release release: frontend generate release-windows release-linux release-darwin release-freebsd release-copy release-compress vendor release-sources release-check @@ -11,33 +11,45 @@ pkgs = nixpkgs.legacyPackages.${system}; in { - devShells.default = pkgs.mkShell { - buildInputs = with pkgs; [ - # generic - git - git-lfs - gnumake - gnused - gnutar - gzip + devShells.default = + with pkgs; + let + # only bump toolchain versions here + go = go_1_24; + nodejs = nodejs_24; + python3 = python312; + in + pkgs.mkShell { + buildInputs = [ + # generic + git + git-lfs + gnumake + gnused + gnutar + gzip - # frontend - nodejs_22 + # frontend + nodejs - # linting - python312 - uv + # linting + python3 + uv - # backend - go_1_24 - gofumpt - sqlite - ]; - shellHook = '' - export GO="${pkgs.go_1_24}/bin/go" - export GOROOT="${pkgs.go_1_24}/share/go" - ''; - }; + # backend + go + glibc.static + gofumpt + sqlite + ]; + CFLAGS = "-I${glibc.static.dev}/include"; + LDFLAGS = "-L ${glibc.static}/lib"; + GO = "${go}/bin/go"; + GOROOT = "${go}/share/go"; + + TAGS = "sqlite sqlite_unlock_notify"; + STATIC = "true"; + }; } ); } diff --git a/options/locale/locale_fr-FR.ini b/options/locale/locale_fr-FR.ini index 3ea317f96e..c9e074b659 100644 --- a/options/locale/locale_fr-FR.ini +++ b/options/locale/locale_fr-FR.ini @@ -1322,7 +1322,7 @@ commit_graph.color=Couleur commit.contained_in=Cette révision appartient à : commit.contained_in_default_branch=Cette révision appartient à la branche par défaut commit.load_referencing_branches_and_tags=Charger les branches et étiquettes référençant cette révision -commit.merged_in_pr=Cette révision a été fusionnée dans la demande d’ajour %s. +commit.merged_in_pr=Cette révision a été fusionnée dans la demande d’ajout %s. blame=Annotations download_file=Télécharger le fichier normal_view=Vue normale diff --git a/options/locale/locale_ga-IE.ini b/options/locale/locale_ga-IE.ini index 08c8eafb38..cb0c2373ed 100644 --- a/options/locale/locale_ga-IE.ini +++ b/options/locale/locale_ga-IE.ini @@ -1322,6 +1322,7 @@ commit_graph.color=Dath commit.contained_in=Tá an tiomantas seo le fáil i: commit.contained_in_default_branch=Tá an tiomantas seo mar chuid den bhrainse réamhshocraithe commit.load_referencing_branches_and_tags=Luchtaigh brainsí agus clibeanna a thagraíonn an tiomantas +commit.merged_in_pr=Cuireadh an tiomantas seo le chéile san iarratas tarraingthe %s. blame=An milleán download_file=Íoslódáil comhad normal_view=Amharc Gnáth |