16 stdenv.mkDerivation rec {
17 version = "2024.06.12.0";
19 year = lib.versions.major version;
23 "https://ftp.riken.jp/cernlib/download/${year}_source/tar/cernlib-cernlib-${version}-free.tar.gz"
24 "https://cernlib.web.cern.ch/download/${year}_source/tar/cernlib-cernlib-${version}-free.tar.gz"
26 hash = "sha256-SEFgQjPBkmRoaMD/7yXiXO9DZNrRhqZ01kptSDQur84=";
31 url = "https://github.com/user-attachments/files/16832928/geant321-fix-weak-alias-on-darwin.patch";
32 hash = "sha256-YzaUh4rJBszGdp5s/HDQMI5qQhCGrTt9P6XCgZOFn1I=";
37 substituteInPlace CMakeLists.txt \
38 --replace-fail "find_program ( SED NAMES gsed" "find_program ( SED NAMES sed"
41 # gfortran warning's on iframework messes with CMake's check_fortran_compiler_flag
42 # see also https://github.com/NixOS/nixpkgs/issues/27218
44 export NIX_CFLAGS_COMPILE="$(echo $NIX_CFLAGS_COMPILE | sed 's|-iframework [^ ]*||g')"
47 nativeBuildInputs = [ cmake ];
48 buildInputs = with xorg; [
58 ] ++ lib.optional stdenv.hostPlatform.isLinux libnsl;
60 setupHook = ./setup-hook.sh;
63 homepage = "http://cernlib.web.cern.ch";
64 description = "Legacy collection of libraries and modules for data analysis in high energy physics";
71 maintainers = with lib.maintainers; [ veprbl ];
72 license = lib.licenses.gpl2;