celenity/Phoenix
8
198
Fork
You've already forked Phoenix
19

nix: add environment variables for external tools used during build #341

Open
ddogfoodd wants to merge 1 commit from ddogfoodd/Phoenix:nix-envvars into dev
pull from: ddogfoodd/Phoenix:nix-envvars
merge into: celenity:dev
celenity:dev
celenity:pages
Contributor
Copy link

This seems to build fine for me.

We don't need Python to build under Nix, is that correct?
Do we skip the part where Python would be used?

Note that I had to add a patchPhase before the buildPhase to replace /bin/bash and uname by their binaries in the nix-store.
I'm not sure if you want to add PHOENIX_BASH and PHOENIX_UNAME. If you do, we can remove the patchPhase again. I don't wanted to burden the build scripts any further with nix specifics, so I thought patching it in the nix files is the way to go.

This seems to build fine for me. We don't need Python to build under Nix, is that correct? Do we skip the part where Python would be used? Note that I had to add a `patchPhase` before the `buildPhase` to replace `/bin/bash` and `uname` by their binaries in the nix-store. I'm not sure if you want to add `PHOENIX_BASH` and `PHOENIX_UNAME`. If you do, we can remove the `patchPhase` again. I don't wanted to burden the build scripts any further with nix specifics, so I thought patching it in the nix files is the way to go.

Thank you for the PR!!

@ddogfoodd wrote in #341 (comment):

We don't need Python to build under Nix, is that correct?

Well, Python is actually needed for OS X (for policies), but not on Linux - not sure what the best way to handle that would be.

Note that I had to add a patchPhase before the buildPhase to replace /bin/bash and uname by their binaries in the nix-store.

Sounds fine for /bin/bash (at least for now), but yeah I do think we should add an env var for uname. I can take a look at that if you don't want to cover it in this PR.

Thank you for the PR!! @ddogfoodd wrote in https://codeberg.org/celenity/Phoenix/pulls/341#issue-6263753: > We don't need Python to build under Nix, is that correct? Well, Python is actually needed for OS X *(for policies)*, but not on Linux - not sure what the best way to handle that would be. > Note that I had to add a `patchPhase` before the `buildPhase` to replace `/bin/bash` and `uname` by their binaries in the nix-store. Sounds fine for `/bin/bash` *(at least for now)*, but yeah I do think we should add an env var for `uname`. I can take a look at that if you don't want to cover it in this PR.

@celenity wrote in #341 (comment):

but yeah I do think we should add an env var for uname. I can take a look at that if you don't want to cover it in this PR.

I went ahead and added PHOENIX_UNAME - ab55779673

@celenity wrote in https://codeberg.org/celenity/Phoenix/pulls/341#issuecomment-19176071: > but yeah I do think we should add an env var for `uname`. I can take a look at that if you don't want to cover it in this PR. I went ahead and added `PHOENIX_UNAME` - https://codeberg.org/celenity/Phoenix/commit/ab55779673ba88b7fc720014776b09436215ca6a
Author
Contributor
Copy link

Rebased to latest dev.
Replaced the uname patch with setting as env var.
Added python3 for darwin only.

Only tested on x86_64-linux though. Darwin testers welcome, else feel free to mention me if you open an issue.

Rebased to latest dev. Replaced the `uname` patch with setting as env var. Added `python3` for darwin only. Only tested on x86_64-linux though. Darwin testers welcome, else feel free to mention me if you open an issue.
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u nix-envvars:ddogfoodd-nix-envvars
git switch ddogfoodd-nix-envvars
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
celenity/Phoenix!341
Reference in a new issue
celenity/Phoenix
No description provided.
Delete branch "ddogfoodd/Phoenix:nix-envvars"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?