git bisect start $BAD $GOOD && git bisect run $CMD
either:
- nix-bisect: smartly pick
bisect bad/skip
in automated bisects and give nicer outputs - hydrasect: prioritize cached commits in nixpkgs bisects - unfortunately still lacks nix package/flake
- after each checkout run
git checkout $(hydrasect-search | head -1)
- after each checkout run
- nixpkgs-staging-bisecter: like hydrasect but minimize how many derivations you will build even in staging
- run in
nixpkgs
repo, e.g. forsignal-desktop
:
cat >> .test<< EOF
#! /usr/bin/env bash
$(nix-build -A signal-desktop)/bin/signal-desktop --use-tray-icon --no-sandbox
EOF
chmod +x ./test
git bisect start -- pkgs/applications/networking/instant-messengers/signal-desktop/
git bisect bad
git bisect run sh -c './test; [ $? -eq 0 ]'
From the dependency's repo, run:
nix --extra-experimental-features 'nix-command flakes' shell nixpkgs#git
git bisect start $BAD $GOOD
export DEPENDENCY_INPUT=nixpkgs
export DEPENDENCY_URL=https://github.com/NixOS/nixpkgs
export SYSTEM_REPO=<MY_SYSTEM_FLAKE_REPO_PATH>
export DEPENDENCY_PATH=<DEPENDENCY_REPO_PATH>
# if judgement needs manual intervention, cycles of:
$SYSTEM_REPO/bisect.sh $DEPENDENCY_PATH $DEPENDENCY_URL $SYSTEM_REPO
# nix --extra-experimental-features 'nix-command flakes' shell nixpkgs#git -- checkout $(hydrasect-search | head -1)
# ^ if the dep is nixpkgs
# <TEST>
git bisect good
git bisect bad
# if judgement can be automated:
git bisect run "$SYSTEM_REPO/bisect.sh $DEPENDENCY_PATH $DEPENDENCY_URL $SYSTEM_REPO && <COMMAND>"