From e633d97cb382f237e33e98f2a9efd3b86cfabd8a Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Sun, 11 Apr 2021 13:59:38 +0000 Subject: [PATCH] julia: remove julia_15 update script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provides very little comfort compared what is outlined in the manualĀ [1], only supports a single version, and would probably be better to implement as a general Nixpkg tool. [1]: https://nixos.org/manual/nixpkgs/stable/#sec-source-hashes --- .../development/compilers/julia/update-1.5.py | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100755 pkgs/development/compilers/julia/update-1.5.py diff --git a/pkgs/development/compilers/julia/update-1.5.py b/pkgs/development/compilers/julia/update-1.5.py deleted file mode 100755 index e37f37d456b..00000000000 --- a/pkgs/development/compilers/julia/update-1.5.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i python3 -p python3 python3Packages.requests - -import os -import re -import requests -import subprocess - -latest = requests.get("https://api.github.com/repos/JuliaLang/julia/releases/latest").json()["tag_name"] -assert latest[0] == "v" -major, minor, patch = latest[1:].split(".") -assert major == "1" -# When a new minor version comes out we'll have to refactor/copy this update script. -assert minor == "5" - -sha256 = subprocess.check_output(["nix-prefetch-url", "--unpack", f"https://github.com/JuliaLang/julia/releases/download/v{major}.{minor}.{patch}/julia-{major}.{minor}.{patch}-full.tar.gz"], text=True).strip() - -nix_path = os.path.join(os.path.dirname(__file__), "1.5.nix") -nix0 = open(nix_path, "r").read() -nix1 = re.sub("maintenanceVersion = \".*\";", f"maintenanceVersion = \"{patch}\";", nix0) -nix2 = re.sub("src_sha256 = \".*\";", f"src_sha256 = \"{sha256}\";", nix1) -open(nix_path, "w").write(nix2)