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

Add `--allow-empty-outputs` #31

Open srid opened 10 months ago

srid commented 10 months ago

Mainly for https://github.com/srid/nixci/issues/2 - we want to sometimes allow nixci to not error out (but print only warning) when devour-flake produces no outputs.

cf.

🍎 default.macos
🐚 nix --extra-experimental-features 'nix-command flakes' build '/nix/store/p8vfkmfh43yy8lmz1r65dr9yq3ql7cd7-source#default' -L --no-link --print-out-paths --override-input flake '.?dir=examples/macos' --override-input flake/nixos-flake /nix/store/nn4hxy0cwr7blvmqjp42mvgn5yss4kb6-source --refresh -j auto️


warning: not writing modified lock file of flake 'path:/nix/store/p8vfkmfh43yy8lmz1r65dr9yq3ql7cd7-source':
this derivation will be built:
  /nix/store/vb0gvb91439nb57fldpgp42gn4hkigpb-devour-output.drv
building '/nix/store/vb0gvb91439nb57fldpgp42gn4hkigpb-devour-output.drv'...
Error: devour-flake produced an outpath (/nix/store/1s02vc584sy7nzhx81j93mk1mrwnql9g-devour-output) with no outputs

https://jenkins.srid.ca/job/nixos-flake/job/PR-39/3/console

(^ Because Jenkins Linux builder can't do macos builds)