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

Add "nix weather" command that is equivalent to "guix weather" #3752

Open
matthewbauer opened this issue Jun 25, 2020 · 3 comments
Open

Add "nix weather" command that is equivalent to "guix weather" #3752

matthewbauer opened this issue Jun 25, 2020 · 3 comments

Comments

@matthewbauer
Copy link
Member

Guix has a feature that is missing in Nix:

https://guix.gnu.org/manual/en/html_node/Invoking-guix-weather.html

guix weather is used to determine whether substitutes are available for your build at all. It can give some idea of how much resources you'll have to spend when you build a derivation.

@vcunat
Copy link
Member

vcunat commented Jun 25, 2020

I've been using nix-build --dry-run for this:

these derivations will be built:
   ...
these paths will be fetched (x MiB download, y MiB unpacked):
   ...

Unfortunately I don't know how to do it with the new nix command:

don't know how to build these paths (may be caused by read-only store access):
    /nix/store/one-path.drv!out - _apparently no cache or dependencies were inspected_

@dtzWill
Copy link
Member

dtzWill commented Jul 16, 2020

@vcunat as far as that error goes, see #3782 (and comment/linked issue there).

@stale
Copy link

stale bot commented Feb 13, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 13, 2021
matthewbauer added a commit to matthewbauer/nix that referenced this issue Apr 22, 2021
nix weather is used to figure out how much of a flake's packages are
in a substituter. This allows us to get an idea for how much we'll
have to build locally. It can be used with Nixpkgs, but also
individual projects to determine objectively how much is missing from
the cache.

Example usage is:

$ nix weather nixpkgs --substituters https://cache.nixos.org

Note that this is using derivations instead of output paths to
determine what depends on each path. This is necessary since we don't
know what dependencies a given store path will have unless it's built.

/cc @edolstra @domenkozar @vcunat @masaeedu

Fixes NixOS#3752
@stale stale bot removed the stale label Dec 5, 2022
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 a pull request may close this issue.

4 participants