Skip to content

treewide: use mirror urls#347454

Merged
fpletz merged 19 commits intoNixOS:masterfrom
pbsds:migrate-mirror-urls-1728063897
Oct 10, 2024
Merged

treewide: use mirror urls#347454
fpletz merged 19 commits intoNixOS:masterfrom
pbsds:migrate-mirror-urls-1728063897

Conversation

@pbsds
Copy link
Copy Markdown
Member

@pbsds pbsds commented Oct 9, 2024

repeat of #144825, part of #346453, should be 0 rebuilds

Candidates were made with

#!/usr/bin/env bash

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

and cherry-picked. Tested with nix-prefetch-url ... | xargs nix hash to-sri --type sha256

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. label Oct 9, 2024
@pbsds pbsds marked this pull request as ready for review October 9, 2024 10:09
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Oct 9, 2024
@fpletz fpletz merged commit ae8c1e5 into NixOS:master Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: lua Lua is a powerful, efficient, lightweight, embeddable scripting language. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants