build: depend on tagged purego-libwayland v0.1.0 and purego-vulkan v0.4.0, package from git archive
- commit
- 9cbbe264b799509de7b9e9226abc9423dccd8be2
- author
- brice · · 2026-09-26 06:15 UTC
- parent
- f01875e
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
6 files · +43 -50
M .gitignore +2 -0
| @@ -5,3 +5,5 @@ | |||
| 5 | 5 | coverage/ | |
| 6 | 6 | .worktrees/ | |
| 7 | 7 | /dist/ | |
| 8 | + | go.work | |
| 9 | + | go.work.sum | |
| @@ -5,3 +5,5 @@ | |||||
| 5 | coverage/ | 5 | coverage/ | ||
| 6 | .worktrees/ | 6 | .worktrees/ | ||
| 7 | /dist/ | 7 | /dist/ | ||
| 8 | + | go.work | |||
| 9 | + | go.work.sum | |||
M Makefile +15 -37
| @@ -1,4 +1,4 @@ | |||
| 1 | - | .PHONY: build test vet race mocks mocks-check fakes-check arch check bin tty logs dist pkg | |
| 1 | + | .PHONY: build test vet race mocks mocks-check fakes-check arch check bin tty logs pkg | |
| 2 | 2 | ||
| 3 | 3 | # 0 runs until quit; set e.g. TTY_TIMEOUT=60s for a safety net. | |
| 4 | 4 | TTY_TIMEOUT ?= 0 | |
| @@ -46,40 +46,18 @@ arch: | |||
| 46 | 46 | $(HOME)/go/bin/hexcheck -hexcheck.config .hexcheck.yaml -hexcheck.root . ./... | |
| 47 | 47 | check: vet test arch fakes-check | |
| 48 | 48 | ||
| 49 | - | # Self-contained source tarball for packaging (packaging/arch/PKGBUILD): the | |
| 50 | - | # sibling purego-* modules are vendored, so the package builds offline. It | |
| 51 | - | # holds the working trees; the version ends in .dirty when one is not clean. | |
| 52 | - | SIBLINGS := github.com/bnema/purego-libwayland github.com/bnema/purego-vulkan | |
| 53 | - | SIBLING_DIRS = $(shell go list -m -f '{{.Dir}}' $(SIBLINGS)) | |
| 54 | - | dirty = $(shell for d in . $(SIBLING_DIRS); do git -C $$d diff --quiet HEAD && \ | |
| 55 | - | test -z "$$(git -C $$d ls-files -o --exclude-standard)" || { echo .dirty; break; }; done) | |
| 56 | - | # pacman-ordered: 0.0.0.r<commits>.g<hash>; a tag replaces 0.0.0. | |
| 57 | - | VERSION ?= $(shell t=$$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//; s/-/_/g'); \ | |
| 58 | - | echo "$${t:-0.0.0}.r$$(git rev-list --count HEAD).g$$(git rev-parse --short HEAD)")$(dirty) | |
| 59 | - | DIST = dist/nefertty-$(VERSION) | |
| 60 | - | dist: SHELL := bash | |
| 61 | - | dist: .SHELLFLAGS := -eo pipefail -c | |
| 62 | - | # Computed once per dist run (git and go list), not for every target. | |
| 63 | - | ifneq ($(filter dist pkg,$(MAKECMDGOALS)),) | |
| 64 | - | VERSION := $(VERSION) | |
| 65 | - | endif | |
| 66 | - | dist: | |
| 67 | - | @for d in $(SIBLING_DIRS); do test -d $$d || { echo "sibling module not found: $$d" >&2; exit 1; }; done | |
| 68 | - | rm -rf $(DIST) && mkdir -p $(DIST) | |
| 69 | - | git ls-files -co --exclude-standard -z | tar --null -T - -c | tar -x -C $(DIST) | |
| 70 | - | cd $(DIST) && go mod edit $(foreach m,$(SIBLINGS),-replace=$(m)=$(shell go list -m -f '{{.Dir}}' $(m))) && go mod vendor | |
| 71 | - | cd $(DIST) && $(foreach m,$(SIBLINGS),sed -i 's#=> $(shell go list -m -f '{{.Dir}}' $(m))$$#=> ../$(notdir $(m))#' go.mod vendor/modules.txt &&) true | |
| 72 | - | @! grep -rqF "$(HOME)" $(DIST) || { echo "home path leaked into $(DIST)" >&2; exit 1; } | |
| 73 | - | echo '$(VERSION)' > $(DIST)/VERSION | |
| 74 | - | tar --owner=0 --group=0 --numeric-owner --sort=name --mtime=@$$(git log -1 --format=%ct) -C dist -czf $(DIST).tar.gz nefertty-$(VERSION) | |
| 75 | - | rm -rf $(DIST) | |
| 76 | - | @echo $(DIST).tar.gz | |
| 77 | - | ||
| 78 | - | # Arch package from the dist tarball, built outside the home directory so | |
| 79 | - | # no path of it lands in the package metadata. Install it with | |
| 80 | - | # `sudo pacman -U` on the printed file. | |
| 81 | - | pkg: dist | |
| 82 | - | d=$$(mktemp -d /tmp/nefertty-pkg.XXXXXX) && cp packaging/arch/PKGBUILD $(DIST).tar.gz $$d/ && \ | |
| 83 | - | cd $$d && sed -i "s/^pkgver=.*/pkgver=$(VERSION)/; s/^sha256sums=.*/sha256sums=('$$(sha256sum *.tar.gz | cut -d' ' -f1)')/" PKGBUILD && \ | |
| 84 | - | makepkg -f --noconfirm && mv *.pkg.tar.zst $(CURDIR)/dist/ && cd / && rm -rf $$d | |
| 49 | + | # Arch package of the committed HEAD (packaging/arch/PKGBUILD). Go modules | |
| 50 | + | # come from the module proxy in prepare(); the build itself runs offline. | |
| 51 | + | # pacman-ordered version: 0.0.0.r<commits>.g<hash>; a tag replaces 0.0.0. | |
| 52 | + | pkg: SHELL := bash | |
| 53 | + | pkg: .SHELLFLAGS := -eo pipefail -c | |
| 54 | + | pkg: | |
| 55 | + | @git diff --quiet HEAD || echo "warning: uncommitted changes are not packaged" >&2 | |
| 56 | + | v=$$(t=$$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//; s/-/_/g'); \ | |
| 57 | + | echo "$${t:-0.0.0}.r$$(git rev-list --count HEAD).g$$(git rev-parse --short HEAD)"); \ | |
| 58 | + | d=$$(mktemp -d /tmp/nefertty-pkg.XXXXXX); \ | |
| 59 | + | git archive --prefix=nefertty-$$v/ -o $$d/nefertty-$$v.tar.gz HEAD; \ | |
| 60 | + | cp packaging/arch/PKGBUILD $$d/; \ | |
| 61 | + | cd $$d && sed -i "s/^pkgver=.*/pkgver=$$v/; s/^sha256sums=.*/sha256sums=('$$(sha256sum *.tar.gz | cut -d' ' -f1)')/" PKGBUILD; \ | |
| 62 | + | makepkg -f --noconfirm; mkdir -p $(CURDIR)/dist; mv *.pkg.tar.zst $(CURDIR)/dist/; cd /; rm -rf $$d | |
| 85 | 63 | @ls dist/*.pkg.tar.zst | |
| @@ -1,4 +1,4 @@ | |||||
| 1 | - | .PHONY: build test vet race mocks mocks-check fakes-check arch check bin tty logs dist pkg | 1 | + | .PHONY: build test vet race mocks mocks-check fakes-check arch check bin tty logs pkg |
| 2 | 2 | ||||
| 3 | # 0 runs until quit; set e.g. TTY_TIMEOUT=60s for a safety net. | 3 | # 0 runs until quit; set e.g. TTY_TIMEOUT=60s for a safety net. | ||
| 4 | TTY_TIMEOUT ?= 0 | 4 | TTY_TIMEOUT ?= 0 | ||
| @@ -46,40 +46,18 @@ arch: | |||||
| 46 | $(HOME)/go/bin/hexcheck -hexcheck.config .hexcheck.yaml -hexcheck.root . ./... | 46 | $(HOME)/go/bin/hexcheck -hexcheck.config .hexcheck.yaml -hexcheck.root . ./... | ||
| 47 | check: vet test arch fakes-check | 47 | check: vet test arch fakes-check | ||
| 48 | 48 | ||||
| 49 | - | # Self-contained source tarball for packaging (packaging/arch/PKGBUILD): the | 49 | + | # Arch package of the committed HEAD (packaging/arch/PKGBUILD). Go modules |
| 50 | - | # sibling purego-* modules are vendored, so the package builds offline. It | 50 | + | # come from the module proxy in prepare(); the build itself runs offline. |
| 51 | - | # holds the working trees; the version ends in .dirty when one is not clean. | 51 | + | # pacman-ordered version: 0.0.0.r<commits>.g<hash>; a tag replaces 0.0.0. |
| 52 | - | SIBLINGS := github.com/bnema/purego-libwayland github.com/bnema/purego-vulkan | 52 | + | pkg: SHELL := bash |
| 53 | - | SIBLING_DIRS = $(shell go list -m -f '{{.Dir}}' $(SIBLINGS)) | 53 | + | pkg: .SHELLFLAGS := -eo pipefail -c |
| 54 | - | dirty = $(shell for d in . $(SIBLING_DIRS); do git -C $$d diff --quiet HEAD && \ | 54 | + | pkg: |
| 55 | - | test -z "$$(git -C $$d ls-files -o --exclude-standard)" || { echo .dirty; break; }; done) | 55 | + | @git diff --quiet HEAD || echo "warning: uncommitted changes are not packaged" >&2 |
| 56 | - | # pacman-ordered: 0.0.0.r<commits>.g<hash>; a tag replaces 0.0.0. | 56 | + | v=$$(t=$$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//; s/-/_/g'); \ |
| 57 | - | VERSION ?= $(shell t=$$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//; s/-/_/g'); \ | 57 | + | echo "$${t:-0.0.0}.r$$(git rev-list --count HEAD).g$$(git rev-parse --short HEAD)"); \ |
| 58 | - | echo "$${t:-0.0.0}.r$$(git rev-list --count HEAD).g$$(git rev-parse --short HEAD)")$(dirty) | 58 | + | d=$$(mktemp -d /tmp/nefertty-pkg.XXXXXX); \ |
| 59 | - | DIST = dist/nefertty-$(VERSION) | 59 | + | git archive --prefix=nefertty-$$v/ -o $$d/nefertty-$$v.tar.gz HEAD; \ |
| 60 | - | dist: SHELL := bash | 60 | + | cp packaging/arch/PKGBUILD $$d/; \ |
| 61 | - | dist: .SHELLFLAGS := -eo pipefail -c | 61 | + | cd $$d && sed -i "s/^pkgver=.*/pkgver=$$v/; s/^sha256sums=.*/sha256sums=('$$(sha256sum *.tar.gz | cut -d' ' -f1)')/" PKGBUILD; \ |
| 62 | - | # Computed once per dist run (git and go list), not for every target. | 62 | + | makepkg -f --noconfirm; mkdir -p $(CURDIR)/dist; mv *.pkg.tar.zst $(CURDIR)/dist/; cd /; rm -rf $$d |
| 63 | - | ifneq ($(filter dist pkg,$(MAKECMDGOALS)),) | |||
| 64 | - | VERSION := $(VERSION) | |||
| 65 | - | endif | |||
| 66 | - | dist: | |||
| 67 | - | @for d in $(SIBLING_DIRS); do test -d $$d || { echo "sibling module not found: $$d" >&2; exit 1; }; done | |||
| 68 | - | rm -rf $(DIST) && mkdir -p $(DIST) | |||
| 69 | - | git ls-files -co --exclude-standard -z | tar --null -T - -c | tar -x -C $(DIST) | |||
| 70 | - | cd $(DIST) && go mod edit $(foreach m,$(SIBLINGS),-replace=$(m)=$(shell go list -m -f '{{.Dir}}' $(m))) && go mod vendor | |||
| 71 | - | cd $(DIST) && $(foreach m,$(SIBLINGS),sed -i 's#=> $(shell go list -m -f '{{.Dir}}' $(m))$$#=> ../$(notdir $(m))#' go.mod vendor/modules.txt &&) true | |||
| 72 | - | @! grep -rqF "$(HOME)" $(DIST) || { echo "home path leaked into $(DIST)" >&2; exit 1; } | |||
| 73 | - | echo '$(VERSION)' > $(DIST)/VERSION | |||
| 74 | - | tar --owner=0 --group=0 --numeric-owner --sort=name --mtime=@$$(git log -1 --format=%ct) -C dist -czf $(DIST).tar.gz nefertty-$(VERSION) | |||
| 75 | - | rm -rf $(DIST) | |||
| 76 | - | @echo $(DIST).tar.gz | |||
| 77 | - | ||||
| 78 | - | # Arch package from the dist tarball, built outside the home directory so | |||
| 79 | - | # no path of it lands in the package metadata. Install it with | |||
| 80 | - | # `sudo pacman -U` on the printed file. | |||
| 81 | - | pkg: dist | |||
| 82 | - | d=$$(mktemp -d /tmp/nefertty-pkg.XXXXXX) && cp packaging/arch/PKGBUILD $(DIST).tar.gz $$d/ && \ | |||
| 83 | - | cd $$d && sed -i "s/^pkgver=.*/pkgver=$(VERSION)/; s/^sha256sums=.*/sha256sums=('$$(sha256sum *.tar.gz | cut -d' ' -f1)')/" PKGBUILD && \ | |||
| 84 | - | makepkg -f --noconfirm && mv *.pkg.tar.zst $(CURDIR)/dist/ && cd / && rm -rf $$d | |||
| 85 | @ls dist/*.pkg.tar.zst | 63 | @ls dist/*.pkg.tar.zst | ||
M README.md +11 -5
| @@ -10,18 +10,26 @@ Requires Linux and Go 1.27. | |||
| 10 | 10 | - **NVIDIA GPUs:** untested. NVIDIA drivers need explicit sync (`linux-drm-syncobj`), which NeferTTY does not implement yet. Testers with NVIDIA hardware are welcome to report issues or contribute. | |
| 11 | 11 | - **Intel GPUs:** untested. | |
| 12 | 12 | ||
| 13 | - | Build: `make build` (requires sibling checkouts of purego-libwayland and purego-vulkan). | |
| 13 | + | Build: `make build`. | |
| 14 | 14 | ||
| 15 | 15 | Run: `nefertty --backend=headless --timeout 5s` | |
| 16 | 16 | ||
| 17 | 17 | ## Install (Arch Linux) | |
| 18 | 18 | ||
| 19 | 19 | ```sh | |
| 20 | - | make pkg # builds dist/nefertty-*.pkg.tar.zst | |
| 20 | + | make pkg # builds dist/nefertty-*.pkg.tar.zst from HEAD | |
| 21 | 21 | sudo pacman -U dist/nefertty-*.pkg.tar.zst | |
| 22 | 22 | ``` | |
| 23 | 23 | ||
| 24 | - | The package installs `nefertty` and a **NeferTTY** session for display managers (Ly, GDM, SDDM). The session runs `nefertty --session`, which shares `WAYLAND_DISPLAY` and `DISPLAY` with D-Bus and systemd user services, so portals and notification daemons reach it. `make dist` alone builds the self-contained source tarball (Go modules vendored) that the package uses; its version ends in `.dirty` when this repo or a sibling module has uncommitted changes. | |
| 24 | + | The package installs `nefertty` and a **NeferTTY** session for display managers (Ly, GDM, SDDM). The session runs `nefertty --session`, which shares `WAYLAND_DISPLAY` and `DISPLAY` with D-Bus and systemd user services, so portals and notification daemons reach it. | |
| 25 | + | ||
| 26 | + | ## Developing the bindings | |
| 27 | + | ||
| 28 | + | NeferTTY depends on tagged releases of [purego-libwayland](https://github.com/bnema/purego-libwayland) and [purego-vulkan](https://github.com/bnema/purego-vulkan). To change them together with NeferTTY, check them out next to it and use a Go workspace (not committed): | |
| 29 | + | ||
| 30 | + | ```sh | |
| 31 | + | go work init . ../purego-libwayland ../purego-vulkan | |
| 32 | + | ``` | |
| 25 | 33 | ||
| 26 | 34 | ## Configuration | |
| 27 | 35 | ||
| @@ -39,8 +47,6 @@ startup = wl-paste --watch cliphist store | |||
| 39 | 47 | ||
| 40 | 48 | See `examples/config` for every key and its default. A missing file means defaults. An invalid line logs a warning and keeps that key's default; the rest of the file still applies. Every key applies live when the file changes, including the keyboard layout; each reload logs the keys that changed. | |
| 41 | 49 | ||
| 42 | - | Building requires sibling checkouts of purego-libwayland and purego-vulkan until they are published. | |
| 43 | - | ||
| 44 | 50 | ## Running commands | |
| 45 | 51 | ||
| 46 | 52 | NeferTTY starts a program, not a shell line: `spawn` runs a binary or a script. Anything more than one command with arguments, such as pipes or variables, goes in a script that you write. | |
| @@ -10,18 +10,26 @@ Requires Linux and Go 1.27. | |||||
| 10 | - **NVIDIA GPUs:** untested. NVIDIA drivers need explicit sync (`linux-drm-syncobj`), which NeferTTY does not implement yet. Testers with NVIDIA hardware are welcome to report issues or contribute. | 10 | - **NVIDIA GPUs:** untested. NVIDIA drivers need explicit sync (`linux-drm-syncobj`), which NeferTTY does not implement yet. Testers with NVIDIA hardware are welcome to report issues or contribute. | ||
| 11 | - **Intel GPUs:** untested. | 11 | - **Intel GPUs:** untested. | ||
| 12 | 12 | ||||
| 13 | - | Build: `make build` (requires sibling checkouts of purego-libwayland and purego-vulkan). | 13 | + | Build: `make build`. |
| 14 | 14 | ||||
| 15 | Run: `nefertty --backend=headless --timeout 5s` | 15 | Run: `nefertty --backend=headless --timeout 5s` | ||
| 16 | 16 | ||||
| 17 | ## Install (Arch Linux) | 17 | ## Install (Arch Linux) | ||
| 18 | 18 | ||||
| 19 | ```sh | 19 | ```sh | ||
| 20 | - | make pkg # builds dist/nefertty-*.pkg.tar.zst | 20 | + | make pkg # builds dist/nefertty-*.pkg.tar.zst from HEAD |
| 21 | sudo pacman -U dist/nefertty-*.pkg.tar.zst | 21 | sudo pacman -U dist/nefertty-*.pkg.tar.zst | ||
| 22 | ``` | 22 | ``` | ||
| 23 | 23 | ||||
| 24 | - | The package installs `nefertty` and a **NeferTTY** session for display managers (Ly, GDM, SDDM). The session runs `nefertty --session`, which shares `WAYLAND_DISPLAY` and `DISPLAY` with D-Bus and systemd user services, so portals and notification daemons reach it. `make dist` alone builds the self-contained source tarball (Go modules vendored) that the package uses; its version ends in `.dirty` when this repo or a sibling module has uncommitted changes. | 24 | + | The package installs `nefertty` and a **NeferTTY** session for display managers (Ly, GDM, SDDM). The session runs `nefertty --session`, which shares `WAYLAND_DISPLAY` and `DISPLAY` with D-Bus and systemd user services, so portals and notification daemons reach it. |
| 25 | + | ||||
| 26 | + | ## Developing the bindings | |||
| 27 | + | ||||
| 28 | + | NeferTTY depends on tagged releases of [purego-libwayland](https://github.com/bnema/purego-libwayland) and [purego-vulkan](https://github.com/bnema/purego-vulkan). To change them together with NeferTTY, check them out next to it and use a Go workspace (not committed): | |||
| 29 | + | ||||
| 30 | + | ```sh | |||
| 31 | + | go work init . ../purego-libwayland ../purego-vulkan | |||
| 32 | + | ``` | |||
| 25 | 33 | ||||
| 26 | ## Configuration | 34 | ## Configuration | ||
| 27 | 35 | ||||
| @@ -39,8 +47,6 @@ startup = wl-paste --watch cliphist store | |||||
| 39 | 47 | ||||
| 40 | See `examples/config` for every key and its default. A missing file means defaults. An invalid line logs a warning and keeps that key's default; the rest of the file still applies. Every key applies live when the file changes, including the keyboard layout; each reload logs the keys that changed. | 48 | See `examples/config` for every key and its default. A missing file means defaults. An invalid line logs a warning and keeps that key's default; the rest of the file still applies. Every key applies live when the file changes, including the keyboard layout; each reload logs the keys that changed. | ||
| 41 | 49 | ||||
| 42 | - | Building requires sibling checkouts of purego-libwayland and purego-vulkan until they are published. | |||
| 43 | - | ||||
| 44 | ## Running commands | 50 | ## Running commands | ||
| 45 | 51 | ||||
| 46 | NeferTTY starts a program, not a shell line: `spawn` runs a binary or a script. Anything more than one command with arguments, such as pipes or variables, goes in a script that you write. | 52 | NeferTTY starts a program, not a shell line: `spawn` runs a binary or a script. Anything more than one command with arguments, such as pipes or variables, goes in a script that you write. | ||
M go.mod +2 -6
| @@ -4,8 +4,8 @@ go 1.27 | |||
| 4 | 4 | ||
| 5 | 5 | require ( | |
| 6 | 6 | github.com/bnema/purego v0.11.0-bnema.4 | |
| 7 | - | github.com/bnema/purego-libwayland v0.0.0 | |
| 8 | - | github.com/bnema/purego-vulkan v0.0.0 | |
| 7 | + | github.com/bnema/purego-libwayland v0.1.0 | |
| 8 | + | github.com/bnema/purego-vulkan v0.4.0 | |
| 9 | 9 | github.com/bnema/wlturbo v0.2.0 | |
| 10 | 10 | github.com/bnema/zerowrap v1.4.1 | |
| 11 | 11 | github.com/rs/zerolog v1.35.1 | |
| @@ -21,7 +21,3 @@ require ( | |||
| 21 | 21 | go.yaml.in/yaml/v3 v3.0.5 // indirect | |
| 22 | 22 | gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect | |
| 23 | 23 | ) | |
| 24 | - | ||
| 25 | - | replace github.com/bnema/purego-libwayland => ../purego-libwayland | |
| 26 | - | ||
| 27 | - | replace github.com/bnema/purego-vulkan => ../purego-vulkan | |
| @@ -4,8 +4,8 @@ go 1.27 | |||||
| 4 | 4 | ||||
| 5 | require ( | 5 | require ( | ||
| 6 | github.com/bnema/purego v0.11.0-bnema.4 | 6 | github.com/bnema/purego v0.11.0-bnema.4 | ||
| 7 | - | github.com/bnema/purego-libwayland v0.0.0 | 7 | + | github.com/bnema/purego-libwayland v0.1.0 |
| 8 | - | github.com/bnema/purego-vulkan v0.0.0 | 8 | + | github.com/bnema/purego-vulkan v0.4.0 |
| 9 | github.com/bnema/wlturbo v0.2.0 | 9 | github.com/bnema/wlturbo v0.2.0 | ||
| 10 | github.com/bnema/zerowrap v1.4.1 | 10 | github.com/bnema/zerowrap v1.4.1 | ||
| 11 | github.com/rs/zerolog v1.35.1 | 11 | github.com/rs/zerolog v1.35.1 | ||
| @@ -21,7 +21,3 @@ require ( | |||||
| 21 | go.yaml.in/yaml/v3 v3.0.5 // indirect | 21 | go.yaml.in/yaml/v3 v3.0.5 // indirect | ||
| 22 | gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect | 22 | gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect | ||
| 23 | ) | 23 | ) | ||
| 24 | - | ||||
| 25 | - | replace github.com/bnema/purego-libwayland => ../purego-libwayland | |||
| 26 | - | ||||
| 27 | - | replace github.com/bnema/purego-vulkan => ../purego-vulkan | |||
M go.sum +4 -0 generated file: collapsed
M packaging/arch/PKGBUILD +9 -2
| @@ -1,4 +1,4 @@ | |||
| 1 | - | # Built by `make pkg` at the repo root, from the `make dist` tarball. | |
| 1 | + | # Built by `make pkg` at the repo root, from `git archive HEAD`. | |
| 2 | 2 | pkgname=nefertty | |
| 3 | 3 | pkgver=0.0.0 | |
| 4 | 4 | pkgrel=1 | |
| @@ -17,9 +17,16 @@ optdepends=('xwayland-satellite>=0.7: X11 apps' | |||
| 17 | 17 | source=("$pkgname-$pkgver.tar.gz") | |
| 18 | 18 | sha256sums=('SKIP') | |
| 19 | 19 | ||
| 20 | + | prepare() { | |
| 21 | + | cd "$pkgname-$pkgver" | |
| 22 | + | export GOFLAGS='-mod=mod' GOWORK=off GOTOOLCHAIN=local | |
| 23 | + | go mod download | |
| 24 | + | go mod vendor | |
| 25 | + | } | |
| 26 | + | ||
| 20 | 27 | build() { | |
| 21 | 28 | cd "$pkgname-$pkgver" | |
| 22 | - | export CGO_ENABLED=0 GOFLAGS='-mod=vendor -trimpath -buildvcs=false -buildmode=pie' GOPROXY=off GOTOOLCHAIN=local | |
| 29 | + | export CGO_ENABLED=0 GOFLAGS='-mod=vendor -trimpath -buildvcs=false -buildmode=pie' GOPROXY=off GOWORK=off GOTOOLCHAIN=local | |
| 23 | 30 | go build -ldflags "-X main.version=$pkgver" -o nefertty ./cmd/nefertty | |
| 24 | 31 | } | |
| 25 | 32 | ||
| @@ -1,4 +1,4 @@ | |||||
| 1 | - | # Built by `make pkg` at the repo root, from the `make dist` tarball. | 1 | + | # Built by `make pkg` at the repo root, from `git archive HEAD`. |
| 2 | pkgname=nefertty | 2 | pkgname=nefertty | ||
| 3 | pkgver=0.0.0 | 3 | pkgver=0.0.0 | ||
| 4 | pkgrel=1 | 4 | pkgrel=1 | ||
| @@ -17,9 +17,16 @@ optdepends=('xwayland-satellite>=0.7: X11 apps' | |||||
| 17 | source=("$pkgname-$pkgver.tar.gz") | 17 | source=("$pkgname-$pkgver.tar.gz") | ||
| 18 | sha256sums=('SKIP') | 18 | sha256sums=('SKIP') | ||
| 19 | 19 | ||||
| 20 | + | prepare() { | |||
| 21 | + | cd "$pkgname-$pkgver" | |||
| 22 | + | export GOFLAGS='-mod=mod' GOWORK=off GOTOOLCHAIN=local | |||
| 23 | + | go mod download | |||
| 24 | + | go mod vendor | |||
| 25 | + | } | |||
| 26 | + | ||||
| 20 | build() { | 27 | build() { | ||
| 21 | cd "$pkgname-$pkgver" | 28 | cd "$pkgname-$pkgver" | ||
| 22 | - | export CGO_ENABLED=0 GOFLAGS='-mod=vendor -trimpath -buildvcs=false -buildmode=pie' GOPROXY=off GOTOOLCHAIN=local | 29 | + | export CGO_ENABLED=0 GOFLAGS='-mod=vendor -trimpath -buildvcs=false -buildmode=pie' GOPROXY=off GOWORK=off GOTOOLCHAIN=local |
| 23 | go build -ldflags "-X main.version=$pkgver" -o nefertty ./cmd/nefertty | 30 | go build -ldflags "-X main.version=$pkgver" -o nefertty ./cmd/nefertty | ||
| 24 | } | 31 | } | ||
| 25 | 32 | ||||