minc_tools: migrate to by-name (#512527)

This commit is contained in:
Weijia Wang
2026-08-09 00:01:18 +00:00
committed by GitHub
2 changed files with 15 additions and 6 deletions

View File

@@ -6,14 +6,17 @@
makeWrapper,
flex,
bison,
perl,
TextFormat,
perlPackages,
libminc,
libjpeg,
nifticlib,
zlib,
}:
let
inherit (perlPackages) perl TextFormat;
in
stdenv.mkDerivation {
pname = "minc-tools";
version = "2.3.06-unstable-2024-11-28";
@@ -30,6 +33,16 @@ stdenv.mkDerivation {
# Upstream issue: https://github.com/BIC-MNI/minc-tools/issues/123
postPatch = ''
substituteInPlace CMakeLists.txt --replace-fail "SET CMP0026 OLD" "SET CMP0026 NEW"
# FIX: Rename the colliding NAN token to MINC_NAN in the flex/bison parser files
sed -i 's/\bNAN\b/MINC_NAN/g' progs/minccalc/gram.y progs/minccalc/lex.l
# FIX: Rename the colliding fdiv function to avoid glibc 2.42 <math.h> conflicts
sed -i 's/\bfdiv\b/minc_fdiv/g' progs/mincblob/mincblob.c
# FIX: Remove legacy unprototyped C declarations that break under GCC 15 strictness
sed -i 's/, \*mat_create()//g' conversion/minctoecat/ecat_write.c
sed -i 's/\*fopen(), //g' conversion/minctoecat/ecat_write.c
'';
nativeBuildInputs = [

View File

@@ -10181,10 +10181,6 @@ with pkgs;
useRx3d = true;
};
minc_tools = callPackage ../applications/science/biology/minc-tools {
inherit (perlPackages) perl TextFormat;
};
raxml-mpi = raxml.override { useMpi = true; };
### SCIENCE/MACHINE LEARNING