Add self package to flake.nix, nix fixes, fmt#203
Conversation
484acbd to
2313f7b
Compare
yimsk
left a comment
There was a problem hiding this comment.
Thanks for adding the Nix package and installation instructions.
It would be good to add a workflow that builds the Nix package itself. The current workflows run the Go build/tests and nix develop, but they do not run nix build .#clawscli. As a result, if vendorHash becomes stale after a dependency change, CI could remain green while installation through Nix is broken.
Could we add nix build .#clawscli after the Nix setup in the Integration Test workflow and, if practical, also run the generated claws --version as a smoke test?
I also left an inline comment about limiting the package output to the claws binary.
For the skipped tests, it would be better in the long term to make them runnable in the Nix environment. However, that can be handled as a follow-up, and I do not think the current skip list needs to block this PR.
I added it as a separate job, since none of the go setup needs to happen outside of Nix anyway. |
|
Thanks! That approach works for me. |
019821c to
456793a
Compare
|
Alright, some changes:
|
456793a to
9aa78ca
Compare
* Added a `default`/`clawscli` package that builds this project. Note, `vendorHash` has to be set when the dependencies change. * Uses the same flags as in the `.goreleaser.yml` * Uses `self` for automatic version options using the hash of the current git revision. Uses the `dirtyShortRev` if it is available so that builds and versions show that there are changes to the working copy. Nix already takes care of making the output different, so no bumping versions are necessary to do `nix build ...` * Formatted the flake.nix using `nixfmt`. * Used built-in `stdenv.targetPlatform.node` variables for fetching indexion, set `meta.platforms` to limit where it can run. * Added nix info to the README. * Does replacement for /bin/echo in tests * Uses a temporary home directory in tests for config tests * Added nix checks into a separate Github actions job * Ignore nix output `result`s
9aa78ca to
1a134b0
Compare
default/clawsclipackage that builds this project. Note,vendorHashhas to be set when the dependencies change..goreleaser.ymlselffor automatic version options using the hash of the currentgit revision. Uses the
dirtyShortRevif it is available so thatbuilds and versions show that there are changes to the working copy.
Nix already takes care of making the output different, so no bumping
versions are necessary to do
nix build ...nixfmt.stdenv.targetPlatform.nodevariables for fetchingindexion, set
meta.platformsto limit where it can run.results