diff options
Diffstat (limited to 'pkgs/tools/misc/mandoc/default.nix')
-rw-r--r-- | pkgs/tools/misc/mandoc/default.nix | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/pkgs/tools/misc/mandoc/default.nix b/pkgs/tools/misc/mandoc/default.nix index 2d974b8af63dd..dc564776d893c 100644 --- a/pkgs/tools/misc/mandoc/default.nix +++ b/pkgs/tools/misc/mandoc/default.nix @@ -1,12 +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. - 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. @@ -16,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"; @@ -57,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"; @@ -67,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/"; |