diff options
author | Jan Malakhovski <oxij@oxij.org> | 2018-02-01 00:00:00 +0000 |
---|---|---|
committer | Jan Malakhovski <oxij@oxij.org> | 2018-02-26 22:42:32 +0000 |
commit | 0ab1067d120e15a0fa8594f63441cb720f08f0c3 (patch) | |
tree | c34d5d709240109dcd75333d732a5b68f7007df0 /pkgs/build-support | |
parent | 0586da4b3784a99c103d61e199a239b91c9a57c4 (diff) |
bintools-wrapper: allow building without documentation
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/bintools-wrapper/default.nix | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 48fd8665cb47d..e88482397f2f3 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -5,7 +5,8 @@ # script that sets up the right environment variables so that the # compiler and the linker just "work". -{ name ? "", stdenvNoCC, nativeTools, noLibc ? false, nativeLibc, nativePrefix ? "" +{ name ? "" +, stdenvNoCC, nativeTools, propagateDoc ? !nativeTools, noLibc ? false, nativeLibc, nativePrefix ? "" , bintools ? null, libc ? null , coreutils ? null, shell ? stdenvNoCC.shell, gnugrep ? null , extraPackages ? [], extraBuildCommands ? "" @@ -15,7 +16,7 @@ with stdenvNoCC.lib; -assert nativeTools -> nativePrefix != ""; +assert nativeTools -> !propagateDoc && nativePrefix != ""; assert !nativeTools -> bintools != null && coreutils != null && gnugrep != null; assert !(nativeLibc && noLibc); @@ -83,7 +84,7 @@ stdenv.mkDerivation { inherit targetPrefix infixSalt; - outputs = [ "out" "info" "man" ]; + outputs = [ "out" ] ++ optionals propagateDoc [ "man" "info" ]; passthru = { inherit bintools libc nativeTools nativeLibc nativePrefix; @@ -111,7 +112,7 @@ stdenv.mkDerivation { '' set -u - mkdir -p $out/bin {$out,$info,$man}/nix-support + mkdir -p $out/bin $out/nix-support wrap() { local dst="$1" @@ -237,28 +238,27 @@ stdenv.mkDerivation { '') + optionalString (!nativeTools) '' - ## ## User env support ## # Propagate the underling unwrapped bintools so that if you - # install the wrapper, you get tools like objdump, the manpages, - # etc. as well (same for any binaries of libc). + # install the wrapper, you get tools like objdump (same for any + # binaries of libc). printWords ${bintools_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages + '' + + optionalString propagateDoc '' ## ## Man page and info support ## - printWords ${bintools.info or ""} \ - >> $info/nix-support/propagated-build-inputs - printWords ${bintools.man or ""} \ - >> $man/nix-support/propagated-build-inputs + mkdir -p $man/nix-support $info/nix-support + printWords ${bintools.man or ""} >> $man/nix-support/propagated-build-inputs + printWords ${bintools.info or ""} >> $info/nix-support/propagated-build-inputs '' + '' - ## ## Hardening support ## @@ -286,8 +286,8 @@ stdenv.mkDerivation { ## ## Extra custom steps ## - '' + + extraBuildCommands; inherit dynamicLinker expand-response-params; |