Repository navigation
amcli for Nix and the AUR - #2207
Merged
Merged
Conversation
The repository is a flake that installs the latest release's build of amcli on x86-64, ARM64 and ARMv7 Linux: nix run github:asc-community/AngouriMath -- simp "x + x". It fetches the release's self-contained archive, whose version and SHA-256 are in Sources/Terminal/AngouriMath.Terminal/packaging/release.json, patches it for the store, and wraps it with the ICU and OpenSSL the runtime opens by name. It is not stripped: the assemblies are executable in the archive, and strip rewrites a PE file it is given. render-pkgbuild.sh writes the PKGBUILD of the AUR's amcli-bin for a release, from the same archives, with the man page, the completion script and the licence fetched from the tag. The Terminal release workflow renders both after the build, in a job that can only read, and on a release publishes them in one that runs no code from the repository: release.json goes to master by a pull request, and the PKGBUILD is pushed to the AUR where the repository has the AUR_SSH_KEY secret, against the AUR's published host key. Part of #1660 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2207 +/- ##
==========================================
- Coverage 86.57% 86.56% -0.02%
==========================================
Files 301 301
Lines 66838 66838
Branches 19410 19410
==========================================
- Hits 57864 57856 -8
- Misses 4879 4887 +8
Partials 4095 4095
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1660: Nix and the AUR, rendered from the release by the Terminal's release workflow, as suggested there. The Debian half was done before: the
.debinstallsamcli, passes its arguments, and carries the man page and the completion script.Nix. The repository is a flake:
It installs the latest release's self-contained archive on x86-64, ARM64 and ARMv7 Linux, at the version and SHA-256 in
Sources/Terminal/AngouriMath.Terminal/packaging/release.json(2.6.0 now). It is patched for the store, wrapped with the ICU and OpenSSL the runtime opens by name, and not stripped.striprewrites a PE file it is given, and a strippedSystem.Private.CoreLib.dllis a bad image to the runtime: that was the first build's failure.AUR.
packaging/render-pkgbuild.sh VERSION SHA_X64 SHA_ARM64 SHA_ARMwrites the PKGBUILD ofamcli-bin. It installs to/opt/amcliwith/usr/bin/amcli, the man page, the completion and the licence, all from the tag.The workflow. Two jobs are added to
TerminalNightly.yml:TerminalPackagesRenderruns on every run, so on this PR too. It can only read. It rendersrelease.json, the PKGBUILD and its.SRCINFO(bymakepkg --printsrcinfoin an Arch container) and keeps them as an artifact.TerminalPackagesPublishruns with a release and runs no code from the repository. It opens a PR movingrelease.jsonto the release; workflows may open PRs here. Where the repository has anAUR_SSH_KEYsecret, it pushes the PKGBUILD toaur.archlinux.org/amcli-bin.git, after checking the AUR's published Ed25519 host key.What only a maintainer can do: create the AUR account that owns
amcli-bin, register an SSH key with it, and add the private key as theAUR_SSH_KEYsecret. Until then nothing is pushed, and the readme does not mention the AUR.Checked locally, against the 2.6.0 release:
nix buildandnix runinnixos/nix.amcli simp "x + x"gives2 * xfrom another directory, the man page and the completion are installed, and the interactive terminal starts its F# kernel under a pseudo-terminal.makepkginarchlinux:base-devel, with the 2.6.0 PKGBUILD the script renders. Every source's hash verifies,pacman -Uinstalls it, andamcli simp "x + x"gives2 * x.release.jsonand that PKGBUILD byte for byte.actionlint1.7.7 on the workflow: clean.No library code changes, so there is no chain run. The check here is this PR's own run of the Terminal workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura