Skip to content

Avoid using srcOnly #1563

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

Merged
merged 2 commits into from
Jul 29, 2022
Merged

Avoid using srcOnly #1563

merged 2 commits into from
Jul 29, 2022

Conversation

hamishmack
Copy link
Collaborator

New versions of srcOnly pass the prePatch hook in and we cd into the sub directory for the package in that hook. This means that the output includes only the package subdirectory.

We worked around this, but the work around breaks for older nixpkgs where prePatch is not passed.

This change replaces the use of srcOnly and instead uses the same trick as source so that the buildPhase is replaced and runs in the expected source directory (including and it should still include any sibling directories that have not been filtered).

New versions of `srcOnly` pass the `prePatch` hook in and we `cd` into the sub directory for the package in that hook.  This means that the output includes only the package subdirectory.

We worked around this, but the work around breaks for older nixpkgs where `prePatch` is not passed.

This change replaces the use of `srcOnly` and instead uses the same trick as source so that the `buildPhase` is replaced and runs in the expected source directory (including and it should still include any sibling directories that have not been filtered).
@hamishmack
Copy link
Collaborator Author

bors try

iohk-bors bot added a commit that referenced this pull request Jul 29, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jul 29, 2022

@hamishmack hamishmack merged commit 5341ac4 into master Jul 29, 2022
@iohk-bors iohk-bors bot deleted the hkm/subdir-fix branch July 29, 2022 07:23
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