lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 18.03-beta 97 lines 2.8 kB view raw
1{ stdenv 2 3# Build time 4, fetchurl, pkgconfig, perl, texinfo, setupDebugInfoDirs 5 6# Run time 7, ncurses, readline, gmp, mpfr, expat, zlib, dejagnu 8 9, buildPlatform, hostPlatform, targetPlatform 10 11, pythonSupport ? hostPlatform == buildPlatform && !hostPlatform.isCygwin, python ? null 12, guile ? null 13 14# Additional dependencies for GNU/Hurd. 15, mig ? null, hurd ? null 16 17}: 18 19let 20 basename = "gdb-${version}"; 21 version = "8.1"; 22in 23 24assert targetPlatform.isHurd -> mig != null && hurd != null; 25assert pythonSupport -> python != null; 26 27stdenv.mkDerivation rec { 28 name = 29 stdenv.lib.optionalString (targetPlatform != hostPlatform) 30 (targetPlatform.config + "-") 31 + basename; 32 33 src = fetchurl { 34 url = "mirror://gnu/gdb/${basename}.tar.xz"; 35 sha256 = "0d2bpqk58fqlx21rbnk8mbcjlggzc9kb5sjirrfrrrjq70ka0qdg"; 36 }; 37 38 patches = [ ./debug-info-from-env.patch ]; 39 40 nativeBuildInputs = [ pkgconfig texinfo perl setupDebugInfoDirs ] 41 # TODO(@Ericson2314) not sure if should be host or target 42 ++ stdenv.lib.optional targetPlatform.isHurd mig; 43 44 buildInputs = [ ncurses readline gmp mpfr expat zlib guile ] 45 ++ stdenv.lib.optional pythonSupport python 46 ++ stdenv.lib.optional targetPlatform.isHurd hurd 47 ++ stdenv.lib.optional doCheck dejagnu; 48 49 propagatedNativeBuildInputs = [ setupDebugInfoDirs ]; 50 51 enableParallelBuilding = true; 52 53 # darwin build fails with format hardening since v7.12 54 hardeningDisable = stdenv.lib.optionals stdenv.isDarwin [ "format" ]; 55 56 NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral"; 57 58 # TODO(@Ericson2314): Always pass "--target" and always prefix. 59 configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 60 61 configureFlags = with stdenv.lib; [ 62 "--enable-targets=all" "--enable-64-bit-bfd" 63 "--disable-install-libbfd" 64 "--disable-shared" "--enable-static" 65 "--with-system-zlib" 66 "--with-system-readline" 67 68 "--with-gmp=${gmp.dev}" 69 "--with-mpfr=${mpfr.dev}" 70 "--with-expat" "--with-libexpat-prefix=${expat.dev}" 71 ] ++ stdenv.lib.optional (!pythonSupport) "--without-python"; 72 73 postInstall = 74 '' # Remove Info files already provided by Binutils and other packages. 75 rm -v $out/share/info/bfd.info 76 ''; 77 78 # TODO: Investigate & fix the test failures. 79 doCheck = false; 80 81 meta = with stdenv.lib; { 82 description = "The GNU Project debugger"; 83 84 longDescription = '' 85 GDB, the GNU Project debugger, allows you to see what is going 86 on `inside' another program while it executes -- or what another 87 program was doing at the moment it crashed. 88 ''; 89 90 homepage = http://www.gnu.org/software/gdb/; 91 92 license = stdenv.lib.licenses.gpl3Plus; 93 94 platforms = with platforms; linux ++ cygwin ++ darwin; 95 maintainers = with maintainers; [ pierron ]; 96 }; 97}