Skip to content

Conversation

@jaspermayone
Copy link

Summary

  • Fix nix package to include the lib/ directory containing tui.rb and fuzzy.rb

The try.rb script uses require_relative to load these files, but the nix derivation's installPhase wasn't copying them to the output, causing:

cannot load such file -- /nix/store/.../bin/lib/tui (LoadError)

Test plan

  • Build with nix build github:jaspermayone/try/fix/nix-include-lib-directory
  • Run try init ~/src/tries and verify no LoadError

The try.rb script uses require_relative to load lib/tui.rb and
lib/fuzzy.rb, but these weren't being copied to the output.
Copilot AI review requested due to automatic review settings January 20, 2026 23:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the Nix package where the lib/ directory containing tui.rb and fuzzy.rb was not being copied during installation, causing a LoadError when try.rb attempted to load these files via require_relative.

Changes:

  • Add cp -r lib $out/bin/ to the installPhase in flake.nix to copy the lib directory alongside the main try.rb script

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

vdesjardins added a commit to vdesjardins/nix-config that referenced this pull request Jan 21, 2026
…rror

The upstream try package refactored the TUI library on Jan 16 2026 (commit dbb73fa),
but the Nix flake.nix was not updated to bundle the lib/ directory. This caused
'require_relative "lib/tui"' to fail at runtime.

Pinning to 4cf1364a3f (Jan 15 2026) uses the pre-refactor version while upstream
PR #91 is being reviewed (tobi/try#91). Can update once
the fix is merged and released.

See upstream issues: #84, #90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant