buildRubyGem: Provide manpages for Ruby gems (#49334)
This commit is contained in:
committed by
zimbatm
parent
56d2af6e98
commit
34e1fa4a50
@@ -44,6 +44,7 @@ lib.makeOverridable (
|
||||
# git checkout).
|
||||
# If you need to apply patches, make sure to set `dontBuild = false`;
|
||||
, dontBuild ? true
|
||||
, dontInstallManpages ? false
|
||||
, propagatedBuildInputs ? []
|
||||
, propagatedUserEnvPkgs ? []
|
||||
, buildFlags ? []
|
||||
@@ -206,6 +207,14 @@ stdenv.mkDerivation ((builtins.removeAttrs attrs ["source"]) // {
|
||||
ruby ${./gem-post-build.rb} "$spec"
|
||||
''}
|
||||
|
||||
${lib.optionalString (!dontInstallManpages) ''
|
||||
for section in {1..9}; do
|
||||
mandir="$out/share/man/man$section"
|
||||
find $out/lib \( -wholename "*/man/*.$section" -o -wholename "*/man/man$section/*.$section" \) \
|
||||
-execdir mkdir -p $mandir \; -execdir cp '{}' $mandir \;
|
||||
done
|
||||
''}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user