diff options
author | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2020-05-01 08:49:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-01 08:49:56 +0200 |
commit | 2da19f948373cc8c205183ff4151753fe2fe7374 (patch) | |
tree | bbfca73cff5caead6af1fd0bb08043a7ab3dc4dc /pkgs | |
parent | 90c503237a242aaa043cd1b3ddbb81c92a36a9ae (diff) | |
parent | c00ad799a084ec2896ebfefff3ae6b31eade49d5 (diff) | |
download | nixpkgs-2da19f948373cc8c205183ff4151753fe2fe7374.tar nixpkgs-2da19f948373cc8c205183ff4151753fe2fe7374.tar.gz nixpkgs-2da19f948373cc8c205183ff4151753fe2fe7374.tar.bz2 nixpkgs-2da19f948373cc8c205183ff4151753fe2fe7374.tar.lz nixpkgs-2da19f948373cc8c205183ff4151753fe2fe7374.tar.xz nixpkgs-2da19f948373cc8c205183ff4151753fe2fe7374.tar.zst nixpkgs-2da19f948373cc8c205183ff4151753fe2fe7374.zip |
Merge pull request #85653 from veprbl/pr/darwin_binutils_add_man
darwin.binutils: propagate man pages from darwin.cctools
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/build-support/bintools-wrapper/default.nix | 7 | ||||
-rw-r--r-- | pkgs/os-specific/darwin/binutils/default.nix | 15 | ||||
-rw-r--r-- | pkgs/os-specific/darwin/cctools/port.nix | 7 |
3 files changed, 17 insertions, 12 deletions
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 84020505a63..5cc99c6412a 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -85,7 +85,7 @@ stdenv.mkDerivation { inherit targetPrefix infixSalt; - outputs = [ "out" ] ++ optionals propagateDoc [ "man" "info" ]; + outputs = [ "out" ] ++ optionals propagateDoc ([ "man" ] ++ optional (bintools ? info) "info"); passthru = { inherit bintools libc nativeTools nativeLibc nativePrefix; @@ -259,14 +259,15 @@ stdenv.mkDerivation { printWords ${bintools_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages '' - + optionalString propagateDoc '' + + optionalString propagateDoc ('' ## ## Man page and info support ## ln -s ${bintools.man} $man + '' + optionalString (bintools ? info) '' ln -s ${bintools.info} $info - '' + '') + '' ## diff --git a/pkgs/os-specific/darwin/binutils/default.nix b/pkgs/os-specific/darwin/binutils/default.nix index e31f9b91f97..fad33b21d04 100644 --- a/pkgs/os-specific/darwin/binutils/default.nix +++ b/pkgs/os-specific/darwin/binutils/default.nix @@ -16,7 +16,7 @@ in stdenv.mkDerivation { pname = "${targetPrefix}cctools-binutils-darwin"; inherit (cctools) version; - outputs = [ "out" "info" "man" ]; + outputs = [ "out" "man" ]; buildCommand = '' mkdir -p $out/bin $out/include @@ -42,12 +42,13 @@ stdenv.mkDerivation { ln -s ${cctools}/libexec $out/libexec - mkdir -p "$info/nix-support" "$man/nix-support" - printWords ${binutils-unwrapped.info} \ - >> $info/nix-support/propagated-build-inputs - # FIXME: cctools missing man pages - printWords ${binutils-unwrapped.man} \ - >> $man/nix-support/propagated-build-inputs + mkdir -p "$man"/share/man/man{1,5} + for i in ${builtins.concatStringsSep " " cmds}; do + for path in "${cctools.man}"/share/man/man?/$i.*; do + dest_path="$man''${path#${cctools.man}}" + ln -sv "$path" "$dest_path" + done + done ''; passthru = { diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index 368f2938064..0c25f225291 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -1,4 +1,5 @@ { stdenv, fetchFromGitHub, autoconf, automake, libtool, autoreconfHook +, installShellFiles , libcxxabi, libuuid , libobjc ? null, maloader ? null , enableTapiSupport ? true, libtapi @@ -28,9 +29,9 @@ let sha256 = "0h8b1my0wf1jyjq63wbiqkl2clgxsf87f6i4fjhqs431fzlq8sac"; }; - outputs = [ "out" "dev" ]; + outputs = [ "out" "dev" "man" ]; - nativeBuildInputs = [ autoconf automake libtool autoreconfHook ]; + nativeBuildInputs = [ autoconf automake libtool autoreconfHook installShellFiles ]; buildInputs = [ libuuid ] ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ] ++ stdenv.lib.optional enableTapiSupport libtapi; @@ -88,6 +89,8 @@ let pushd include make DSTROOT=$out/include RC_OS=common install popd + + installManPage ar/ar.{1,5} ''; passthru = { |