Skip to content

Allow supporting nix-build-uncached #9

@ipetkov

Description

@ipetkov

The current devour-flake build script is hostile to performing incremental CI builds because building the top level derivation requires fully downloading all derivations from the flake (if there are many such derivations or their artifacts are large, the CI is going to waste cycles and bandwidth downloading artifacts from the cache).

A better approach would be for the script to still evaluate the all-encompassing-derivation but instead of building it directly, it should output only the input derivations. Then the caller can do whatever they want with those actual derivations (pass them to nix build or nix-build-uncached etc.).

For example:

FLAKE="$1"
shift 1 || true

nix derivation show ${./.}#default \
  "$@" \
  --override-input flake "$FLAKE" \ |
  jq 'to_entries[].value.inputDrvs | to_entries[].key'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions