diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2022-11-20 17:42:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-20 17:42:19 +0000 |
commit | 800d82aea922942501f27ea89b99c8d6dcd6d3b9 (patch) | |
tree | f526da48dd725ed77e74966e63702a241d9019d1 | |
parent | 6803993e7f1ce995f841b37ad292474fffd4af5d (diff) | |
parent | 72c16839ea42806f2b2e0df7b2865b5e362ce77d (diff) |
Merge pull request #201678 from trofi/mpfr-update
mpfr: 4.1.0 -> 4.1.1
-rw-r--r-- | pkgs/development/libraries/mpfr/default.nix | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/pkgs/development/libraries/mpfr/default.nix b/pkgs/development/libraries/mpfr/default.nix index bf1625cf2f9f4..76d2c9e0ece99 100644 --- a/pkgs/development/libraries/mpfr/default.nix +++ b/pkgs/development/libraries/mpfr/default.nix @@ -1,4 +1,9 @@ -{ lib, stdenv, fetchurl, gmp }: +{ lib +, stdenv +, fetchurl +, gmp +, writeScript +}: # Note: this package is used for bootstrapping fetchurl, and thus # cannot use fetchpatch! All mutable patches (generated by GitHub or @@ -6,15 +11,15 @@ # files. stdenv.mkDerivation rec { - version = "4.1.0"; + version = "4.1.1"; pname = "mpfr"; src = fetchurl { urls = [ - #"https://www.mpfr.org/${name}/${name}.tar.xz" + "https://www.mpfr.org/${pname}-${version}/${pname}-${version}.tar.xz" "mirror://gnu/mpfr/${pname}-${version}.tar.xz" ]; - sha256 = "0zwaanakrqjf84lfr5hfsdr7hncwv9wj0mchlr7cmxigfgqs760c"; + hash = "sha256-/9GVvVZ9uv/DuYsj/QCq0FN2gMmJYXHkT+P/eeKKwz0="; }; outputs = [ "out" "dev" "doc" "info" ]; @@ -31,6 +36,20 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + passthru = { + updateScript = writeScript "update-mpfr" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p curl pcre common-updater-scripts + + set -eu -o pipefail + + # Expect the text in format of '<title>GNU MPFR version 4.1.1</title>' + new_version="$(curl -s https://www.mpfr.org/mpfr-current/ | + pcregrep -o1 '<title>GNU MPFR version ([0-9.]+)</title>')" + update-source-version ${pname} "$new_version" + ''; + }; + meta = { homepage = "https://www.mpfr.org/"; description = "Library for multiple-precision floating-point arithmetic"; |