summary refs log tree commit diff
path: root/pkgs/development/ruby-modules/bundler-app
diff options
context:
space:
mode:
authorAnimesh Sahu <animeshsahu19@yahoo.com>2023-06-15 17:15:23 +0530
committerAnimesh Sahu <animeshsahu19@yahoo.com>2023-06-15 17:18:11 +0530
commit6077061403503589d225fc0a51a514800517d813 (patch)
tree476f68452857d4ee287ef6ecfde5030fc55089f6 /pkgs/development/ruby-modules/bundler-app
parent570b69e2b7165c7ae23b54868a4a439c3d5fee32 (diff)
downloadnixpkgs-6077061403503589d225fc0a51a514800517d813.tar
nixpkgs-6077061403503589d225fc0a51a514800517d813.tar.gz
nixpkgs-6077061403503589d225fc0a51a514800517d813.tar.bz2
nixpkgs-6077061403503589d225fc0a51a514800517d813.tar.lz
nixpkgs-6077061403503589d225fc0a51a514800517d813.tar.xz
nixpkgs-6077061403503589d225fc0a51a514800517d813.tar.zst
nixpkgs-6077061403503589d225fc0a51a514800517d813.zip
nixos/ruby-modules: proper treatment to ruby modules of type git/url
Diffstat (limited to 'pkgs/development/ruby-modules/bundler-app')
-rw-r--r--pkgs/development/ruby-modules/bundler-app/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/ruby-modules/bundler-app/default.nix b/pkgs/development/ruby-modules/bundler-app/default.nix
index 5bb9e47cf5a..01e90ba53f1 100644
--- a/pkgs/development/ruby-modules/bundler-app/default.nix
+++ b/pkgs/development/ruby-modules/bundler-app/default.nix
@@ -68,7 +68,10 @@ in
     ${lib.optionalString installManpages ''
     for section in {1..9}; do
       mandir="$out/share/man/man$section"
-      find -L ${basicEnv}/${ruby.gemPath}/gems/${basicEnv.name} \( -wholename "*/man/*.$section" -o -wholename "*/man/man$section/*.$section" \) -print -execdir mkdir -p $mandir \; -execdir cp '{}' $mandir \;
+
+      # See: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/ruby-modules/gem/default.nix#L184-L200
+      # See: https://github.com/rubygems/rubygems/blob/7a7b234721c375874b7e22b1c5b14925b943f04e/bundler/lib/bundler.rb#L285-L291
+      find -L ${basicEnv}/${ruby.gemPath}/${lib.optionalString (basicEnv.gemType == "git" || basicEnv.gemType == "url") "bundler/"}gems/${basicEnv.name} \( -wholename "*/man/*.$section" -o -wholename "*/man/man$section/*.$section" \) -print -execdir mkdir -p $mandir \; -execdir cp '{}' $mandir \;
     done
     ''}
   ''