anchor.diff:      printf '%s' "$configureLocal" > configure.local
     '';
   
  -  doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
  +  doCheck = executableCross;
     checkTarget = "regress";
     checkInputs = [ perl ];
     preCheck = "patchShebangs --build regress/regress.pl";
  
positive.code:     then "en_US.UTF-8"
      else "C.UTF-8";
  in
  
  stdenv.mkDerivation rec {
    pname = "mandoc";
  
negative.code: { lib, stdenv, fetchurl, zlib, perl }:
  
  let
    # check if we can execute binaries for the host platform on the build platform
    # even though the platforms aren't the same. mandoc can't be cross compiled
    # (easily) because of its configurePhase, but we want to allow “native” cross
    # such as pkgsLLVM and pkgsStatic.
    executableCross = stdenv.hostPlatform.isCompatible stdenv.buildPlatform;
  
    # Name of an UTF-8 locale _always_ present at runtime, used for UTF-8 support
    # (locale set by the user may differ). This would usually be C.UTF-8, but
    # darwin has no such locale.
  