@ -1,16 +1,6 @@
{ lib , stdenv , fetchurl , zlib , perl , nixosTests }:
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.
# For a lack of a better predicate at the moment, we compare the platforms'
# system tuples. See also:
# * https://github.com/NixOS/nixpkgs/pull/140271
# * https://github.com/NixOS/nixpkgs/issues/61414
executableCross = stdenv . buildPlatform . system == stdenv . hostPlatform . system ;
# 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.
@ -20,9 +10,6 @@ let
else " C . U T F - 8 " ;
in
assert executableCross ||
throw " m a n d o c r e l i e s o n e x e c u t i n g c o m p i l e d p r o g r a m s i n c o n f i g u r e P h a s e , c a n ' t c r o s s c o m p i l e " ;
stdenv . mkDerivation rec {
pname = " m a n d o c " ;
version = " 1 . 1 4 . 6 " ;
@ -61,7 +48,7 @@ stdenv.mkDerivation rec {
printf ' % s' " $ c o n f i g u r e L o c a l " > configure . local
'' ;
doCheck = executableCross ;
doCheck = true ;
checkTarget = " r e g r e s s " ;
checkInputs = [ perl ] ;
preCheck = " p a t c h S h e b a n g s - - b u i l d r e g r e s s / r e g r e s s . p l " ;
@ -71,6 +58,19 @@ stdenv.mkDerivation rec {
} ;
meta = with lib ; {
# 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 which executes compiled programs
# for gathering information about the host system. Consequently, we can only
# allow “native” cross such as pkgsLLVM and pkgsStatic.
# For a lack of a better predicate at the moment, we compare the platforms'
# system tuples. See also:
# * https://github.com/NixOS/nixpkgs/pull/140271
# * https://github.com/NixOS/nixpkgs/issues/61414
# We need to use broken instead of, say a top level assert, to keep splicing
# working.
broken = stdenv . buildPlatform . system != stdenv . hostPlatform . system ;
homepage = " h t t p s : / / m a n d o c . b s d . l v / " ;
description = " s u i t e o f t o o l s c o m p i l i n g m d o c a n d m a n " ;
downloadPage = " h t t p : / / m a n d o c . b s d . l v / s n a p s h o t s / " ;