diff options
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r-- | pkgs/development/tools/build-managers/cmake/default.nix | 22 | ||||
-rw-r--r-- | pkgs/development/tools/misc/automake/automake-1.15.x.nix | 3 | ||||
-rw-r--r-- | pkgs/development/tools/misc/libtool/libtool2.nix | 2 | ||||
-rw-r--r-- | pkgs/development/tools/misc/lsof/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/tools/misc/texinfo/5.2.nix | 9 | ||||
-rw-r--r-- | pkgs/development/tools/misc/texinfo/6.5.nix | 11 | ||||
-rw-r--r-- | pkgs/development/tools/parsing/flex/default.nix | 29 |
7 files changed, 54 insertions, 27 deletions
diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index a2f5ee0325bf..fed88561cf9c 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, pkgconfig , bzip2, curl, expat, libarchive, xz, zlib, libuv, rhash +, majorVersion ? "3.10" # darwin attributes , ps , isBootstrap ? false @@ -14,10 +15,23 @@ assert useQt4 -> withQt5 == false; with stdenv.lib; +with ( + { + "3.10" = { + minorVersion = "2"; + sha256 = "80d0faad4ab56de07aa21a7fc692c88c4ce6156d42b0579c6962004a70a3218b"; + }; + "3.9" = { + minorVersion = "6"; + sha256 = "7410851a783a41b521214ad987bb534a7e4a65e059651a2514e6ebfc8f46b218"; + }; + + }.${majorVersion} + or (abort ''Unsupported configuration for cmake: majorVersion = "${majorVersion}";'') +); + let os = stdenv.lib.optionalString; - majorVersion = "3.9"; - minorVersion = "6"; version = "${majorVersion}.${minorVersion}"; in @@ -28,8 +42,8 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz"; - # from https://cmake.org/files/v3.9/cmake-3.9.6-SHA-256.txt - sha256 = "7410851a783a41b521214ad987bb534a7e4a65e059651a2514e6ebfc8f46b218"; + # from https://cmake.org/files/v3.10/cmake-3.10.2-SHA-256.txt + inherit sha256; }; prePatch = optionalString (!useSharedLibraries) '' diff --git a/pkgs/development/tools/misc/automake/automake-1.15.x.nix b/pkgs/development/tools/misc/automake/automake-1.15.x.nix index d6399e128a39..507df5def0c1 100644 --- a/pkgs/development/tools/misc/automake/automake-1.15.x.nix +++ b/pkgs/development/tools/misc/automake/automake-1.15.x.nix @@ -8,7 +8,8 @@ stdenv.mkDerivation rec { sha256 = "1bzd9g32dfm4rsbw93ld9x7b5nc1y6i4m6zp032qf1i28a8s6sxg"; }; - buildInputs = [ perl autoconf ]; + nativeBuildInputs = [ autoconf perl ]; + buildInputs = [ autoconf ]; setupHook = ./setup-hook.sh; diff --git a/pkgs/development/tools/misc/libtool/libtool2.nix b/pkgs/development/tools/misc/libtool/libtool2.nix index bf134c459d97..85821ee2089d 100644 --- a/pkgs/development/tools/misc/libtool/libtool2.nix +++ b/pkgs/development/tools/misc/libtool/libtool2.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "lib" ]; - nativeBuildInputs = [ perl help2man ]; + nativeBuildInputs = [ perl help2man m4 ]; propagatedBuildInputs = [ m4 ]; # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the diff --git a/pkgs/development/tools/misc/lsof/default.nix b/pkgs/development/tools/misc/lsof/default.nix index 76c83e2dbeb0..aa6bd003ed3f 100644 --- a/pkgs/development/tools/misc/lsof/default.nix +++ b/pkgs/development/tools/misc/lsof/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ncurses }: +{ stdenv, fetchurl, buildPackages, ncurses }: let dialect = with stdenv.lib; last (splitString "-" stdenv.system); in @@ -6,6 +6,7 @@ stdenv.mkDerivation rec { name = "lsof-${version}"; version = "4.89"; + depsBuildBuild = [ buildPackages.stdenv.cc ]; buildInputs = [ ncurses ]; src = fetchurl { @@ -31,7 +32,7 @@ stdenv.mkDerivation rec { # Stop build scripts from searching global include paths LSOF_INCLUDE = "${stdenv.cc.libc}/include"; - configurePhase = "./Configure -n ${dialect}"; + configurePhase = "LINUX_CONF_CC=$CC_FOR_BUILD LSOF_CC=$CC LSOF_AR=\"$AR cr\" LSOF_RANLIB=$RANLIB ./Configure -n ${dialect}"; preBuild = '' sed -i Makefile -e 's/^CFGF=/& -DHASIPv6=1/;' -e 's/-lcurses/-lncurses/' for filepath in $(find dialects/${dialect} -type f); do diff --git a/pkgs/development/tools/misc/texinfo/5.2.nix b/pkgs/development/tools/misc/texinfo/5.2.nix index 571af764fcf7..0feb4b943df3 100644 --- a/pkgs/development/tools/misc/texinfo/5.2.nix +++ b/pkgs/development/tools/misc/texinfo/5.2.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ncurses, perl, xz, procps, interactive ? false }: +{ stdenv, buildPackages, fetchurl, ncurses, perl, xz, procps, interactive ? false }: with stdenv.lib; @@ -10,10 +10,17 @@ stdenv.mkDerivation rec { sha256 = "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal"; }; + # We need a native compiler to build perl XS extensions + # when cross-compiling. + depsBuildBuild = [ buildPackages.stdenv.cc perl ]; + buildInputs = [ perl xz.bin ] ++ optional interactive ncurses ++ optional doCheck procps; # for tests + configureFlags = [ "PERL=${buildPackages.perl}/bin/perl" ] + ++ stdenv.lib.optional stdenv.isSunOS "AWK=${gawk}/bin/awk"; + preInstall = '' installFlags="TEXMF=$out/texmf-dist"; installTargets="install install-tex"; diff --git a/pkgs/development/tools/misc/texinfo/6.5.nix b/pkgs/development/tools/misc/texinfo/6.5.nix index 4691df6917b4..afa7e9a0a206 100644 --- a/pkgs/development/tools/misc/texinfo/6.5.nix +++ b/pkgs/development/tools/misc/texinfo/6.5.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ncurses, perl, xz, libiconv, gawk, procps, interactive ? false }: +{ stdenv, buildPackages, fetchurl, ncurses, perl, xz, libiconv, gawk, procps, interactive ? false }: with stdenv.lib; @@ -10,12 +10,17 @@ stdenv.mkDerivation rec { sha256 = "0qjzvbvnv9003xdrcpi3jp7y68j4hq2ciw9frh2hghh698zlnxvp"; }; - buildInputs = [ perl xz ] + # We need a native compiler to build perl XS extensions + # when cross-compiling. + depsBuildBuild = [ buildPackages.stdenv.cc perl ]; + + buildInputs = [ xz ] ++ optionals stdenv.isSunOS [ libiconv gawk ] ++ optional interactive ncurses ++ optional doCheck procps; # for tests - configureFlags = stdenv.lib.optional stdenv.isSunOS "AWK=${gawk}/bin/awk"; + configureFlags = [ "PERL=${buildPackages.perl}/bin/perl" ] + ++ stdenv.lib.optional stdenv.isSunOS "AWK=${gawk}/bin/awk"; preInstall = '' installFlags="TEXMF=$out/texmf-dist"; diff --git a/pkgs/development/tools/parsing/flex/default.nix b/pkgs/development/tools/parsing/flex/default.nix index 4ea11a622ea1..17323a06cc18 100644 --- a/pkgs/development/tools/parsing/flex/default.nix +++ b/pkgs/development/tools/parsing/flex/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, bison, m4 +{ stdenv, buildPackages, fetchurl, bison, m4 , fetchpatch, autoreconfHook, help2man }: @@ -19,28 +19,27 @@ stdenv.mkDerivation rec { + "/tools/flex/patches/200-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch"; sha256 = "1aarhcmz7mfrgh15pkj6f7ikxa2m0mllw1i1vscsf1kw5d05lw6f"; })]; - nativeBuildInputs = [ autoreconfHook help2man ]; + postPatch = stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + substituteInPlace Makefile.in --replace "tests" " " - buildInputs = [ bison ]; + substituteInPlace doc/Makefile.am --replace 'flex.1: $(top_srcdir)/configure.ac' 'flex.1: ' + ''; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ autoreconfHook help2man ]; + buildInputs = [ bison ]; propagatedBuildInputs = [ m4 ]; + preConfigure = stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + export ac_cv_func_malloc_0_nonnull=yes + export ac_cv_func_realloc_0_nonnull=yes + ''; + postConfigure = stdenv.lib.optionalString (stdenv.isDarwin || stdenv.isCygwin) '' sed -i Makefile -e 's/-no-undefined//;' ''; - crossAttrs = { - - # disable tests which can't run on build machine - postPatch = '' - substituteInPlace Makefile.in --replace "tests" " "; - ''; - - preConfigure = '' - export ac_cv_func_malloc_0_nonnull=yes - export ac_cv_func_realloc_0_nonnull=yes - ''; - }; + dontDisableStatic = stdenv.buildPlatform != stdenv.hostPlatform; meta = { homepage = https://github.com/westes/flex; |