···11diff --git a/admin/Makefile.def b/admin/Makefile.def
22-index 43ef322..cad3de2 100644
22+index facc205..0daceaf 100644
33--- a/admin/Makefile.def
44+++ b/admin/Makefile.def
55-@@ -306,7 +306,7 @@ endif
55+@@ -310,7 +310,7 @@ endif
6677 # Apple CLANG flags (identical to GCC)
88 ifeq ($(GAG_COMPILER_CKIND),clang)
···1111 ifeq ($(RELEASE_MODE),no)
1212 OPTION_CFLAGS += -Wall
1313 endif
1414-@@ -356,7 +356,7 @@ endif
1414+@@ -360,7 +360,7 @@ endif
15151616 # GFORTRAN flags
1717 ifeq ($(GAG_COMPILER_FKIND),gfortran)
···2121 GLOBAL_FFLAGS += -fsanitize=address -fsanitize=null
2222 # Can not be used with our memory(ip):
2323diff --git a/admin/define-system.sh b/admin/define-system.sh
2424-index f68274d..dd1a9be 100644
2424+index 36d4ab9..0233259 100644
2525--- a/admin/define-system.sh
2626+++ b/admin/define-system.sh
2727-@@ -279,35 +279,22 @@ EOF
2828- else
2929- GAG_MACHINE=pc
3030- fi
3131-- if which gcc > /dev/null 2>&1; then
3232-- DEFAULT_CCOMPILER=gcc
3333-- fi
3434-- if which g++ > /dev/null 2>&1; then
3535-- DEFAULT_CXXCOMPILER=g++
3636-- elif which clang++ > /dev/null 2>&1; then
3737-- DEFAULT_CXXCOMPILER=clang++
3838-- fi
3939-- if which ifort > /dev/null 2>&1; then
4040-- DEFAULT_FCOMPILER=ifort
4141-- elif which gfortran > /dev/null 2>&1; then
4242-- DEFAULT_FCOMPILER=gfortran
4343-- fi
2727+@@ -287,8 +287,8 @@ EOF
2828+ fi
4429 elif [ `uname -p` = "arm" ]; then
4545- defsys_message "WARNING: experimental ARM support"
4630 GAG_MACHINE=arm64
4731- if which gcc > /dev/null 2>&1; then
4832- DEFAULT_CCOMPILER=gcc
4949-- fi
5050-- if which g++ > /dev/null 2>&1; then
5151-- DEFAULT_CXXCOMPILER=g++
5252-- elif which clang++ > /dev/null 2>&1; then
5353-- DEFAULT_CXXCOMPILER=clang++
5454-- fi
5555-- if which ifort > /dev/null 2>&1; then
5656-- DEFAULT_FCOMPILER=ifort
5757-- elif which gfortran > /dev/null 2>&1; then
5858-- DEFAULT_FCOMPILER=gfortran
5959-- fi
6060-+ fi
6161-+ if which clang > /dev/null 2>&1; then
6262-+ DEFAULT_CCOMPILER=clang
6363-+ fi
6464-+ if which clang++ > /dev/null 2>&1; then
6565-+ DEFAULT_CXXCOMPILER=clang++
6666-+ elif which g++ > /dev/null 2>&1; then
6767-+ DEFAULT_CXXCOMPILER=g++
6868-+ fi
6969-+ if which ifort > /dev/null 2>&1; then
7070-+ DEFAULT_FCOMPILER=ifort
7171-+ elif which gfortran > /dev/null 2>&1; then
7272-+ DEFAULT_FCOMPILER=gfortran
7373- fi ;;
7474- CYGWIN*)
7575- if [ `uname -m | grep -c "x86_64"` -ne 0 ]; then
3333++ if which clang > /dev/null 2>&1; then
3434++ DEFAULT_CCOMPILER=clang
3535+ fi
3636+ if which clang++ > /dev/null 2>&1; then
3737+ DEFAULT_CXXCOMPILER=clang++
+3-6
pkgs/by-name/im/imager/package.nix
···2626in
27272828stdenv.mkDerivation (finalAttrs: {
2929- version = "4.4-01";
2929+ version = "4.5-01";
3030 pname = "imager";
31313232 src = fetchurl {
3333 # The recommended download link is on Nextcloud instance that
3434 # requires to accept some general terms of use. Use a mirror at
3535 # univ-grenoble-alpes.fr instead.
3636- url = "https://cloud.univ-grenoble-alpes.fr/s/J6yEqA6yZ8tX9da/download?path=%2F&files=imager-dec24.tar.gz";
3737- hash = "sha256-Pq92IsGY4heekm5zNGngnp6J6YiCHYAyuMT2RsD1/9o=";
3636+ url = "https://cloud.univ-grenoble-alpes.fr/s/J6yEqA6yZ8tX9da/download?path=%2F&files=imager-may25.tar.gz";
3737+ hash = "sha256-E3JjdVGEQ0I/ogYj0G1OZxfQ3hA+sRgA4LAfHK52Sec=";
3838 };
39394040 nativeBuildInputs = [
···5555 ];
56565757 patches = [
5858- # Update the Python link flag script from Gildas upstream
5959- # version. This patch will be included in the the IMAGER release.
6060- ./python-ldflags.patch
6158 # Use Clang as the default compiler on Darwin.
6259 ./clang.patch
6360 # Replace hardcoded cpp with GAG_CPP (see below).
-104
pkgs/by-name/im/imager/python-ldflags.patch
···11-diff --git a/admin/python-config-ldflags.py b/admin/python-config-ldflags.py
22-index 0854698..f397a7c 100644
33---- a/admin/python-config-ldflags.py
44-+++ b/admin/python-config-ldflags.py
55-@@ -1,38 +1,70 @@
66--#!/usr/bin/env python
77-+# This scripts retrieves the proper options to be used to link against
88-+# the libpython, in a machine-independant way. It invokes the official
99-+# script python-config (which thankfully deals with all the details).
1010-1111--# DUPLICATE of "python-config --ldflags", fixed for the library location
1212-+import sys
1313-+newerpython = (sys.version_info[0] == 3 and sys.version_info[1] > 7)
1414-1515--# This utility is known to work with:
1616--# python2.6 (system install) under SL6.4
1717--# python2.7 (custom install) under SL6.4
1818--# python3.4 (custom install) under SL6.4
1919--# python2.7 (system install) under Fedora20
2020--# python2.7 (Apple install) under MacOSX
2121--# python2.7 (MacPorts install) under MacOSX
2222--# python3.4 (MacPorts install) under MacOSX
2323-+if newerpython:
2424-+ # From now on avoid duplicating python-config, which evolves on its own.
2525-+ # Invoke 'python-config --ldflags --embed'. The embed option (under
2626-+ # Python 3) adds the libpython itself, whose name is highly
2727-+ # unpredictible under the variety of machines and configurations we
2828-+ # support
2929-+ import subprocess
3030-+ output = subprocess.check_output(['python-config', '--ldflags','--embed'])
3131-+ output = output.decode('utf-8')
3232-+ #print(output)
3333-3434--import sys
3535--import sysconfig
3636-+ args = output.split()
3737-3838--pyver = sysconfig.get_config_var('VERSION')
3939--getvar = sysconfig.get_config_var
4040-+ output = ''
4141-+ for arg in args:
4242-+ # Discard /usr/lib* path which causes troubles on the link command
4343-+ # line, as it basically overrides all other custom paths coming after
4444-+ # it. No need to put these paths on command line, they are found
4545-+ # implicitly by the linker.
4646-+ if arg not in ['-L/usr/lib','-L/usr/lib32','-L/usr/lib64']:
4747-+ output += arg+' '
4848-+
4949-+ print(output)
5050-5151--libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
5252--if (hasattr(sys,'abiflags')):
5353-- libs.append('-lpython' + pyver + sys.abiflags)
5454- else:
5555-- libs.append('-lpython' + pyver)
5656-+ # DUPLICATE of "python-config --ldflags", fixed for the library location
5757-+ # This proved to work gracefully up to Python 3.5 (exact limit unclear)
5858-+
5959-+ # This utility is known to work with:
6060-+ # python2.6 (system install) under SL6.4
6161-+ # python2.7 (custom install) under SL6.4
6262-+ # python3.4 (custom install) under SL6.4
6363-+ # python3.7 (custom install) under Debian12
6464-+ # python2.7 (system install) under Fedora20
6565-+ # python2.7 (Apple install) under MacOSX
6666-+ # python2.7 (MacPorts install) under MacOSX
6767-+ # python3.4 (MacPorts install) under MacOSX
6868-+
6969-+ import sys
7070-+ import sysconfig
7171-+
7272-+ pyver = sysconfig.get_config_var('VERSION')
7373-+ getvar = sysconfig.get_config_var
7474-+
7575-+ libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
7676-+ if (hasattr(sys,'abiflags')):
7777-+ libs.append('-lpython' + pyver + sys.abiflags)
7878-+ else:
7979-+ libs.append('-lpython' + pyver)
8080-8181--# Add the library path, except /usr/lib* which causes troubles
8282--# on the link command line, as it basically overrides all other
8383--# custom paths coming after it. No need to put these paths on
8484--# command line, they are found implicitly by the linker.
8585--ldpath = getvar('LIBDIR')
8686--if ldpath not in ['/usr/lib','/usr/lib32','/usr/lib64']:
8787-- libs.insert(0, '-L' + getvar('LIBDIR'))
8888-+ # Add the library path, except /usr/lib* which causes troubles
8989-+ # on the link command line, as it basically overrides all other
9090-+ # custom paths coming after it. No need to put these paths on
9191-+ # command line, they are found implicitly by the linker.
9292-+ ldpath = getvar('LIBDIR')
9393-+ if ldpath not in ['/usr/lib','/usr/lib32','/usr/lib64']:
9494-+ libs.insert(0, '-L' + getvar('LIBDIR'))
9595-9696--# Framework (specific for Mac)
9797--if not getvar('PYTHONFRAMEWORK'):
9898-- libs.extend(getvar('LINKFORSHARED').split())
9999-+ # Framework (specific for Mac)
100100-+ if not getvar('PYTHONFRAMEWORK'):
101101-+ libs.extend(getvar('LINKFORSHARED').split())
102102-103103--print(' '.join(libs))
104104-+ print(' '.join(libs))