treewide: use mirror URLs where available#144825
Merged
lovesegfault merged 1 commit intoNixOS:masterfrom Nov 6, 2021
Merged
Conversation
Candidates identified with git grep -F "$(grep -v '#' pkgs/build-support/fetchurl/mirrors.nix | grep -v nixos.org | grep :// | cut -d '"' -f 2)" and then manually reviewed and tested.
This was referenced Oct 4, 2024
pbsds
added a commit
to pbsds/nixpkgs
that referenced
this pull request
Mar 3, 2025
repeat of NixOS#144825, part of NixOS#346453, should be 0 rebuilds Madie using ``` export NIXPKGS_ALLOW_UNFREE=1 export NIXPKGS_ALLOW_INSECURE=1 export NIXPKGS_ALLOW_BROKEN=1 git reset git restore . nix eval -f pkgs/build-support/fetchurl/mirrors.nix --json | jq ' to_entries[] | .key as $key | .value[] | @sh "rg \(.) -l pkgs/ -tnix | xe sd \(.) mirror://\($key)/" ' -r | bash -x git restore -- pkgs/build-support/fetchurl/mirrors.nix git restore -- pkgs/applications/networking/browsers/ git restore -- pkgs/development/haskell-modules/ test -s packages.json || ( set -x; time nix-env --extra-experimental-features no-url-literals --option system x86_64-linux -f ./. -qaP --json --meta --show-trace --no-allow-import-from-derivation > packages.json ) MODIFIED="$(git ls-files --modified)" jq <packages.json 'to_entries[] | select(.value.meta.position==null|not) | "\(.key)\t\(.value.meta.position)"' -r | sed -e "s#\t$(realpath .)/#\t#" | sed -e 's#:\([0-9]*\)$#\t\1#' | grep --fixed-strings "$MODIFIED" | while read attrpath position col; do if test -z $(git diff -- "$position"); then continue fi if nix-build . -A "$attrpath".src \ && nix-build . -A "$attrpath".src --check \ && nix-build . -A "$attrpath".patches \ && nix-build . -A "$attrpath".patches --check then git add -- "$position" else git reset -- "$position" git restore -- "$position" fi done ``` Then I verified the FOD hashes for each `--patch` i accepted. FOD hash verification: ``` $ nix-prefetch-url $(nix eval -f default.nix activemq.src.url --raw | tee >( cat >&2; echo >&2 )) | xargs nix hash to-sri --type sha256 mirror://apache/activemq/6.1.5/apache-activemq-6.1.5-bin.tar.gz path is '/nix/store/gmh0hzsglbfyrcqkjiyf0kvwcyqqgz5p-apache-activemq-6.1.5-bin.tar.gz' sha256-JrLLSm6+Be1vSBTTryRcZfbiGK0PrmJ/pM2uYnGuN9E= $ nix-prefetch-url $(nix eval -f default.nix libxmlxx5.src.url --raw | tee >( cat >&2; echo >&2 )) | xargs nix hash to-sri --type sha256 mirror://gnome/sources/libxml++/5.4/libxml++-5.4.0.tar.xz path is '/nix/store/8zy5makss1dcijprf5bilz5qqz59xg2p-libxml++-5.4.0.tar.xz' sha256-6aI8Q2aGqUaY0hOOa8uvhJEh1jv6D1DcNP77/XlWaEg= ```
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Candidates identified with
and then manually reviewed and tested.
Motivation for this change
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)