mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-01 10:34:16 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
32 lines
697 B
Bash
Executable File
32 lines
697 B
Bash
Executable File
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p jq
|
|
#shellcheck shell=bash
|
|
|
|
CURRENT_HASH=""
|
|
|
|
print_hash() {
|
|
OS="$1"
|
|
ARCH="$2"
|
|
VERSION="$3"
|
|
|
|
URL="https://github.com/fermyon/spin/releases/download/v${VERSION}/spin-v${VERSION}-${OS}-${ARCH}.tar.gz"
|
|
echo
|
|
CURRENT_HASH=$(nix store prefetch-file "$URL" --json | jq -r '.hash')
|
|
|
|
echo "${ARCH}-${OS}: $CURRENT_HASH"
|
|
}
|
|
|
|
if [[ -z "$VER" && -n "$1" ]]; then
|
|
VER="$1"
|
|
fi
|
|
|
|
if [[ -z "$VER" ]]; then
|
|
echo "No 'VER' environment variable provided, skipping"
|
|
else
|
|
print_hash "linux" "amd64" "$VER"
|
|
print_hash "linux" "aarch64" "$VER"
|
|
print_hash "macos" "amd64" "$VER"
|
|
print_hash "macos" "aarch64" "$VER"
|
|
fi
|
|
|