diff options
author | Will Dietz <w@wdtz.org> | 2018-01-10 17:33:19 -0600 |
---|---|---|
committer | Will Dietz <w@wdtz.org> | 2018-02-13 09:44:29 -0600 |
commit | e6da426a54cbc754faa67c79888bcac49ef89a73 (patch) | |
tree | 64edc3a7ebc8f51267ac2bacba0dc43b4425f173 /pkgs/tools/misc/man-db | |
parent | 37c2ac90e6819c43fa1a1fc87a9c1f3ffc19957b (diff) |
man-db: fix cross
Diffstat (limited to 'pkgs/tools/misc/man-db')
-rw-r--r-- | pkgs/tools/misc/man-db/default.nix | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix index d0cb9a2233668..eadb736aeeb2a 100644 --- a/pkgs/tools/misc/man-db/default.nix +++ b/pkgs/tools/misc/man-db/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff, makeWrapper }: +{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff, libiconv, makeWrapper, buildPackages }: stdenv.mkDerivation rec { name = "man-db-2.7.5"; @@ -11,8 +11,10 @@ stdenv.mkDerivation rec { outputs = [ "out" "doc" ]; outputMan = "out"; # users will want `man man` to work - nativeBuildInputs = [ pkgconfig makeWrapper ]; - buildInputs = [ libpipeline db groff ]; + nativeBuildInputs = [ pkgconfig makeWrapper groff ] + ++ stdenv.lib.optionals doCheck checkInputs; + buildInputs = [ libpipeline db groff ]; # (Yes, 'groff' is both native and build input) + checkInputs = [ libiconv /* for 'iconv' binary */ ]; postPatch = '' substituteInPlace src/man_db.conf.in \ @@ -41,6 +43,18 @@ stdenv.mkDerivation rec { done ''; + postFixup = stdenv.lib.optionalString (buildPackages.groff != groff) '' + # Check to make sure none of the outputs depend on build-time-only groff: + for outName in $outputs; do + out=''${!outName} + echo "Checking $outName(=$out) for references to build-time groff..." + if grep -r '${buildPackages.groff}' $out; then + echo "Found an erroneous dependency on groff ^^^" >&2 + exit 1 + fi + done + ''; + enableParallelBuilding = true; doCheck = true; |