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

nix-prefetch: make fit for flakes #95137

Merged
merged 1 commit into from Aug 11, 2020
Merged

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Aug 11, 2020

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

I did the following

./result/bin/nix-prefetch fetchFromGitHub --owner b4b4r07 --repo enhancd
warning: unknown setting 'experimental-features'
warning: unknown setting 'experimental-features'
The fetcher will be called as follows:
> fetchFromGitHub {
>   owner = "b4b4r07";
>   repo = "enhancd";
>   rev = "f0f894029d12eecdc36c212fa3ad14f55468d1b7";
>   sha256 = "0000000000000000000000000000000000000000000000000000";
> }

sha256-y/NZN1lRirO24jDT90ozz65sWgi1Sqp6H5JYOYZyYuI=

I guess the warning is because this expression has the stable nix wrapped while my system is using nixUnstable.

Also doing msteen/nix-prefetch@4b5373e in this expression would alleviate this, wonder what your thoughts are on this.

@Mic92
Copy link
Member Author

Mic92 commented Aug 11, 2020

I did the following

./result/bin/nix-prefetch fetchFromGitHub --owner b4b4r07 --repo enhancd
warning: unknown setting 'experimental-features'
warning: unknown setting 'experimental-features'
The fetcher will be called as follows:
> fetchFromGitHub {
>   owner = "b4b4r07";
>   repo = "enhancd";
>   rev = "f0f894029d12eecdc36c212fa3ad14f55468d1b7";
>   sha256 = "0000000000000000000000000000000000000000000000000000";
> }

sha256-y/NZN1lRirO24jDT90ozz65sWgi1Sqp6H5JYOYZyYuI=

I guess the warning is because this expression has the stable nix wrapped while my system is using nixUnstable.

Also doing msteen/nix-prefetch@4b5373e in this expression would alleviate this, wonder what your thoughts are on this.

Adding nixUnstable to the path won't work because command line flags are not compatible with this nix-prefetch.

@worldofpeace
Copy link
Contributor

path

Ahh right.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

All good, seems to be the way to go.

@worldofpeace worldofpeace merged commit c1c96de into NixOS:master Aug 11, 2020
@Mic92 Mic92 deleted the nix-prefetch branch August 11, 2020 09:05
@colemickens
Copy link
Member

Yes! Thank you both!

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.

None yet

3 participants