question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Caching `/nix/store` is ok, but unable to restore it.

See original GitHub issue

Hi,

I’m trying to improve the workflow in here: https://github.com/hmemcpy/milewski-ctfp-pdf/blob/master/.github/workflows/build.yaml

Basically I would like to cache the build dependencies once, and re-use them in each book editions (8), so there is no need to download 8 times the same thing.

Caching the /nix/store directory works: https://github.com/drupol/milewski-ctfp-pdf/runs/5348859880?check_suite_focus=true

image

Restoring it fails: https://github.com/drupol/milewski-ctfp-pdf/runs/5348868521?check_suite_focus=true

image

Do you have any idea on how I could fix this ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:10

github_iconTop GitHub Comments

5reactions
tpwrulescommented, Sep 11, 2022

My solution is unnecessarily slow and complicated.

This issue could be resolved easily by running the tar in the creation and untar in the restore with root privileges using sudo. Is this not an acceptable solution?

This would also solve #629 and #324 .

5reactions
drupolcommented, Mar 13, 2022

Do you think it would be a good idea to automatized these steps the Github Action (https://github.com/cachix/install-nix-action) from @domenkozar ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

cache.nixos.org sometimes unreachable · Issue #14874
I'm having this problem right now: Trying to install NixOS on my laptop but keep getting cannot resolve cache.nixos.org .
Read more >
Caching /nix/store in GitHub actions - Help - NixOS Discourse
I'd guess you generally can't recover pathes that are not owned by the build user, this is unrelated to nix and just how...
Read more >
Frequently Asked Questions — nix.dev documentation
What to do if a binary cache is down or unreachable? How do I add a new binary cache? How do I force...
Read more >
Using nix-store --restore to install sources - Stack Overflow
I find that "permission denied" to be a bit odd - I have normal rights to install, indeed to delete (above)... But it's...
Read more >
Caching Nix Packages - Scrive Nix Workshop - GitHub Pages
Everything looks fine so far. But in fact fib(0) to fib(3) have not yet been cached in our store. So Nix will still...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found