forked from mirrors/nixpkgs
erlang: add updateScript and update versions (#118831)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
a3e9412a4e
commit
a7b54d9016
|
@ -22,8 +22,8 @@ let
|
|||
};
|
||||
|
||||
in mkDerivation {
|
||||
version = "18.3.4.8";
|
||||
sha256 = "16c0h25hh5yvkv436ks5jbd7qmxzb6ndvk64mr404347a20iib0g";
|
||||
version = "18.3.4.11";
|
||||
sha256 = "190xbv77v5x2g8xkzdg9bpwa1ylkc18d03ag2a0frcwcv76x53k1";
|
||||
|
||||
patches = [
|
||||
rmAndPwdPatch
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{ mkDerivation, fetchpatch }:
|
||||
|
||||
mkDerivation {
|
||||
version = "19.3.6.11";
|
||||
sha256 = "0b02iv8dly1vkc2xnqqi030sdj34h4gji2h4qgilllajr1f868vm";
|
||||
version = "19.3.6.13";
|
||||
sha256 = "1zbg54p7pdr8bjyrxvi7vs41vgamqa8lsynnm6ac6845q0xwpwid";
|
||||
|
||||
patches = [
|
||||
# macOS 10.13 crypto fix from OTP-20.1.2
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
version = "20.3.8.9";
|
||||
sha256 = "0v2iiyzss8hiih98wvj0gi2qzdmmhh7bvc9p025wlfm4k7r1109a";
|
||||
version = "20.3.8.26";
|
||||
sha256 = "062405s59hkdkmw2dryq0qc1k03jsncj7yqisgj35x9sqpzm4w7a";
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace configure.in --replace '`sw_vers -productVersion`' "''${MACOSX_DEPLOYMENT_TARGET:-10.12}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
version = "21.3.8.21";
|
||||
sha256 = "sha256-zQCs2hOA66jxAaxl/B42EKCejAktIav2rpVQCNyKCh4=";
|
||||
version = "21.3.8.22";
|
||||
sha256 = "sha256-k6dChY/ogWqmcNz9P3t+p9C7oywXhR5oqdBfNtkh6I4=";
|
||||
}
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
# How to obtain `sha256`:
|
||||
# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz
|
||||
mkDerivation {
|
||||
version = "22.3.4.16";
|
||||
sha256 = "sha256-V0RwEPfjnHtEzShNh6Q49yGC5fbt2mNR4xy6f6iWvck=";
|
||||
version = "22.3.4.17";
|
||||
sha256 = "sha256-YhKU9I4qN+TVG3t//t9htUBkOu8DS75vbn/qWvS1zc0=";
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
, libGL ? null, libGLU ? null, wxGTK ? null, wxmac ? null, xorg ? null
|
||||
, parallelBuild ? false
|
||||
, systemd, wxSupport ? true
|
||||
# updateScript deps
|
||||
, writeScript, common-updater-scripts, coreutils, git
|
||||
}:
|
||||
{ baseName ? "erlang"
|
||||
, version
|
||||
|
@ -103,6 +105,24 @@ in stdenv.mkDerivation ({
|
|||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
passthru = {
|
||||
updateScript =
|
||||
let major = builtins.head (builtins.splitVersion version);
|
||||
in writeScript "update.sh" ''
|
||||
#!${stdenv.shell}
|
||||
set -ox errexit
|
||||
PATH=${lib.makeBinPath [ common-updater-scripts coreutils git gnused ]}
|
||||
latest=$(list-git-tags https://github.com/erlang/otp.git | sed -n 's/^OTP-${major}/${major}/p' | sort -V | tail -1)
|
||||
if [ "$latest" != "${version}" ]; then
|
||||
nixpkgs="$(git rev-parse --show-toplevel)"
|
||||
nix_file="$nixpkgs/pkgs/development/interpreters/erlang/R${major}.nix"
|
||||
update-source-version ${baseName}R${major} "$latest" --version-key=version --print-changes --file="$nix_file"
|
||||
else
|
||||
echo "${baseName}R${major} is already up-to-date"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; ({
|
||||
homepage = "https://www.erlang.org/";
|
||||
downloadPage = "https://www.erlang.org/download.html";
|
||||
|
|
Loading…
Reference in a new issue