diff --git a/pkgs/tools/misc/mandoc/default.nix b/pkgs/tools/misc/mandoc/default.nix index 292a28bf313..dc564776d89 100644 --- a/pkgs/tools/misc/mandoc/default.nix +++ b/pkgs/tools/misc/mandoc/default.nix @@ -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.UTF-8"; in -assert executableCross || - throw "mandoc relies on executing compiled programs in configurePhase, can't cross compile"; - stdenv.mkDerivation rec { pname = "mandoc"; version = "1.14.6"; @@ -61,7 +48,7 @@ stdenv.mkDerivation rec { printf '%s' "$configureLocal" > configure.local ''; - doCheck = executableCross; + doCheck = true; checkTarget = "regress"; checkInputs = [ perl ]; preCheck = "patchShebangs --build regress/regress.pl"; @@ -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 = "https://mandoc.bsd.lv/"; description = "suite of tools compiling mdoc and man"; downloadPage = "http://mandoc.bsd.lv/snapshots/";