From 3e880bad79d2cef9afc02db6d635e30479f18418 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 20 Apr 2020 19:51:49 -0400 Subject: [PATCH 1/4] darwin.cctools: split man output --- pkgs/os-specific/darwin/cctools/port.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index 368f29380646..e73d185fc414 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -28,7 +28,7 @@ let sha256 = "0h8b1my0wf1jyjq63wbiqkl2clgxsf87f6i4fjhqs431fzlq8sac"; }; - outputs = [ "out" "dev" ]; + outputs = [ "out" "dev" "man" ]; nativeBuildInputs = [ autoconf automake libtool autoreconfHook ]; buildInputs = [ libuuid ] From c450617f99ede98b7641eb77e60b17ca1812dbb8 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 20 Apr 2020 23:47:17 -0400 Subject: [PATCH 2/4] bintools-wrapper: only propagate .info output if it exists in the original --- pkgs/build-support/bintools-wrapper/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 84020505a635..5cc99c6412a7 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 - '' + '') + '' ## From 125c469d3ee8ee6d4aea285e0aff456031435572 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 20 Apr 2020 20:05:35 -0400 Subject: [PATCH 3/4] darwin.binutils.bintools: propagate man pages from cctools --- pkgs/os-specific/darwin/binutils/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/os-specific/darwin/binutils/default.nix b/pkgs/os-specific/darwin/binutils/default.nix index e31f9b91f97d..fad33b21d046 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 = { From c00ad799a084ec2896ebfefff3ae6b31eade49d5 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 20 Apr 2020 23:52:24 -0400 Subject: [PATCH 4/4] darwin.cctools: install ar man pages In the distribution they are located in a separate directory from the others and the standard installation doesn't process them. --- pkgs/os-specific/darwin/cctools/port.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index e73d185fc414..0c25f225291e 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 @@ -30,7 +31,7 @@ let 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 = {