treewide: default.nix -> package.nix in pkgs/by-name

We need to remember to go over all the update scripts once the mass-by-name migration has happened
This commit is contained in:
Peder Bergebakken Sundt 2024-08-18 18:09:17 +02:00
parent 5611feb0b6
commit 7020a1d893
3 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
## Updating the CLI
- Update `version` and `src.hash` in default.nix
- Update `version` and `src.hash` in package.nix
- Check out the changes made to the azure-cli [setup.py](https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/setup.py) since the last release
- Try build the CLI, will likely fail with `ModuleNotFoundError`, for example
```

View File

@ -17,7 +17,7 @@ if [ ! "$OLD_VERSION" = "$LATEST_VERSION" ]; then
SPEC_SHA256=$(nix hash to-sri --type sha256 $SPEC_SHA256)
setKV () {
sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" "${FLUXCD_PATH}/default.nix"
sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" "${FLUXCD_PATH}/package.nix"
}
setKV version ${LATEST_VERSION}
@ -40,7 +40,7 @@ if [ ! "$OLD_VERSION" = "$LATEST_VERSION" ]; then
# `git` flag here is to be used by local maintainers to speed up the bump process
if [ $# -eq 1 ] && [ "$1" = "git" ]; then
git switch -c "package-fluxcd-${LATEST_VERSION}"
git add "$FLUXCD_PATH"/default.nix
git add "$FLUXCD_PATH"/package.nix
git commit -m "fluxcd: ${OLD_VERSION} -> ${LATEST_VERSION}
Release: https://github.com/fluxcd/flux2/releases/tag/v${LATEST_VERSION}"

View File

@ -14,13 +14,13 @@ if [[ "$currentVersion" == "$latestVersion" ]]; then
exit 0
fi
sed -i "s/version = \".*\"/version = \"${latestVersion}\"/" "$ROOT/default.nix"
sed -i "s/version = \".*\"/version = \"${latestVersion}\"/" "$ROOT/package.nix"
DARWIN_x64_URL="https://github.com/localsend/localsend/releases/download/v${latestVersion}/LocalSend-${latestVersion}.dmg"
DARWIN_X64_SHA=$(nix hash to-sri --type sha256 $(nix-prefetch-url ${DARWIN_x64_URL}))
sed -i "/darwin/,/hash/{s|hash = \".*\"|hash = \"${DARWIN_X64_SHA}\"|}" "$ROOT/default.nix"
sed -i "/darwin/,/hash/{s|hash = \".*\"|hash = \"${DARWIN_X64_SHA}\"|}" "$ROOT/package.nix"
GIT_SRC_URL="https://github.com/localsend/localsend/archive/refs/tags/v${latestVersion}.tar.gz"
GIT_SRC_SHA=$(nix hash to-sri --type sha256 $(nix-prefetch-url --unpack ${GIT_SRC_URL}))
sed -i "/linux/,/hash/{s|hash = \".*\"|hash = \"${GIT_SRC_SHA}\"|}" "$ROOT/default.nix"
sed -i "/linux/,/hash/{s|hash = \".*\"|hash = \"${GIT_SRC_SHA}\"|}" "$ROOT/package.nix"
curl https://raw.githubusercontent.com/localsend/localsend/v${latestVersion}/app/pubspec.lock | yq . > $ROOT/pubspec.lock.json