Write a script that runs nix flake check with nix-eval-jobs #25

Open
opened 2024-03-12 18:05:58 +00:00 by jade · 2 comments
Owner

Currently nix flake check is very slow to evaluate in this repo, and it needs more nix-eval-jobs in its existence.

Though some parts of x86_64-darwin checks don't evaluate currently due to libsystemcross.

Currently nix flake check is very slow to evaluate in this repo, and it needs more nix-eval-jobs in its existence. Though some parts of x86_64-darwin checks don't evaluate currently due to `libsystemcross`.
jade added the
devx
label 2024-03-12 18:05:58 +00:00
Author
Owner

quoth @puck:

nix-eval-jobs --extra-experimental-features flakes --force-recurse --flake .#checks | jq -r 'select(.system == "x86_64-linux") | .drvPath' | xargs nix-build
quoth @puck: ``` nix-eval-jobs --extra-experimental-features flakes --force-recurse --flake .#checks | jq -r 'select(.system == "x86_64-linux") | .drvPath' | xargs nix-build ```
Author
Owner

quoth pennae:

tests=$(
    nix eval --json --impure \
        --apply '
            let f = n: t:
                if __isAttrs t
                then (if t.type or "" == "derivation"
                    then (if t.system == __currentSystem
                            then [ n ]
                            else [])
                    else __concatMap (m: f "${n}.${m}" t.${m}) (__attrNames t))
                else [];
            in f ".#hydraJobs.tests"
        ' \
        .#hydraJobs.tests \
        | jq -r '.[]'
)

nix build --no-link -L ${tests[@]}
quoth pennae: ```bash tests=$( nix eval --json --impure \ --apply ' let f = n: t: if __isAttrs t then (if t.type or "" == "derivation" then (if t.system == __currentSystem then [ n ] else []) else __concatMap (m: f "${n}.${m}" t.${m}) (__attrNames t)) else []; in f ".#hydraJobs.tests" ' \ .#hydraJobs.tests \ | jq -r '.[]' ) nix build --no-link -L ${tests[@]} ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#25
No description provided.