Last active
February 16, 2023 15:27
-
-
Save erikarvstedt/63786344ef1a9b852310d02581443eac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Build a Nix derivation without binary cache substitution | |
# Use a separate, temporary Nix store, so we can debug derivations that are already | |
# available in the main store | |
store="--store /tmp/store" | |
sudo rm -rf /tmp/store | |
# Fetch all build deps from the binary cache | |
nix print-dev-env $store --substitute myflake#output >/dev/null | |
# Build just the drv, without substitution | |
nix build --no-link --print-out-paths -L $store --no-substitute myflake#output | |
# Cleanup | |
sudo rm -rf /tmp/store |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment