Change:
Describe the bug fails to build when the gem configured in the is pointing to a git repository. <details<summaryGemfile</summary</details<details</summary</details<details</summary</details<details<summarynix-build output</summary</detailsTo Reproduce Run with the configuration posted above. Expected behavior The package should build like it does when the gem is pointed to a released version. Metadata Maintainer information:
Can confirm this, I have the same issue trying to package
I ran into this issue today. Both in my scenario and the recipe above the issue happens bundlerApp tries to of the gem. The directory find is call with doesn't exist. While I don't know the proper way to fix bundlerApp, a work around is to set the installManpages attributes to false. ej.
I'm having issue as well, is there any temporal fix atleast? Its annoying, and making my setup not-so-reproducible, I'm bundling puppet and it says: Its actually been created with rev: at and haven't been copied over.
Seems like you're right not installing manpages did somehow fix it, but not sure how you figured out... What I find post trying that is that the problem resides exactly in these lines:
I figured out the workaround by reading the error from nix log . Seeing the call to find being the error and looking for the expression responsible for making the call. Found it was the the installManpages option as you linked above. However I'm not familiar enough with the process to know what is the proper way to fix this. It seems the reason it fails is because in only has the dependencies of the gem we are building, not the gem itself. Should the man page installation happen in a latter phase? Should it look for the gem man pages in a different place? In what phase it is running?
I started a PR for the fix, can you please try building packages from this PR branch?

Discussion:
else let gem = gems.${pname}; <del> version = gem.version; </del> <ins> suffix = gem.suffix; </ins> in <del> "${pname}-${version}"; </del> <ins> "${pname}-${suffix}"; </ins> pname' = if pname != null then pname

passthru = rec { inherit ruby bundler gems confFiles envPaths; <ins> inherit (gems.${pname}) gemType; </ins> wrappedRuby = stdenv.mkDerivation { name = "wrapped-ruby-${pname'}";

${lib.optionalString installManpages '' for section in {1..9}; do mandir="$out/share/man/man$section" <del> 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 ; </del> <ins> # 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 ; </ins> done ''} ''

else throw "buildRubyGem: don't know how to build a gem of type "${type}"" ); <ins> # See: https://github.com/rubygems/rubygems/blob/7a7b234721c375874b7e22b1c5b14925b943f04e/bundler/lib/bundler/source/git.rb#L103 suffix = if type == "git" then builtins.substring 0 12 attrs.source.rev else version; </ins> documentFlag = if document == [] then "-N"

inherit ruby; inherit dontBuild; inherit dontStrip; <ins> inherit suffix; </ins> gemType = type; nativeBuildInputs = [

++ buildInputs; #name = builtins.trace (attrs.name or "no attr.name" ) "${namePrefix}${gemName}-${version}"; <del> name = attrs.name or "${namePrefix}${gemName}-${version}"; </del> <ins> name = attrs.name or "${namePrefix}${gemName}-${suffix}"; </ins> inherit src;