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

Allow compile time override of default data dir #1198

Closed
wants to merge 2 commits into from
Closed

Conversation

kylewillmon
Copy link
Contributor

This patch is an attempt to fix #822

Allowing Homebrew installs to override the default data directory would allow us to use a custom path (likely $HOMEBREW_PREFIX/var/lib/phylum/extensions) for extensions when installed via homebrew.

DRAFT

Feedback is welcome, but I am still testing this. A companion PR will be needed in phylum-dev/homebrew-cli to fully accomplish this.

@cd-work
Copy link
Contributor

cd-work commented Aug 16, 2023

How is this handled for other applications on macOS? I can't imagine every application has their own environment variable for global configuration files.

@kylewillmon
Copy link
Contributor Author

I can't imagine every application has their own environment variable for global configuration files.

The environment variable here only exists at compile time. It is not read (and will not be present) at runtime.

How other tools handle this depends completely on the build system... A project using autotools, for example, would probably use ./configure --prefix=/opt/homebrew when building for Homebrew.

@cd-work
Copy link
Contributor

cd-work commented Aug 16, 2023

The environment variable here only exists at compile time. It is not read (and will not be present) at runtime.

But we're not the only application being compiled. Every application is.

How other tools handle this depends completely on the build system... A project using autotools, for example, would probably use ./configure --prefix=/opt/homebrew when building for Homebrew.

There is no uniform environment variable or anything like that? A fakeroot to build during homebrew? This seems ridiculous.

@kylewillmon
Copy link
Contributor Author

Abandoning this due to #822 (comment)

@maxrake maxrake deleted the data-dir branch January 2, 2024 20:24
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.

Ship default extensions via Homebrew
2 participants