mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-04 14:00:04 +00:00
**This commit should cause no rebuilds.** # Moving Java overrides out of all-packages All usages of this pattern have been moved to 'let ... in' blocks. Patterns I searched for: * `jdk =` * `jdk_headless =` * `jre =` * `jfx =` The `jing` alias has been moved to aliases.nix, so update the usage of `jing` in `xmloscopy` to `jing-trang`. cassandra was ignored because that derivation involves code generation. I ignored grails, because jdk is set to null by default by an override in all-packages.nix. That package would need a slightly larger refactor to deal with. Packages with a *-native variant were ignored because those would need to be refactored. jetbrains was ignored because that might be a special case? I ignored virtualbox, because I did not want to touch the usages of the pattern for other dependencies.
21 lines
861 B
Bash
Executable File
21 lines
861 B
Bash
Executable File
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p nix nix-update
|
|
|
|
set -euxo pipefail
|
|
|
|
nix-update "${UPDATE_NIX_ATTR_PATH}"
|
|
nix-update "${UPDATE_NIX_ATTR_PATH}.npmPkg" --version=skip
|
|
|
|
FILE="$(nix-instantiate --eval -E 'with import ./. {}; (builtins.unsafeGetAttrPos "version" '"${UPDATE_NIX_ATTR_PATH}"').file' | tr -d '"')"
|
|
|
|
MVNHASH_OLD=$(nix-instantiate --eval . -A "${UPDATE_NIX_ATTR_PATH}.mvnHash" | tr -d '"')
|
|
MVNHASH_OLD_ESCAPED=$(echo "${MVNHASH_OLD}" | sed -re 's|[+]|\\&|g')
|
|
FAKEHASH=$(nix-instantiate --eval . -A "lib.fakeHash" | tr -d '"')
|
|
FAKEHASH_ESCAPED=$(echo "${FAKEHASH}" | sed -re 's|[+]|\\&|g')
|
|
|
|
sed -E -i "s|${MVNHASH_OLD_ESCAPED}|${FAKEHASH}|g" "${FILE}"
|
|
|
|
MVNHASH_NEW="$(nix-build . -A "${UPDATE_NIX_ATTR_PATH}" 2>&1 | tail -n10 | grep 'got:' | cut -d: -f2- | xargs echo || true)"
|
|
|
|
sed -E -i "s|${FAKEHASH_ESCAPED}|${MVNHASH_NEW}|g" "${FILE}"
|