diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 74bb94335654..1808b95f34d2 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -25,7 +25,8 @@ , libcCross ? null , crossStageStatic ? false , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd -, stripped ? true +, # Strip kills static libs of other archs (hence no cross) + stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null , darwin ? null , buildPlatform, hostPlatform, targetPlatform @@ -371,9 +372,11 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - buildFlags = if bootstrap then - (if profiledCompiler then "profiledbootstrap" else "bootstrap") - else ""; + buildFlags = optional + (bootstrap && hostPlatform == buildPlatform) + (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + + dontStrip = !stripped; doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv @@ -382,12 +385,6 @@ stdenv.mkDerivation ({ then "install-strip" else "install"; - /* For cross-built gcc (build != host == target) */ - crossAttrs = { - dontStrip = true; - buildFlags = ""; - }; - # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; @@ -489,8 +486,5 @@ stdenv.mkDerivation ({ installTargets = "install-gcc install-target-libgcc"; } -# Strip kills static libs of other archs (hence targetPlatform != hostPlatform) -// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; } - // optionalAttrs (enableMultilib) { dontMoveLib64 = true; } ) diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 3976be0476ad..05305dead06a 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -25,7 +25,8 @@ , libcCross ? null , crossStageStatic ? false , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd -, stripped ? true +, # Strip kills static libs of other archs (hence no cross) + stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null , darwin ? null , buildPlatform, hostPlatform, targetPlatform @@ -393,9 +394,11 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - buildFlags = if bootstrap then - (if profiledCompiler then "profiledbootstrap" else "bootstrap") - else ""; + buildFlags = optional + (bootstrap && hostPlatform == buildPlatform) + (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + + dontStrip = !stripped; doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv @@ -404,12 +407,6 @@ stdenv.mkDerivation ({ then "install-strip" else "install"; - /* For cross-built gcc (build != host == target) */ - crossAttrs = { - dontStrip = true; - buildFlags = ""; - }; - # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; @@ -507,9 +504,6 @@ stdenv.mkDerivation ({ installTargets = "install-gcc install-target-libgcc"; } -# Strip kills static libs of other archs (hence targetPlatform != hostPlatform) -// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; } - // optionalAttrs (enableMultilib) { dontMoveLib64 = true; } // optionalAttrs (langJava) { diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 1179be7d79c7..3d9f471e5030 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -25,7 +25,8 @@ , libcCross ? null , crossStageStatic ? false , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd -, stripped ? true +, # Strip kills static libs of other archs (hence no cross) + stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , darwin ? null @@ -396,9 +397,11 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - buildFlags = if bootstrap then - (if profiledCompiler then "profiledbootstrap" else "bootstrap") - else ""; + buildFlags = optional + (bootstrap && hostPlatform == buildPlatform) + (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + + dontStrip = !stripped; doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv @@ -407,12 +410,6 @@ stdenv.mkDerivation ({ then "install-strip" else "install"; - /* For cross-built gcc (build != host == target) */ - crossAttrs = { - dontStrip = true; - buildFlags = ""; - }; - # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; @@ -510,8 +507,5 @@ stdenv.mkDerivation ({ installTargets = "install-gcc install-target-libgcc"; } -# Strip kills static libs of other archs (hence targetPlatform != hostPlatform) -// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; } - // optionalAttrs (enableMultilib) { dontMoveLib64 = true; } ) diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index e2d69c059829..1f56f6e573ed 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -25,7 +25,8 @@ , libcCross ? null , crossStageStatic ? false , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd -, stripped ? true +, # Strip kills static libs of other archs (hence no cross) + stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , darwin ? null @@ -400,8 +401,11 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - buildFlags = - optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + buildFlags = optional + (bootstrap && hostPlatform == buildPlatform) + (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + + dontStrip = !stripped; doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv @@ -410,12 +414,6 @@ stdenv.mkDerivation ({ then "install-strip" else "install"; - /* For cross-built gcc (build != host == target) */ - crossAttrs = { - dontStrip = true; - buildFlags = ""; - }; - # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; @@ -513,9 +511,6 @@ stdenv.mkDerivation ({ installTargets = "install-gcc install-target-libgcc"; } -# Strip kills static libs of other archs (hence targetPlatform != hostPlatform) -// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; } - // optionalAttrs (enableMultilib) { dontMoveLib64 = true; } // optionalAttrs (langJava) { diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index c25c2a260295..b5da4c8c7666 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -18,7 +18,8 @@ , libcCross ? null , crossStageStatic ? false , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd -, stripped ? true +, # Strip kills static libs of other archs (hence no cross) + stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , darwin ? null @@ -352,8 +353,11 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - buildFlags = - optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + buildFlags = optional + (bootstrap && hostPlatform == buildPlatform) + (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + + dontStrip = !stripped; doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv @@ -362,12 +366,6 @@ stdenv.mkDerivation ({ then "install-strip" else "install"; - /* For cross-built gcc (build != host == target) */ - crossAttrs = { - dontStrip = true; - buildFlags = ""; - }; - # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; @@ -454,8 +452,5 @@ stdenv.mkDerivation ({ installTargets = "install-gcc install-target-libgcc"; } -# Strip kills static libs of other archs (hence targetPlatform != hostPlatform) -// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; } - // optionalAttrs (enableMultilib) { dontMoveLib64 = true; } ) diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 2465e6149c0a..239735bc6574 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -18,7 +18,8 @@ , libcCross ? null , crossStageStatic ? false , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd -, stripped ? true +, # Strip kills static libs of other archs (hence no cross) + stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , darwin ? null @@ -347,20 +348,17 @@ stdenv.mkDerivation ({ targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; - buildFlags = - optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + buildFlags = optional + (bootstrap && hostPlatform == buildPlatform) + (if profiledCompiler then "profiledbootstrap" else "bootstrap"); + + dontStrip = !stripped; installTargets = if stripped then "install-strip" else "install"; - /* For cross-built gcc (build != host == target) */ - crossAttrs = { - dontStrip = true; - buildFlags = ""; - }; - # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; @@ -447,8 +445,5 @@ stdenv.mkDerivation ({ installTargets = "install-gcc install-target-libgcc"; } -# Strip kills static libs of other archs (hence targetPlatform != hostPlatform) -// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; } - // optionalAttrs (enableMultilib) { dontMoveLib64 = true; } ) diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index ed7634b87db3..1af8c75669ed 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -18,7 +18,8 @@ , libcCross ? null , crossStageStatic ? false , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd -, stripped ? true +, # Strip kills static libs of other archs (hence no cross) + stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , darwin ? null @@ -318,17 +319,14 @@ stdenv.mkDerivation ({ (if profiledCompiler then "profiledbootstrap" else "bootstrap") else ""; + dontStrip = !stripped; + NIX_STRIP_DEBUG = !stripped; + installTargets = if stripped then "install-strip" else "install"; - /* For cross-built gcc (build != host == target) */ - crossAttrs = { - dontStrip = true; - buildFlags = ""; - }; - # http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; @@ -417,8 +415,5 @@ stdenv.mkDerivation ({ installTargets = "install-gcc install-target-libgcc"; } -# Strip kills static libs of other archs (hence targetPlatform != hostPlatform) -// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; NIX_STRIP_DEBUG = 0; } - // optionalAttrs (enableMultilib) { dontMoveLib64 = true; } ) diff --git a/pkgs/development/libraries/libmsgpack/generic.nix b/pkgs/development/libraries/libmsgpack/generic.nix index 889ef1347732..947960d23592 100644 --- a/pkgs/development/libraries/libmsgpack/generic.nix +++ b/pkgs/development/libraries/libmsgpack/generic.nix @@ -13,13 +13,12 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - crossAttrs = { - } // stdenv.lib.optionalAttrs (hostPlatform.libc == "msvcrt") { - cmakeFlags = [ - "-DMSGPACK_BUILD_EXAMPLES=OFF" - "-DCMAKE_SYSTEM_NAME=Windows" - ]; - }; + cmakeFlags = [] + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) + "-DMSGPACK_BUILD_EXAMPLES=OFF" + ++ stdenv.lib.optional (hostPlatform.libc == "msvcrt") + "-DCMAKE_SYSTEM_NAME=Windows" + ; meta = with stdenv.lib; { description = "MessagePack implementation for C and C++"; diff --git a/pkgs/development/libraries/libpcap/default.nix b/pkgs/development/libraries/libpcap/default.nix index bef5f9a9da34..945554386930 100644 --- a/pkgs/development/libraries/libpcap/default.nix +++ b/pkgs/development/libraries/libpcap/default.nix @@ -12,10 +12,16 @@ stdenv.mkDerivation rec { # We need to force the autodetection because detection doesn't # work in pure build enviroments. - configureFlags = - if stdenv.isLinux then [ "--with-pcap=linux" ] - else if stdenv.isDarwin then [ "--with-pcap=bpf" ] - else []; + configureFlags = [ + ("--with-pcap=" + { + linux = "linux"; + darwin = "bpf"; + }.${stdenv.hostPlatform.parsed.kernel.name}) + ] ++ stdenv.lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ + "ac_cv_linux_vers=2" + ]; + + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; prePatch = stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace configure --replace " -arch i386" "" @@ -39,12 +45,6 @@ stdenv.mkDerivation rec { preInstall = ''mkdir -p $out/bin''; - crossAttrs = { - # Stripping hurts in static libraries - dontStrip = true; - configureFlags = configureFlags ++ [ "ac_cv_linux_vers=2" ]; - }; - meta = with stdenv.lib; { homepage = http://www.tcpdump.org; description = "Packet Capture Library"; diff --git a/pkgs/development/libraries/librsync/0.9.nix b/pkgs/development/libraries/librsync/0.9.nix index 0954694cf290..115f4cd90a0c 100644 --- a/pkgs/development/libraries/librsync/0.9.nix +++ b/pkgs/development/libraries/librsync/0.9.nix @@ -12,9 +12,7 @@ stdenv.mkDerivation { configureFlags = if stdenv.isCygwin then "--enable-static" else "--enable-shared"; - crossAttrs = { - dontStrip = true; - }; + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; meta = { homepage = http://librsync.sourceforge.net/; diff --git a/pkgs/development/libraries/librsync/default.nix b/pkgs/development/libraries/librsync/default.nix index 80acaf57d625..afb83051b211 100644 --- a/pkgs/development/libraries/librsync/default.nix +++ b/pkgs/development/libraries/librsync/default.nix @@ -14,9 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ perl zlib bzip2 popt ]; - crossAttrs = { - dontStrip = true; - }; + dontStrip = stdenv.hostPlatform != stdenv.buildPlatform; meta = with stdenv.lib; { homepage = http://librsync.sourceforge.net/; diff --git a/pkgs/development/libraries/libvpx/default.nix b/pkgs/development/libraries/libvpx/default.nix index 466ffa0cf181..731892d33b4d 100644 --- a/pkgs/development/libraries/libvpx/default.nix +++ b/pkgs/development/libraries/libvpx/default.nix @@ -72,6 +72,7 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" ]; setOutputFlags = false; + configurePlatforms = []; configureFlags = [ (enableFeature (vp8EncoderSupport || vp8DecoderSupport) "vp8") (enableFeature vp8EncoderSupport "vp8-encoder") @@ -131,8 +132,29 @@ stdenv.mkDerivation rec { (enableFeature (experimentalSpatialSvcSupport || experimentalFpMbStatsSupport || experimentalEmulateHardwareSupport) "experimental") - # Experimental features - ] ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc" + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + #"--extra-cflags=" + #"--extra-cxxflags=" + #"--prefix=" + #"--libc=" + #"--libdir=" + "--enable-external-build" + # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) + # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure + # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14 + "--force-target=${hostPlatform.config}${ + if hostPlatform.isDarwin then + if hostPlatform.osxMinVersion == "10.10" then "14" + else if hostPlatform.osxMinVersion == "10.9" then "13" + else if hostPlatform.osxMinVersion == "10.8" then "12" + else if hostPlatform.osxMinVersion == "10.7" then "11" + else if hostPlatform.osxMinVersion == "10.6" then "10" + else if hostPlatform.osxMinVersion == "10.5" then "9" + else "8" + else ""}-gcc" + (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "") + ] # Experimental features + ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc" ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats" ++ optional experimentalEmulateHardwareSupport "--enable-emulate-hardware"; @@ -145,32 +167,6 @@ stdenv.mkDerivation rec { postInstall = ''moveToOutput bin "$bin" ''; - crossAttrs = { - configurePlatforms = []; - configureFlags = configureFlags ++ [ - #"--extra-cflags=" - #"--extra-cxxflags=" - #"--prefix=" - #"--libc=" - #"--libdir=" - "--enable-external-build" - # libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version) - # See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure - # Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14 - "--force-target=${hostPlatform.config}${ - if hostPlatform.isDarwin then - if hostPlatform.osxMinVersion == "10.10" then "14" - else if hostPlatform.osxMinVersion == "10.9" then "13" - else if hostPlatform.osxMinVersion == "10.8" then "12" - else if hostPlatform.osxMinVersion == "10.7" then "11" - else if hostPlatform.osxMinVersion == "10.6" then "10" - else if hostPlatform.osxMinVersion == "10.5" then "9" - else "8" - else ""}-gcc" - (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "") - ]; - }; - meta = with stdenv.lib; { description = "WebM VP8/VP9 codec SDK"; homepage = https://www.webmproject.org/; diff --git a/pkgs/development/libraries/libvpx/git.nix b/pkgs/development/libraries/libvpx/git.nix index e2b94dda28e7..7d4b75d6cdf8 100644 --- a/pkgs/development/libraries/libvpx/git.nix +++ b/pkgs/development/libraries/libvpx/git.nix @@ -77,6 +77,7 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" ]; setOutputFlags = false; + configurePlatforms = []; configureFlags = [ (enableFeature (vp8EncoderSupport || vp8DecoderSupport) "vp8") (enableFeature vp8EncoderSupport "vp8-encoder") @@ -139,23 +140,7 @@ stdenv.mkDerivation rec { (enableFeature (experimentalSpatialSvcSupport || experimentalFpMbStatsSupport || experimentalEmulateHardwareSupport) "experimental") - # Experimental features - ] ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc" - ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats" - ++ optional experimentalEmulateHardwareSupport "--enable-emulate-hardware"; - - nativeBuildInputs = [ perl yasm ]; - - buildInputs = [ ] - ++ optionals unitTestsSupport [ coreutils curl ]; - - enableParallelBuilding = true; - - postInstall = ''moveToOutput bin "$bin" ''; - - crossAttrs = { - configurePlatforms = []; - configureFlags = configureFlags ++ [ + ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ #"--extra-cflags=" #"--prefix=" #"--libc=" @@ -175,8 +160,19 @@ stdenv.mkDerivation rec { else "8" else ""}-gcc" (if hostPlatform.isCygwin then "--enable-static-msvcrt" else "") - ]; - }; + ] # Experimental features + ++ optional experimentalSpatialSvcSupport "--enable-spatial-svc" + ++ optional experimentalFpMbStatsSupport "--enable-fp-mb-stats" + ++ optional experimentalEmulateHardwareSupport "--enable-emulate-hardware"; + + nativeBuildInputs = [ perl yasm ]; + + buildInputs = [ ] + ++ optionals unitTestsSupport [ coreutils curl ]; + + enableParallelBuilding = true; + + postInstall = ''moveToOutput bin "$bin" ''; meta = with stdenv.lib; { description = "WebM VP8/VP9 codec SDK"; diff --git a/pkgs/tools/networking/tcpdump/default.nix b/pkgs/tools/networking/tcpdump/default.nix index 324a58cf7edb..59cc89ac5727 100644 --- a/pkgs/tools/networking/tcpdump/default.nix +++ b/pkgs/tools/networking/tcpdump/default.nix @@ -1,6 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, libpcap, enableStatic ? false -, hostPlatform -}: +{ stdenv, fetchurl, fetchpatch, libpcap }: stdenv.mkDerivation rec { name = "tcpdump-${version}"; @@ -20,11 +18,9 @@ stdenv.mkDerivation rec { buildInputs = [ libpcap ]; - crossAttrs = { - LDFLAGS = if enableStatic then "-static" else ""; - configureFlags = [ "ac_cv_linux_vers=2" ] ++ (stdenv.lib.optional - (hostPlatform.platform.kernelMajor or null == "2.4") "--disable-ipv6"); - }; + configureFlags = stdenv.lib.optional + (stdenv.hostPlatform != stdenv.buildPlatform) + "ac_cv_linux_vers=2"; meta = { description = "Network sniffer"; diff --git a/pkgs/tools/text/groff/default.nix b/pkgs/tools/text/groff/default.nix index 4495a85b2885..27581134ca34 100644 --- a/pkgs/tools/text/groff/default.nix +++ b/pkgs/tools/text/groff/default.nix @@ -50,15 +50,14 @@ stdenv.mkDerivation rec { "ac_cv_path_PERL=${buildPackages.perl}/bin/perl" ]; - doCheck = true; - - crossAttrs = { + makeFlags = stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ # Trick to get the build system find the proper 'native' groff # http://www.mail-archive.com/bug-groff@gnu.org/msg01335.html - preBuild = '' - makeFlags="GROFF_BIN_PATH=${buildPackages.groff}/bin GROFFBIN=${buildPackages.groff}/bin/groff" - ''; - }; + "GROFF_BIN_PATH=${buildPackages.groff}/bin" + "GROFFBIN=${buildPackages.groff}/bin/groff" + ]; + + doCheck = true; # Remove example output with (random?) colors and creation date # to avoid non-determinism in the output.