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

treewide: remove all cargoSha256 usage #323983

Merged
merged 7 commits into from
Jul 4, 2024

Commits on Jul 3, 2024

  1. Configuration menu
    Copy the full SHA
    a9709c2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5b63ef2 View commit details
    Browse the repository at this point in the history
  3. treewide: convert cargoSha256 to cargoHash

    This is done with the following bash script:
    
    ```
    #!/usr/bin/env bash
    process_line() {
        local filename=${1%:}
        if [[ $4 =~ \"(.*)\"\; ]]; then
          local sha256="${BASH_REMATCH[1]}"
        fi
        [[ -z $sha256 ]] && return 0
        local hash=$(nix hash to-sri --type sha256 $sha256)
        echo "Processing: $filename"
        echo "  $sha256 => $hash"
        sed -i "s|cargoSha256 = \"$sha256\"|cargoHash = \"$hash\"|"
    $filename
    }
    
    # split output by line
    grep -r 'cargoSha256 = ' . | while IFS= read -r line; do
        # split them further by space
        read -r -a parts <<< "$line"
        process_line "${parts[@]}"
    done
    
    ```
    Aleksanaa committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    1862813 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ede1ffb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    07fddc6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cb93149 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f6ee8a0 View commit details
    Browse the repository at this point in the history