summary refs log tree commit diff
path: root/pkgs/development/interpreters/guile
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-02-14 21:24:23 +0000
committerSergei Trofimovich <slyich@gmail.com>2022-02-20 09:07:24 +0000
commitfce058c80e63d5f5be712717ee245426a5fa7d84 (patch)
treecdebd02c15ced01a9e722fa1d49b4b79312b6a7a /pkgs/development/interpreters/guile
parent7feed2c0bec4161c83509d18089784cfcef49667 (diff)
guile_3_0: 3.0.7 -> 3.0.8
While at it added trivial updater script.

Changes: https://git.savannah.gnu.org/cgit/guile.git/tree/NEWS?h=v3.0.8#n8

Had to disable LTO on darwin as toolchain can't link executables there.
Diffstat (limited to 'pkgs/development/interpreters/guile')
-rw-r--r--pkgs/development/interpreters/guile/3.0.nix24
1 files changed, 21 insertions, 3 deletions
diff --git a/pkgs/development/interpreters/guile/3.0.nix b/pkgs/development/interpreters/guile/3.0.nix
index 76aa0c4404fc9..67c0e2b20649c 100644
--- a/pkgs/development/interpreters/guile/3.0.nix
+++ b/pkgs/development/interpreters/guile/3.0.nix
@@ -14,6 +14,7 @@
 , pkg-config
 , pkgsBuildBuild
 , readline
+, writeScript
 }:
 
 let
@@ -24,11 +25,11 @@ let
 in
 builder rec {
   pname = "guile";
-  version = "3.0.7";
+  version = "3.0.8";
 
   src = fetchurl {
     url = "mirror://gnu/${pname}/${pname}-${version}.tar.xz";
-    sha256 = "sha256-9X2GxwYgJxv863qb4MgXRKAz8IrcfOuoMsmRerPmkbc=";
+    sha256 = "sha256-2qcGClbygE6bdMjX5/6L7tErQ6qyeJo4WFGD/MF7ihM=";
   };
 
   outputs = [ "out" "dev" "info" ];
@@ -102,7 +103,10 @@ builder rec {
   ]
   # Disable JIT on Apple Silicon, as it is not yet supported
   # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44505";
-  ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "--enable-jit=no";
+  ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "--enable-jit=no"
+  # At least on x86_64-darwin '-flto' autodetection is not correct:
+  #  https://github.com/NixOS/nixpkgs/pull/160051#issuecomment-1046193028
+  ++ lib.optional (stdenv.isDarwin) "--disable-lto";
 
   postInstall = ''
     wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"
@@ -126,6 +130,20 @@ builder rec {
 
   setupHook = ./setup-hook-3.0.sh;
 
+  passthru = {
+    updateScript = writeScript "update-guile-3" ''
+      #!/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 '"https://ftp.gnu.org/gnu/guile/guile-3.0.8.tar.gz"'
+      new_version="$(curl -s https://www.gnu.org/software/guile/download/ |
+          pcregrep -o1 '"https://ftp.gnu.org/gnu/guile/guile-(3[.0-9]+).tar.gz"')"
+      update-source-version ${pname} "$new_version"
+    '';
+  };
+
   meta = with lib; {
     homepage = "https://www.gnu.org/software/guile/";
     description = "Embeddable Scheme implementation";