Merge pull request #207359 from KarlJoad/octavePackages/auto-update-script
Octave packages: auto update script and fixes
This commit is contained in:
commit
7a88e40dd6
468
maintainers/scripts/update-octave-packages
Executable file
468
maintainers/scripts/update-octave-packages
Executable file
@ -0,0 +1,468 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell update-octave-shell.nix -i python3
|
||||
|
||||
"""
|
||||
Update a Octave package expression by passing in the `.nix` file, or the directory containing it.
|
||||
You can pass in multiple files or paths.
|
||||
|
||||
You'll likely want to use
|
||||
``
|
||||
$ ./update-octave-libraries ../../pkgs/development/octave-modules/**/default.nix
|
||||
``
|
||||
to update all non-pinned libraries in that folder.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
import requests
|
||||
import yaml
|
||||
from concurrent.futures import ThreadPoolExecutor as Pool
|
||||
from packaging.version import Version as _Version
|
||||
from packaging.version import InvalidVersion
|
||||
from packaging.specifiers import SpecifierSet
|
||||
import collections
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
INDEX = "https://raw.githubusercontent.com/gnu-octave/packages/main/packages"
|
||||
"""url of Octave packages' source on GitHub"""
|
||||
|
||||
EXTENSIONS = ['tar.gz', 'tar.bz2', 'tar', 'zip']
|
||||
"""Permitted file extensions. These are evaluated from left to right and the first occurance is returned."""
|
||||
|
||||
PRERELEASES = False
|
||||
|
||||
GIT = "git"
|
||||
|
||||
NIXPGKS_ROOT = subprocess.check_output(["git", "rev-parse", "--show-toplevel"]).decode('utf-8').strip()
|
||||
|
||||
import logging
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
|
||||
class Version(_Version, collections.abc.Sequence):
|
||||
|
||||
def __init__(self, version):
|
||||
super().__init__(version)
|
||||
# We cannot use `str(Version(0.04.21))` because that becomes `0.4.21`
|
||||
# https://github.com/avian2/unidecode/issues/13#issuecomment-354538882
|
||||
self.raw_version = version
|
||||
|
||||
def __getitem__(self, i):
|
||||
return self._version.release[i]
|
||||
|
||||
def __len__(self):
|
||||
return len(self._version.release)
|
||||
|
||||
def __iter__(self):
|
||||
yield from self._version.release
|
||||
|
||||
|
||||
def _get_values(attribute, text):
|
||||
"""Match attribute in text and return all matches.
|
||||
|
||||
:returns: List of matches.
|
||||
"""
|
||||
regex = '{}\s+=\s+"(.*)";'.format(attribute)
|
||||
regex = re.compile(regex)
|
||||
values = regex.findall(text)
|
||||
return values
|
||||
|
||||
def _get_unique_value(attribute, text):
|
||||
"""Match attribute in text and return unique match.
|
||||
|
||||
:returns: Single match.
|
||||
"""
|
||||
values = _get_values(attribute, text)
|
||||
n = len(values)
|
||||
if n > 1:
|
||||
raise ValueError("found too many values for {}".format(attribute))
|
||||
elif n == 1:
|
||||
return values[0]
|
||||
else:
|
||||
raise ValueError("no value found for {}".format(attribute))
|
||||
|
||||
def _get_line_and_value(attribute, text):
|
||||
"""Match attribute in text. Return the line and the value of the attribute."""
|
||||
regex = '({}\s+=\s+"(.*)";)'.format(attribute)
|
||||
regex = re.compile(regex)
|
||||
value = regex.findall(text)
|
||||
n = len(value)
|
||||
if n > 1:
|
||||
raise ValueError("found too many values for {}".format(attribute))
|
||||
elif n == 1:
|
||||
return value[0]
|
||||
else:
|
||||
raise ValueError("no value found for {}".format(attribute))
|
||||
|
||||
|
||||
def _replace_value(attribute, value, text):
|
||||
"""Search and replace value of attribute in text."""
|
||||
old_line, old_value = _get_line_and_value(attribute, text)
|
||||
new_line = old_line.replace(old_value, value)
|
||||
new_text = text.replace(old_line, new_line)
|
||||
return new_text
|
||||
|
||||
|
||||
def _fetch_page(url):
|
||||
r = requests.get(url)
|
||||
if r.status_code == requests.codes.ok:
|
||||
return list(yaml.safe_load_all(r.content))[0]
|
||||
else:
|
||||
raise ValueError("request for {} failed".format(url))
|
||||
|
||||
|
||||
def _fetch_github(url):
|
||||
headers = {}
|
||||
token = os.environ.get('GITHUB_API_TOKEN')
|
||||
if token:
|
||||
headers["Authorization"] = f"token {token}"
|
||||
r = requests.get(url, headers=headers)
|
||||
|
||||
if r.status_code == requests.codes.ok:
|
||||
return r.json()
|
||||
else:
|
||||
raise ValueError("request for {} failed".format(url))
|
||||
|
||||
|
||||
SEMVER = {
|
||||
'major' : 0,
|
||||
'minor' : 1,
|
||||
'patch' : 2,
|
||||
}
|
||||
|
||||
|
||||
def _determine_latest_version(current_version, target, versions):
|
||||
"""Determine latest version, given `target`, returning the more recent version.
|
||||
"""
|
||||
current_version = Version(current_version)
|
||||
|
||||
def _parse_versions(versions):
|
||||
for v in versions:
|
||||
try:
|
||||
yield Version(v)
|
||||
except InvalidVersion:
|
||||
pass
|
||||
|
||||
versions = _parse_versions(versions)
|
||||
|
||||
index = SEMVER[target]
|
||||
|
||||
ceiling = list(current_version[0:index])
|
||||
if len(ceiling) == 0:
|
||||
ceiling = None
|
||||
else:
|
||||
ceiling[-1]+=1
|
||||
ceiling = Version(".".join(map(str, ceiling)))
|
||||
|
||||
# We do not want prereleases
|
||||
versions = SpecifierSet(prereleases=PRERELEASES).filter(versions)
|
||||
|
||||
if ceiling is not None:
|
||||
versions = SpecifierSet(f"<{ceiling}").filter(versions)
|
||||
|
||||
return (max(sorted(versions))).raw_version
|
||||
|
||||
|
||||
def _get_latest_version_octave_packages(package, extension, current_version, target):
|
||||
"""Get latest version and hash from Octave Packages."""
|
||||
url = "{}/{}.yaml".format(INDEX, package)
|
||||
yaml = _fetch_page(url)
|
||||
|
||||
versions = list(map(lambda pv: pv['id'], yaml['versions']))
|
||||
version = _determine_latest_version(current_version, target, versions)
|
||||
|
||||
try:
|
||||
releases = [v if v['id'] == version else None for v in yaml['versions']]
|
||||
except KeyError as e:
|
||||
raise KeyError('Could not find version {} for {}'.format(version, package)) from e
|
||||
for release in releases:
|
||||
if release['url'].endswith(extension):
|
||||
sha256 = release['sha256']
|
||||
break
|
||||
else:
|
||||
sha256 = None
|
||||
return version, sha256, None
|
||||
|
||||
|
||||
def _get_latest_version_github(package, extension, current_version, target):
|
||||
def strip_prefix(tag):
|
||||
return re.sub("^[^0-9]*", "", tag)
|
||||
|
||||
def get_prefix(string):
|
||||
matches = re.findall(r"^([^0-9]*)", string)
|
||||
return next(iter(matches), "")
|
||||
|
||||
# when invoked as an updateScript, UPDATE_NIX_ATTR_PATH will be set
|
||||
# this allows us to work with packages which live outside of octave-modules
|
||||
attr_path = os.environ.get("UPDATE_NIX_ATTR_PATH", f"octavePackages.{package}")
|
||||
try:
|
||||
homepage = subprocess.check_output(
|
||||
["nix", "eval", "-f", f"{NIXPGKS_ROOT}/default.nix", "--raw", f"{attr_path}.src.meta.homepage"])\
|
||||
.decode('utf-8')
|
||||
except Exception as e:
|
||||
raise ValueError(f"Unable to determine homepage: {e}")
|
||||
owner_repo = homepage[len("https://github.com/"):] # remove prefix
|
||||
owner, repo = owner_repo.split("/")
|
||||
|
||||
url = f"https://api.github.com/repos/{owner}/{repo}/releases"
|
||||
all_releases = _fetch_github(url)
|
||||
releases = list(filter(lambda x: not x['prerelease'], all_releases))
|
||||
|
||||
if len(releases) == 0:
|
||||
raise ValueError(f"{homepage} does not contain any stable releases")
|
||||
|
||||
versions = map(lambda x: strip_prefix(x['tag_name']), releases)
|
||||
version = _determine_latest_version(current_version, target, versions)
|
||||
|
||||
release = next(filter(lambda x: strip_prefix(x['tag_name']) == version, releases))
|
||||
prefix = get_prefix(release['tag_name'])
|
||||
try:
|
||||
sha256 = subprocess.check_output(["nix-prefetch-url", "--type", "sha256", "--unpack", f"{release['tarball_url']}"], stderr=subprocess.DEVNULL)\
|
||||
.decode('utf-8').strip()
|
||||
except:
|
||||
# this may fail if they have both a branch and a tag of the same name, attempt tag name
|
||||
tag_url = str(release['tarball_url']).replace("tarball","tarball/refs/tags")
|
||||
sha256 = subprocess.check_output(["nix-prefetch-url", "--type", "sha256", "--unpack", tag_url], stderr=subprocess.DEVNULL)\
|
||||
.decode('utf-8').strip()
|
||||
|
||||
|
||||
return version, sha256, prefix
|
||||
|
||||
def _get_latest_version_git(package, extension, current_version, target):
|
||||
"""NOTE: Unimplemented!"""
|
||||
# attr_path = os.environ.get("UPDATE_NIX_ATTR_PATH", f"octavePackages.{package}")
|
||||
# try:
|
||||
# download_url = subprocess.check_output(
|
||||
# ["nix", "--extra-experimental-features", "nix-command", "eval", "-f", f"{NIXPGKS_ROOT}/default.nix", "--raw", f"{attr_path}.src.url"])\
|
||||
# .decode('utf-8')
|
||||
# except Exception as e:
|
||||
# raise ValueError(f"Unable to determine download link: {e}")
|
||||
|
||||
# with tempfile.TemporaryDirectory(prefix=attr_path) as new_clone_location:
|
||||
# subprocess.run(["git", "clone", download_url, new_clone_location])
|
||||
# newest_commit = subprocess.check_output(
|
||||
# ["git" "rev-parse" "$(git branch -r)" "|" "tail" "-n" "1"]).decode('utf-8')
|
||||
pass
|
||||
|
||||
|
||||
FETCHERS = {
|
||||
'fetchFromGitHub' : _get_latest_version_github,
|
||||
'fetchurl' : _get_latest_version_octave_packages,
|
||||
'fetchgit' : _get_latest_version_git,
|
||||
}
|
||||
|
||||
|
||||
DEFAULT_SETUPTOOLS_EXTENSION = 'tar.gz'
|
||||
|
||||
|
||||
FORMATS = {
|
||||
'setuptools' : DEFAULT_SETUPTOOLS_EXTENSION,
|
||||
}
|
||||
|
||||
def _determine_fetcher(text):
|
||||
# Count occurrences of fetchers.
|
||||
nfetchers = sum(text.count('src = {}'.format(fetcher)) for fetcher in FETCHERS.keys())
|
||||
if nfetchers == 0:
|
||||
raise ValueError("no fetcher.")
|
||||
elif nfetchers > 1:
|
||||
raise ValueError("multiple fetchers.")
|
||||
else:
|
||||
# Then we check which fetcher to use.
|
||||
for fetcher in FETCHERS.keys():
|
||||
if 'src = {}'.format(fetcher) in text:
|
||||
return fetcher
|
||||
|
||||
|
||||
def _determine_extension(text, fetcher):
|
||||
"""Determine what extension is used in the expression.
|
||||
|
||||
If we use:
|
||||
- fetchPypi, we check if format is specified.
|
||||
- fetchurl, we determine the extension from the url.
|
||||
- fetchFromGitHub we simply use `.tar.gz`.
|
||||
"""
|
||||
if fetcher == 'fetchurl':
|
||||
url = _get_unique_value('url', text)
|
||||
extension = os.path.splitext(url)[1]
|
||||
|
||||
elif fetcher == 'fetchFromGitHub' or fetcher == 'fetchgit':
|
||||
if "fetchSubmodules" in text:
|
||||
raise ValueError("fetchFromGitHub fetcher doesn't support submodules")
|
||||
extension = "tar.gz"
|
||||
|
||||
return extension
|
||||
|
||||
|
||||
def _update_package(path, target):
|
||||
|
||||
# Read the expression
|
||||
with open(path, 'r') as f:
|
||||
text = f.read()
|
||||
|
||||
# Determine pname. Many files have more than one pname
|
||||
pnames = _get_values('pname', text)
|
||||
|
||||
# Determine version.
|
||||
version = _get_unique_value('version', text)
|
||||
|
||||
# First we check how many fetchers are mentioned.
|
||||
fetcher = _determine_fetcher(text)
|
||||
|
||||
extension = _determine_extension(text, fetcher)
|
||||
|
||||
# Attempt a fetch using each pname, e.g. backports-zoneinfo vs backports.zoneinfo
|
||||
successful_fetch = False
|
||||
for pname in pnames:
|
||||
if fetcher == "fetchgit":
|
||||
logging.warning(f"You must update {pname} MANUALLY!")
|
||||
return { 'path': path, 'target': target, 'pname': pname,
|
||||
'old_version': version, 'new_version': version }
|
||||
try:
|
||||
new_version, new_sha256, prefix = FETCHERS[fetcher](pname, extension, version, target)
|
||||
successful_fetch = True
|
||||
break
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
if not successful_fetch:
|
||||
raise ValueError(f"Unable to find correct package using these pnames: {pnames}")
|
||||
|
||||
if new_version == version:
|
||||
logging.info("Path {}: no update available for {}.".format(path, pname))
|
||||
return False
|
||||
elif Version(new_version) <= Version(version):
|
||||
raise ValueError("downgrade for {}.".format(pname))
|
||||
if not new_sha256:
|
||||
raise ValueError("no file available for {}.".format(pname))
|
||||
|
||||
text = _replace_value('version', new_version, text)
|
||||
# hashes from pypi are 16-bit encoded sha256's, normalize it to sri to avoid merge conflicts
|
||||
# sri hashes have been the default format since nix 2.4+
|
||||
sri_hash = subprocess.check_output(["nix", "--extra-experimental-features", "nix-command", "hash", "to-sri", "--type", "sha256", new_sha256]).decode('utf-8').strip()
|
||||
|
||||
|
||||
# fetchers can specify a sha256, or a sri hash
|
||||
try:
|
||||
text = _replace_value('sha256', sri_hash, text)
|
||||
except ValueError:
|
||||
text = _replace_value('hash', sri_hash, text)
|
||||
|
||||
if fetcher == 'fetchFromGitHub':
|
||||
# in the case of fetchFromGitHub, it's common to see `rev = version;` or `rev = "v${version}";`
|
||||
# in which no string value is meant to be substituted. However, we can just overwrite the previous value.
|
||||
regex = '(rev\s+=\s+[^;]*;)'
|
||||
regex = re.compile(regex)
|
||||
matches = regex.findall(text)
|
||||
n = len(matches)
|
||||
|
||||
if n == 0:
|
||||
raise ValueError("Unable to find rev value for {}.".format(pname))
|
||||
else:
|
||||
# forcefully rewrite rev, incase tagging conventions changed for a release
|
||||
match = matches[0]
|
||||
text = text.replace(match, f'rev = "refs/tags/{prefix}${{version}}";')
|
||||
# incase there's no prefix, just rewrite without interpolation
|
||||
text = text.replace('"${version}";', 'version;')
|
||||
|
||||
with open(path, 'w') as f:
|
||||
f.write(text)
|
||||
|
||||
logging.info("Path {}: updated {} from {} to {}".format(path, pname, version, new_version))
|
||||
|
||||
result = {
|
||||
'path' : path,
|
||||
'target': target,
|
||||
'pname': pname,
|
||||
'old_version' : version,
|
||||
'new_version' : new_version,
|
||||
#'fetcher' : fetcher,
|
||||
}
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def _update(path, target):
|
||||
|
||||
# We need to read and modify a Nix expression.
|
||||
if os.path.isdir(path):
|
||||
path = os.path.join(path, 'default.nix')
|
||||
|
||||
# If a default.nix does not exist, we quit.
|
||||
if not os.path.isfile(path):
|
||||
logging.info("Path {}: does not exist.".format(path))
|
||||
return False
|
||||
|
||||
# If file is not a Nix expression, we quit.
|
||||
if not path.endswith(".nix"):
|
||||
logging.info("Path {}: does not end with `.nix`.".format(path))
|
||||
return False
|
||||
|
||||
try:
|
||||
return _update_package(path, target)
|
||||
except ValueError as e:
|
||||
logging.warning("Path {}: {}".format(path, e))
|
||||
return False
|
||||
|
||||
|
||||
def _commit(path, pname, old_version, new_version, pkgs_prefix="octave: ", **kwargs):
|
||||
"""Commit result.
|
||||
"""
|
||||
|
||||
msg = f'{pkgs_prefix}{pname}: {old_version} -> {new_version}'
|
||||
|
||||
try:
|
||||
subprocess.check_call([GIT, 'add', path])
|
||||
subprocess.check_call([GIT, 'commit', '-m', msg])
|
||||
except subprocess.CalledProcessError as e:
|
||||
subprocess.check_call([GIT, 'checkout', path])
|
||||
raise subprocess.CalledProcessError(f'Could not commit {path}') from e
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
epilog = """
|
||||
environment variables:
|
||||
GITHUB_API_TOKEN\tGitHub API token used when updating github packages
|
||||
"""
|
||||
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, epilog=epilog)
|
||||
parser.add_argument('package', type=str, nargs='+')
|
||||
parser.add_argument('--target', type=str, choices=SEMVER.keys(), default='major')
|
||||
parser.add_argument('--commit', action='store_true', help='Create a commit for each package update')
|
||||
parser.add_argument('--use-pkgs-prefix', action='store_true', help='Use octavePackages.${pname}: instead of octave: ${pname}: when making commits')
|
||||
|
||||
args = parser.parse_args()
|
||||
target = args.target
|
||||
|
||||
packages = list(map(os.path.abspath, args.package))
|
||||
|
||||
logging.info("Updating packages...")
|
||||
|
||||
# Use threads to update packages concurrently
|
||||
with Pool() as p:
|
||||
results = list(filter(bool, p.map(lambda pkg: _update(pkg, target), packages)))
|
||||
|
||||
logging.info("Finished updating packages.")
|
||||
|
||||
commit_options = {}
|
||||
if args.use_pkgs_prefix:
|
||||
logging.info("Using octavePackages. prefix for commits")
|
||||
commit_options["pkgs_prefix"] = "octavePackages."
|
||||
|
||||
# Commits are created sequentially.
|
||||
if args.commit:
|
||||
logging.info("Committing updates...")
|
||||
# list forces evaluation
|
||||
list(map(lambda x: _commit(**x, **commit_options), results))
|
||||
logging.info("Finished committing updates")
|
||||
|
||||
count = len(results)
|
||||
logging.info("{} package(s) updated".format(count))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
12
maintainers/scripts/update-octave-shell.nix
Normal file
12
maintainers/scripts/update-octave-shell.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ nixpkgs ? import ../.. { }
|
||||
}:
|
||||
with nixpkgs;
|
||||
let
|
||||
pyEnv = python3.withPackages(ps: with ps; [ packaging requests toolz pyyaml ]);
|
||||
in
|
||||
mkShell {
|
||||
packages = [
|
||||
pyEnv
|
||||
nix-prefetch-scripts
|
||||
];
|
||||
}
|
@ -62,13 +62,21 @@ let
|
||||
]
|
||||
++ nativeBuildInputs;
|
||||
|
||||
passthru' = {
|
||||
updateScript = [
|
||||
../../../../maintainers/scripts/update-octave-packages
|
||||
(builtins.unsafeGetAttrPos "pname" octave.pkgs.${attrs.pname}).file
|
||||
];
|
||||
}
|
||||
// passthru;
|
||||
|
||||
# This step is required because when
|
||||
# a = { test = [ "a" "b" ]; }; b = { test = [ "c" "d" ]; };
|
||||
# (a // b).test = [ "c" "d" ];
|
||||
# This used to mean that if a package defined extra nativeBuildInputs, it
|
||||
# would override the ones for building an Octave package (the hook and Octave
|
||||
# itself, causing everything to fail.
|
||||
attrs' = builtins.removeAttrs attrs [ "nativeBuildInputs" ];
|
||||
attrs' = builtins.removeAttrs attrs [ "nativeBuildInputs" "passthru" ];
|
||||
|
||||
in stdenv.mkDerivation ({
|
||||
packageName = "${fullLibName}";
|
||||
@ -121,5 +129,7 @@ in stdenv.mkDerivation ({
|
||||
# together with Octave.
|
||||
dontInstall = true;
|
||||
|
||||
passthru = passthru';
|
||||
|
||||
inherit meta;
|
||||
} // attrs')
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "arduino";
|
||||
version = "0.7.0";
|
||||
version = "0.10.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0r0bcq2zkwba6ab6yi6czbhrj4adm9m9ggxmzzcd9h40ckqg6wjv";
|
||||
sha256 = "sha256-p9SDTXkIwnrkNXeVhzAHks7EL4NdwBokrH2j9hqAJqQ=";
|
||||
};
|
||||
|
||||
requiredOctavePackages = [
|
||||
|
@ -9,11 +9,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "audio";
|
||||
version = "2.0.3";
|
||||
version = "2.0.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "1431pf7mhxsrnzrx8r3hsy537kha7jhaligmp2rghwyxhq25hs0r";
|
||||
sha256 = "sha256-/4akeeOQnvTlk9ah+e8RJfwJG2Eq2HAGOCejhiIUjF4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -1,17 +1,19 @@
|
||||
{ buildOctavePackage
|
||||
, lib
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, fpl
|
||||
, msh
|
||||
}:
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "bim";
|
||||
version = "1.1.5";
|
||||
version = "1.1.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0y70w8mj80c5yns1j7nwngwwrxp1pa87kyz2n2yvmc3zdigcd6g8";
|
||||
src = fetchFromGitHub {
|
||||
owner = "carlodefalco";
|
||||
repo = "bim";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-hgFb1KFE1KJC8skIaeT/7h/fg1aqRpedGnEPY24zZSI=";
|
||||
};
|
||||
|
||||
requiredOctavePackages = [
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "communications";
|
||||
version = "1.2.3";
|
||||
version = "1.2.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "1r4r0cia5l5fann1n78c1qdc6q8nizgb09n2fdwb76xnwjan23g3";
|
||||
sha256 = "sha256-SfA81UP0c7VgroxSA/RZVVKZ4arl8Uhpf324F7yGFTo=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "control";
|
||||
version = "3.3.1";
|
||||
version = "3.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0vndbzix34vfzdlsz57bgkyg31as4kv6hfg9pwrcqn75bzzjsivw";
|
||||
sha256 = "sha256-bsagbhOtKIr62GMcxB9yR+RwlvoejQQkDU7QHvvkp3o=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "dicom";
|
||||
version = "0.4.0";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "131wn6mrv20np10plirvqia8dlpz3g0aqi3mmn2wyl7r95p3dnza";
|
||||
sha256 = "sha256-0qNqjpJWWBA0N5IgjV0e0SPQlCvbzIwnIgaWo+2wKw0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "ga";
|
||||
version = "0.10.2";
|
||||
version = "0.10.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0s5azn4n174avlmh5gw21zfqfkyxkzn4v09q4l9swv7ldmg3mirv";
|
||||
sha256 = "sha256-cbP7ucua7DdxLL422INxjZxz/x1pHoIq+jkjrtfaabE=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "general";
|
||||
version = "2.1.1";
|
||||
version = "2.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0jmvczssqz1aa665v9h8k9cchb7mg3n9af6b5kh9b2qcjl4r9l7v";
|
||||
sha256 = "sha256-owzRp5dDxiUo2uRuvUqD+EiuRqHB2sPqq8NmYtQilM8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "generate_html";
|
||||
version = "0.3.2";
|
||||
version = "0.3.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "1ai4h7jf9fqi7w565iprzylsh94pg4rhyf51hfj9kfdgdpb1abfs";
|
||||
sha256 = "sha256-CHJ0+90+SNXmslLrQc+8aetSnHK0m9PqEBipFuFjwHw=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -1,16 +1,17 @@
|
||||
{ buildOctavePackage
|
||||
, lib
|
||||
, fetchurl
|
||||
, fetchhg
|
||||
, matgeom
|
||||
}:
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "geometry";
|
||||
version = "4.0.0";
|
||||
version = "unstable-2021-07-07";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "1zmd97xir62fr5v57xifh2cvna5fg67h9yb7bp2vm3ll04y41lhs";
|
||||
src = fetchhg {
|
||||
url = "http://hg.code.sf.net/p/octave/${pname}";
|
||||
rev = "04965cda30b5f9e51774194c67879e7336df1710";
|
||||
sha256 = "sha256-ECysYOJMF4gPiCFung9hFSlyyO60X3MGirQ9FlYDix8=";
|
||||
};
|
||||
|
||||
requiredOctavePackages = [
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "instrument-control";
|
||||
version = "0.7.0";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0cdnnbxihz7chdkhkcgy46pvkij43z9alwr88627z7jaiaah6xby";
|
||||
sha256 = "sha256-g3Pyz2b8hvg0MkFGA7cduYozcAd2UnqorBHzNs+Uuro=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "interval";
|
||||
version = "3.2.0";
|
||||
version = "3.2.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0a0sz7b4y53qgk1xr4pannn4w7xiin2pf74x7r54hrr1wf4abp20";
|
||||
sha256 = "sha256-OOUmQnN1cTIpqz2Gpf4/WghVB0fYQgVBcG/eqQk/3Og=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -8,11 +8,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "io";
|
||||
version = "2.6.3";
|
||||
version = "2.6.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "044y8lfp93fx0592mv6x2ss0nvjkjgvlci3c3ahav76pk1j3rikb";
|
||||
sha256 = "sha256-p0pAC70ZIn9sB8WFiS3oec165S2CDaH2nxo+PolFL1o=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -3,17 +3,22 @@
|
||||
, fetchurl
|
||||
, io # >= 2.2.7
|
||||
, geometry # >= 4.0.0
|
||||
, gdal
|
||||
}:
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "mapping";
|
||||
version = "1.4.1";
|
||||
version = "1.4.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0wj0q1rkrqs4qgpjh4vn9kcpdh94pzr6v4jc1vcrjwkp87yjv8c0";
|
||||
sha256 = "sha256-mrUQWqC15Ul5AHDvhMlNStqIMG2Zxa+hB2vDyeizLaI=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
gdal
|
||||
];
|
||||
|
||||
requiredOctavePackages = [
|
||||
io
|
||||
geometry
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ buildOctavePackage
|
||||
, lib
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
# Octave Dependencies
|
||||
, splines
|
||||
# Other Dependencies
|
||||
@ -13,11 +13,13 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "msh";
|
||||
version = "1.0.10";
|
||||
version = "1.0.12";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "1mb5qrp9y1w1cbzrd9v84430ldy57ca843yspnrgbcqpxyyxbgfz";
|
||||
src = fetchFromGitHub {
|
||||
owner = "carlodefalco";
|
||||
repo = "msh";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-UnMrIruzm3ARoTgUlMMxfjTOMZw/znZUQJmj3VEOw8I=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "nan";
|
||||
version = "3.6.0";
|
||||
version = "3.7.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "1zxdg0yg5jnwq6ppnikd13zprazia6w6zpgw99f62mc03iqk5c4q";
|
||||
sha256 = "sha256-d9J6BfNFeM5LtMqth0boSPd9giYU42KBnxrsUCmKK1s=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "ncarray";
|
||||
version = "1.0.4";
|
||||
version = "1.0.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0v96iziikvq2v7hczhbfs9zmk49v99kn6z3lgibqqpwam175yqgd";
|
||||
sha256 = "sha256-HhQWLUA/6wqYi6TP3PC+N2zgi4UojDxbG9pgQzFaQ8c=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "netcdf";
|
||||
version = "1.0.14";
|
||||
version = "1.0.16";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "1wdwl76zgcg7kkdxjfjgf23ylzb0x4dyfliffylyl40g6cjym9lf";
|
||||
sha256 = "sha256-1Lr+6xLRXxSeUhM9+WdCUPFRZSWdxtAQlxpiv4CHJrs=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "ocl";
|
||||
version = "1.1.1";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0ayi5x9zk9p4zm0qsr3i94lyp5468c9d1a7mqrqjqpdvkhrw0xnm";
|
||||
sha256 = "sha256-jQdwZwQNU3PZZFa3lp0hIr0GDt/XFHLJoq4waLI4gS8=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -1,15 +1,17 @@
|
||||
{ buildOctavePackage
|
||||
, lib
|
||||
, fetchurl
|
||||
, fetchFromBitbucket
|
||||
}:
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "octclip";
|
||||
version = "2.0.1";
|
||||
version = "2.0.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "05ijh3izgfaan84n6zp690nap9vnz0zicjd0cgvd1c6askm7vxql";
|
||||
src = fetchFromBitbucket {
|
||||
owner = "jgpallero";
|
||||
repo = pname;
|
||||
rev = "OctCLIP-${version}";
|
||||
sha256 = "sha256-gG2b8Ix6bzO6O7GRACE81JCVxfXW/+ZdfoniigAEq3g=";
|
||||
};
|
||||
|
||||
# The only compilation problem is that no formatting specifier was provided
|
||||
|
@ -1,16 +1,18 @@
|
||||
{ buildOctavePackage
|
||||
, lib
|
||||
, fetchurl
|
||||
, fetchFromBitbucket
|
||||
, proj # >= 6.3.0
|
||||
}:
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "octproj";
|
||||
version = "2.0.1";
|
||||
version = "3.0.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "1mb8gb0r8kky47ap85h9qqdvs40mjp3ya0nkh45gqhy67ml06paq";
|
||||
src = fetchFromBitbucket {
|
||||
owner = "jgpallero";
|
||||
repo = pname;
|
||||
rev = "OctPROJ-${version}";
|
||||
sha256 = "sha256-d/Zf172Etj+GA0cnGsQaKMjOmirE7Hwyj4UECpg7QFM=";
|
||||
};
|
||||
|
||||
# The sed changes below allow for the package to be compiled.
|
||||
@ -28,6 +30,5 @@ buildOctavePackage rec {
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ KarlJoad ];
|
||||
description = "GNU Octave bindings to PROJ library for cartographic projections and CRS transformations";
|
||||
broken = true; # error: unlink: operation failed: No such file or directory
|
||||
};
|
||||
}
|
||||
|
@ -9,11 +9,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "optim";
|
||||
version = "1.6.1";
|
||||
version = "1.6.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "1175bckiryz0i6zm8zvq7y5rq3lwkmhyiky1gbn33np9qzxcsl3i";
|
||||
sha256 = "sha256-VUqOGLtxla6GH1BZwU8aVXhEJlwa3bW/vzq5iFUkeH4=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "optiminterp";
|
||||
version = "0.3.6";
|
||||
version = "0.3.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "05nzj2jmrczbnsr64w2a7kww19s6yialdqnsbg797v11ii7aiylc";
|
||||
sha256 = "sha256-ubh/iOZlWTOYsTA6hJfPOituNBKTn2LbBnx+tmmSEug=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "signal";
|
||||
version = "1.4.2";
|
||||
version = "1.4.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "YqTgYRfcxDw2FpkF+CVdAVSBypgq6ukBOw2d8+SOcGI=";
|
||||
sha256 = "sha256-VFuXVA6+ujtCDwiQb905d/wpOzvI/Db2uosJTOqI8zk=";
|
||||
};
|
||||
|
||||
requiredOctavePackages = [
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "sockets";
|
||||
version = "1.2.1";
|
||||
version = "1.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "18f1zpqcf6h9b4fb0x2c5nvc3mvgj1141f1s8d9gnlhlrjlq8vqg";
|
||||
sha256 = "sha256-GNwFLNV1u3UKJp9lhLtCclD2VSKC9Mko1hBoSn5dTpI=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -1,16 +1,18 @@
|
||||
{ buildOctavePackage
|
||||
, lib
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, io
|
||||
}:
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "statistics";
|
||||
version = "1.4.2";
|
||||
version = "1.5.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0iv2hw3zp7h69n8ncfjfgm29xaihdl5gp2slcw1yf23mhd7q2xkr";
|
||||
src = fetchFromGitHub {
|
||||
owner = "gnu-octave";
|
||||
repo = "statistics";
|
||||
rev = "refs/tags/release-${version}";
|
||||
sha256 = "sha256-gFauFIaXKzcPeNvpWHv5FAxYQvZNh7ELrSUIvn43IfQ=";
|
||||
};
|
||||
|
||||
requiredOctavePackages = [
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "stk";
|
||||
version = "2.6.1";
|
||||
version = "2.7.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "1rqndfankwlwm4igw3xqpnrrl749zz1d5pjzh1qbfns7ixwrm19a";
|
||||
sha256 = "sha256-vIf+XDLvLNOMwptFCgiqfl+o3PIQ+KLpsJhOArd7gMM=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -2,20 +2,25 @@
|
||||
, stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, pcre
|
||||
, pkg-config
|
||||
, pcre2
|
||||
}:
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "strings";
|
||||
version = "1.2.0";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "1b0ravfvq3bxd0w3axjfsx13mmmkifmqz6pfdgyf2s8vkqnp1qng";
|
||||
sha256 = "sha256-agpTD9FN1qdp+BYdW5f+GZV0zqZMNzeOdymdo27mTOI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
pcre
|
||||
pcre2
|
||||
];
|
||||
|
||||
# The gripes library no longer exists.
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "struct";
|
||||
version = "1.0.17";
|
||||
version = "1.0.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0cw4cspkm553v019zsj2bsmal0i378pm0hv29w82j3v5vysvndq1";
|
||||
sha256 = "sha256-/M6n3YTBEE7TurtHoo8F4AEqicKE85qwlAkEUJFSlM4=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -8,11 +8,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "video";
|
||||
version = "2.0.0";
|
||||
version = "2.0.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "0s6j3c4dh5nsbh84s7vnd2ajcayy1gn07b4fcyrcynch3wl28mrv";
|
||||
sha256 = "sha256-bZNaRnmJl5UF0bQMNoEWvoIXJaB0E6/V9eChE725OHY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -5,11 +5,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "windows";
|
||||
version = "1.6.1";
|
||||
version = "1.6.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "110dh6jz088c4fxp9gw79kfib0dl7r3rkcavxx4xpk7bjl2l3xb6";
|
||||
sha256 = "sha256-U5Fe5mTn/ms8w9j6NdEtiRFZkKeyV0I3aR+zYQw4yIs=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -8,11 +8,11 @@
|
||||
|
||||
buildOctavePackage rec {
|
||||
pname = "zeromq";
|
||||
version = "1.5.3";
|
||||
version = "1.5.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
|
||||
sha256 = "1h0pb2pqbnyiavf7r05j8bqxqd8syz16ab48hc74nlnx727anfwl";
|
||||
sha256 = "sha256-MAZEpbVuragVuXrMJ8q5/jU5cTchosAtrAR6ElLwfss=";
|
||||
};
|
||||
|
||||
preAutoreconf = ''
|
||||
|
Loading…
Reference in New Issue
Block a user