2015-06-26 12:29:44 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# This is a derivation specific to OS X (Darwin)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{gmp, mpfr, libmpc, isl_0_14, cloog, zlib, fetchurl, stdenv
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								, Libsystem
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}:
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-19 15:59:55 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								stdenv.mkDerivation rec {
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-22 00:31:14 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  name = "gfortran-${version}";
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-19 15:59:55 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  version = "5.1.0";
							 | 
						
					
						
							
								
									
										
										
										
											2015-06-26 12:29:44 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  buildInputs = [gmp mpfr libmpc isl_0_14 cloog zlib];
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-19 15:59:55 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  src = fetchurl {
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-22 00:31:14 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-19 15:59:55 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    sha256 = "1bd5vj4px3s8nlakbgrh38ynxq4s654m6nxz7lrj03mvkkwgvnmp";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  };
							 | 
						
					
						
							
								
									
										
										
										
											2015-06-26 12:29:44 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  patches = ./gfortran-darwin.patch;
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-19 15:59:55 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  configureFlags = ''
							 | 
						
					
						
							
								
									
										
										
										
											2015-06-26 12:29:44 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    --disable-bootstrap
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    --disable-cloog-version-check
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    --disable-isl-version-check
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    --disable-multilib
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    --enable-checking=release
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    --enable-languages=fortran
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    --with-cloog=${cloog}
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-19 15:59:55 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    --with-gmp=${gmp}
							 | 
						
					
						
							
								
									
										
										
										
											2015-06-26 12:29:44 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    --with-isl=${isl_0_14}
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-19 15:59:55 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    --with-mpc=${libmpc}
							 | 
						
					
						
							
								
									
										
										
										
											2015-06-26 12:29:44 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    --with-mpfr=${mpfr}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    --with-native-system-header-dir=${Libsystem}/include
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    --with-system-zlib
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  '';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  postConfigure = ''
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    export DYLD_LIBRARY_PATH=`pwd`/`uname -m`-apple-darwin`uname -r`/libgcc
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-19 15:59:55 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  '';
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-19 16:49:58 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  makeFlags = ["CC=clang"];
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-27 21:10:12 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  passthru.cc = stdenv.cc.cc;
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-22 00:31:14 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  meta = with stdenv.lib; {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    description = "GNU Fortran compiler, part of the GNU Compiler Collection.";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    homepage    = "https://gcc.gnu.org/fortran/";
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    license     = licenses.gpl3Plus;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    platforms   = platforms.darwin;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  };
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-19 15:59:55 -05:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |