Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{lib, stdenv, fetchurl, unzip}: 2 3stdenv.mkDerivation rec { 4 pname = "libf2c"; 5 version = "20160102"; 6 7 src = fetchurl { 8 url = "http://www.netlib.org/f2c/libf2c.zip"; 9 sha256 = "1q78y8j8xpl8zdzdxmn5ablss56hi5a7vz3idam9l2nfx5q40h6a"; 10 }; 11 12 unpackPhase = '' 13 mkdir build 14 cd build 15 unzip ${src} 16 ''; 17 18 makeFlags = [ "-f" "makefile.u" ]; 19 20 installPhase = '' 21 mkdir -p $out/include $out/lib 22 cp libf2c.a $out/lib 23 cp f2c.h $out/include 24 ''; 25 26 nativeBuildInputs = [ unzip ]; 27 28 hardeningDisable = [ "format" ]; 29 30 # Makefile is missing depepdencies on generated headers: 31 # main.c:4:10: fatal error: signal1.h: No such file or directory 32 enableParallelBuilding = false; 33 34 meta = { 35 description = "F2c converts Fortran 77 source code to C"; 36 homepage = "http://www.netlib.org/f2c/"; 37 license = lib.licenses.mit; 38 platforms = lib.platforms.unix; 39 }; 40}