mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 13:33:12 +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.
14 lines
560 B
Bash
Executable File
14 lines
560 B
Bash
Executable File
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p curl jq
|
|
|
|
set -euo pipefail -x
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
chromium_version=$(curl -s "https://api.github.com/repos/chromium/chromium/tags" | jq -r 'map(select(.prerelease | not)) | .[1].name')
|
|
sha256=$(nix-prefetch-url "https://raw.github.com/chromium/chromium/$chromium_version/net/http/transport_security_state_static.json")
|
|
|
|
sed -e "0,/chromium_version/s/chromium_version = \".*\"/chromium_version = \"$chromium_version\"/" \
|
|
-e "0,/sha256/s/sha256 = \".*\"/sha256 = \"$sha256\"/" \
|
|
--in-place ./default.nix
|