nixpkgs/pkgs/development/tools/misc/netcoredbg/update.sh
Konrad Malik e34328aa3a
netcoredbg: 2.0.0-895 -> 2.2.0-961
* arm64.patch for compilation on aarch64-*
* darwin.patch for properly detecting possible arm64 darwin architectures
* coreclr is now in dotnet/runtime repo (using 7.x branch as per netcoredbg recommendation)
* netcoredbg now depends (during runtime) on DbgShim which was moved to a separate repo (dotnet/diagnostic). We need to pass -p:UseDbgShimDependency=true in order to include it in a list of deps.
* needed to enable selfContainedBuild for the managed part since it seems like it's the easiest way to force dotnet to copy relevant binaries to the out folder as well (like libdbgshim.so retrieved via the abovementioned nuget dependency)
* use autoPatchelfHook to add stdenv.cc.cc.lib to binaries
2023-03-07 11:28:44 +01:00

38 lines
846 B
Bash
Executable File

#! /usr/bin/env nix-shell
#! nix-shell -I nixpkgs=./. -i bash -p common-updater-scripts
# shellcheck shell=bash
set -euo pipefail
pname=$1
old_version=$2
url=$3
cd "$(dirname "${BASH_SOURCE[0]}")"
deps_file="$(realpath "./deps.nix")"
new_version="$(list-git-tags --url="$url" | sort --reverse --numeric-sort | head -n 1)"
if [[ "$new_version" == "$old_version" ]]; then
echo "Already up to date!"
exit 0
fi
updateVersion() {
sed -i "s/version = \"$old_version\";/version = \"$new_version\";/g" default.nix
}
updateHash() {
hashKey="hash"
hash=$(nix-prefetch-url --unpack --type sha256 "$url/archive/$new_version.tar.gz")
sed -i "s|$hashKey = \"[a-zA-Z0-9\/+-=]*\";|$hashKey = \"$hash\";|g" default.nix
}
updateVersion
updateHash
cd ../../../../../
$(nix-build -A "$pname".fetch-deps --no-out-link) "$deps_file"