Skip to content

amcli for Nix and the AUR - #2207

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
amcli-for-nix-and-the-aur
Oct 29, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
amcli-for-nix-and-the-aur

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

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 .deb installs amcli, passes its arguments, and carries the man page and the completion script.

Nix. The repository is a flake:

nix run github:asc-community/AngouriMath -- simp "x + x"
nix profile install github:asc-community/AngouriMath

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. strip rewrites a PE file it is given, and a stripped System.Private.CoreLib.dll is a bad image to the runtime: that was the first build's failure.

AUR. packaging/render-pkgbuild.sh VERSION SHA_X64 SHA_ARM64 SHA_ARM writes the PKGBUILD of amcli-bin. It installs to /opt/amcli with /usr/bin/amcli, the man page, the completion and the licence, all from the tag.

The workflow. Two jobs are added to TerminalNightly.yml:

  • TerminalPackagesRender runs on every run, so on this PR too. It can only read. It renders release.json, the PKGBUILD and its .SRCINFO (by makepkg --printsrcinfo in an Arch container) and keeps them as an artifact.
  • TerminalPackagesPublish runs with a release and runs no code from the repository. It opens a PR moving release.json to the release; workflows may open PRs here. Where the repository has an AUR_SSH_KEY secret, it pushes the PKGBUILD to aur.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 the AUR_SSH_KEY secret. Until then nothing is pushed, and the readme does not mention the AUR.

Checked locally, against the 2.6.0 release:

  • nix build and nix run in nixos/nix. amcli simp "x + x" gives 2 * x from another directory, the man page and the completion are installed, and the interactive terminal starts its F# kernel under a pseudo-terminal.
  • makepkg in archlinux:base-devel, with the 2.6.0 PKGBUILD the script renders. Every source's hash verifies, pacman -U installs it, and amcli simp "x + x" gives 2 * x.
  • The render step's own commands, run on the 2.6.0 archives, reproduce the committed release.json and that PKGBUILD byte for byte.
  • actionlint 1.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

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
@Rafael-SOWNet Rafael-SOWNet moved this from Todo to In review in AngouriMath Oct 29, 2026
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.56%. Comparing base (d9ff463) to head (a5d1b2e).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            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              
Flag Coverage Δ
cpp 37.77% <ø> (ø)
csharp 87.11% <ø> (-0.02%) ⬇️
fsharp 32.97% <ø> (ø)
interactive 40.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Rafael-SOWNet
Rafael-SOWNet merged commit 63089c1 into master Oct 29, 2026
32 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in AngouriMath Oct 29, 2026
@Rafael-SOWNet
Rafael-SOWNet deleted the amcli-for-nix-and-the-aur branch October 29, 2026 19:02
@Rafael-SOWNet Rafael-SOWNet mentioned this pull request Oct 29, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant