lol
at 24.05-pre 45 lines 1.5 kB view raw
1{ fetchurl, lib, stdenv }: 2 3stdenv.mkDerivation rec { 4 pname = "gsl"; 5 version = "2.7.1"; 6 7 outputs = [ "out" "dev" ]; 8 9 src = fetchurl { 10 url = "mirror://gnu/gsl/${pname}-${version}.tar.gz"; 11 sha256 = "sha256-3LD71DBIgyt1f/mUJpGo3XACbV2g/4VgHlJof23us0s="; 12 }; 13 14 preConfigure = if (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11" && stdenv.isDarwin) then '' 15 MACOSX_DEPLOYMENT_TARGET=10.16 16 '' else null; 17 18 postInstall = '' 19 moveToOutput bin/gsl-config "$dev" 20 ''; 21 22 # do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html) 23 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isx86_64 "-mno-fma"; 24 25 # https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html 26 doCheck = stdenv.hostPlatform.system != "i686-linux"; 27 28 meta = { 29 description = "The GNU Scientific Library, a large numerical library"; 30 homepage = "https://www.gnu.org/software/gsl/"; 31 license = lib.licenses.gpl3Plus; 32 33 longDescription = '' 34 The GNU Scientific Library (GSL) is a numerical library for C 35 and C++ programmers. It is free software under the GNU General 36 Public License. 37 38 The library provides a wide range of mathematical routines such 39 as random number generators, special functions and least-squares 40 fitting. There are over 1000 functions in total with an 41 extensive test suite. 42 ''; 43 platforms = lib.platforms.all; 44 }; 45}