srid / nixci

Define and build CI for Nix projects anywhere; superceded by Omnix https://omnix.page/om/ci.html
GNU Affero General Public License v3.0
109 stars 5 forks source link

CLI output: replace "devour-flake" bin with actual `nix build` CLI #15

Closed srid closed 1 year ago

srid commented 1 year ago

Instead of (invoking and) outputting /nix/store/ck09gl4npw5fff765xrws5wfl61mkcji-devour-flake/bin/devour-flake, this should do the invocation of and output the underlying nix build (used by devour-flake) directly. So the user is shown the actual nix build command being run, without a nix wrapper.

image
❯ cat /nix/store/ck09gl4npw5fff765xrws5wfl61mkcji-devour-flake/bin/devour-flake
#!/nix/store/mxvgjwzdvrl81plvgqnzbrqb14ccnji6-bash-5.2-p15/bin/bash
set -o errexit
set -o nounset
set -o pipefail

export PATH="/nix/store/bf6vm3ndlrqrv41mswkfyz4agl5q7ahc-nix-2.15.1/bin:$PATH"

FLAKE="$1"
shift 1 || true

nix build /nix/store/434dj1k9jgz7sra9rmgx8xql33y09ypj-5jiq0xmj046lw8lfjcps5fih52kcbl9f-source#default \
  "$@" \
  -L --no-link --print-out-paths \
  --override-input flake "$FLAKE" \
  | xargs cat