Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patchpkg: restore removed refs to build deps #2249

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Conversation

gcurtis
Copy link
Collaborator

@gcurtis gcurtis commented Sep 4, 2024

Add a devbox patch --restore-refs flag that attempts to restore removed store path references. It works by finding store paths that have had their hashes replaced with e's (/nix/store/eeee...-foo) and then searching the package's build environment for store paths with matching names.

For example, for the removed reference /nix/store/eee...-foo-1.2.3 search all environment variables for a path ending in foo-1.2.3, then overwrite the removed reference with the one we found.

Base automatically changed from gcurtis/go-patchelf to main September 5, 2024 03:57
Add a `devbox patch --restore-refs` flag that attempts to restore
removed store path references. It works by finding store paths that have
had their hashes replaced with e's (`/nix/store/eeee...-foo`) and then
searching the package's build environment for store paths with matching
names.

For example, for the removed reference `/nix/store/eee...-foo-1.2.3`
search all environment variables for a path ending in `foo-1.2.3`, then
overwrite the removed reference with the one we found.
@gcurtis gcurtis force-pushed the gcurtis/patchpkg-refs branch from f95694f to 3543d8d Compare September 5, 2024 03:59
@gcurtis gcurtis merged commit 226349a into main Sep 5, 2024
24 checks passed
@gcurtis gcurtis deleted the gcurtis/patchpkg-refs branch September 5, 2024 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants