Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write built packages to file #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nrdxp
Copy link

@nrdxp nrdxp commented Oct 30, 2022

This is useful for e.g. running nix copy after the build. Only packages that do not have preferLocalBuild = true are written to avoid copying useless paths to a cache.

This real world example is already making use of this changeset:
https://github.com/nrdxp/nrdos/blob/master/.github/actions/nix/run.sh

nrdxp added 2 commits October 30, 2022 15:42
These derivations are never pulled from a cache, so there is no need
to waste cycles uploading them to a cache.
@Mic92
Copy link
Owner

Mic92 commented Oct 31, 2022

Btw. I am using --check-cache-status in nix-eval-jobs as a replacement for nix-build-uncached, so I personally don't really have a use for this project anymore.

for drv := range missingDrvs {
c := exec.Command("nix", "show-derivation", "--experimental-features", "nix-command", drv)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are already adding third-party dependencies, it would be more straight forward to parse the derivation file directly using https://github.com/nix-community/go-nix#pkgderivation

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah, didn't realize that was an option, good idea.

@Mic92
Copy link
Owner

Mic92 commented Sep 20, 2023

also check out nix-fast-build. Maybe it already does what you need (needs flakes though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants