Merge pull request #182054 from wentasah/glib-man

glib: add man pages, make bash completion work

authored by 7c6f434c and committed by GitHub 6f30d456 075d73f2

+19 -2
+19 -2
pkgs/development/libraries/glib/default.nix
··· 1 { config, lib, stdenv, fetchurl, gettext, meson, ninja, pkg-config, perl, python3 2 - , libiconv, zlib, libffi, pcre, libelf, gnome, libselinux, bash, gnum4, gtk-doc, docbook_xsl, docbook_xml_dtd_45 3 # use util-linuxMinimal to avoid circular dependency (util-linux, systemd, glib) 4 , util-linuxMinimal ? null 5 , buildPackages ··· 124 (buildPackages.meson.override { 125 withDarwinFrameworksGtkDocPatch = stdenv.isDarwin; 126 }) 127 - ninja pkg-config perl python3 gettext gtk-doc docbook_xsl docbook_xml_dtd_45 libxml2 128 ]; 129 130 propagatedBuildInputs = [ zlib libffi gettext libiconv ]; ··· 135 "-Dgtk_doc=${boolToString (stdenv.hostPlatform == stdenv.buildPlatform)}" 136 "-Dnls=enabled" 137 "-Ddevbindir=${placeholder "dev"}/bin" 138 ]; 139 140 NIX_CFLAGS_COMPILE = toString [ ··· 167 # This file is *included* in gtk3 and would introduce runtime reference via __FILE__. 168 sed '1i#line 1 "${pname}-${version}/include/glib-2.0/gobject/gobjectnotifyqueue.c"' \ 169 -i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c 170 '' + optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 171 cp -r ${buildPackages.glib.devdoc} $devdoc 172 ''; 173 174 checkInputs = [ tzdata desktop-file-utils shared-mime-info ];
··· 1 { config, lib, stdenv, fetchurl, gettext, meson, ninja, pkg-config, perl, python3 2 + , libiconv, zlib, libffi, pcre, libelf, gnome, libselinux, bash, gnum4, gtk-doc, docbook_xsl, docbook_xml_dtd_45, libxslt 3 # use util-linuxMinimal to avoid circular dependency (util-linux, systemd, glib) 4 , util-linuxMinimal ? null 5 , buildPackages ··· 124 (buildPackages.meson.override { 125 withDarwinFrameworksGtkDocPatch = stdenv.isDarwin; 126 }) 127 + ninja pkg-config perl python3 gettext gtk-doc docbook_xsl docbook_xml_dtd_45 libxml2 libxslt 128 ]; 129 130 propagatedBuildInputs = [ zlib libffi gettext libiconv ]; ··· 135 "-Dgtk_doc=${boolToString (stdenv.hostPlatform == stdenv.buildPlatform)}" 136 "-Dnls=enabled" 137 "-Ddevbindir=${placeholder "dev"}/bin" 138 + ] ++ optionals (!stdenv.isDarwin) [ 139 + "-Dman=true" # broken on Darwin 140 ]; 141 142 NIX_CFLAGS_COMPILE = toString [ ··· 169 # This file is *included* in gtk3 and would introduce runtime reference via __FILE__. 170 sed '1i#line 1 "${pname}-${version}/include/glib-2.0/gobject/gobjectnotifyqueue.c"' \ 171 -i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c 172 + for i in $bin/bin/*; do 173 + moveToOutput "share/bash-completion/completions/''${i##*/}" "$bin" 174 + done 175 + for i in $dev/bin/*; do 176 + moveToOutput "share/bash-completion/completions/''${i##*/}" "$dev" 177 + done 178 '' + optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' 179 cp -r ${buildPackages.glib.devdoc} $devdoc 180 + ''; 181 + 182 + # Move man pages to the same output as their binaries (needs to be 183 + # done after preFixupHooks which moves man pages too - in 184 + # _multioutDocs) 185 + postFixup = '' 186 + for i in $dev/bin/*; do 187 + moveToOutput "share/man/man1/''${i##*/}.1.*" "$dev" 188 + done 189 ''; 190 191 checkInputs = [ tzdata desktop-file-utils shared-mime-info ];