1 { fetchurl, lib, stdenv }:
3 stdenv.mkDerivation rec {
8 url = "mirror://gnu/gsl/${pname}-${version}.tar.gz";
9 sha256 = "sha256-3LD71DBIgyt1f/mUJpGo3XACbV2g/4VgHlJof23us0s=";
12 preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then ''
13 MACOSX_DEPLOYMENT_TARGET=10.16
16 # do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html)
17 NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isx86_64 "-mno-fma";
19 # https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html
20 doCheck = stdenv.hostPlatform.system != "i686-linux";
23 description = "The GNU Scientific Library, a large numerical library";
24 homepage = "https://www.gnu.org/software/gsl/";
25 license = lib.licenses.gpl3Plus;
28 The GNU Scientific Library (GSL) is a numerical library for C
29 and C++ programmers. It is free software under the GNU General
32 The library provides a wide range of mathematical routines such
33 as random number generators, special functions and least-squares
34 fitting. There are over 1000 functions in total with an
37 platforms = lib.platforms.unix;