this fixes the nix build on x86_64-linux by removing and regenerating the .zip file. it certaintly doesn't work on nix-darwin but I don't have a device to test it on. I don't think this changes any of the Phoenix functionality.
rebuild .zip files in nix build #270
Merged
celenity
merged 2 commits from 2026年04月26日 21:10:21 +02:00
andromeda-fp/Phoenix:dev into dev
andromeda-fp
commented 2026年04月19日 12:03:42 +02:00
this fixes the nix build on x86_64-linux by removing and regenerating the .zip file. it certaintly doesn't work on nix-darwin but I don't have a device to test it on. I don't think this changes any of the Phoenix functionality.
celenity
requested changes 2026年04月20日 00:40:46 +02:00
Dismissed
celenity
left a comment
Thank you for submitting this!
I don't think a patch is the best solution here. What do you think about modifying gen-archive.sh directly and leveraging the PHOENIX_NIX environment variable instead? So, for example, maybe we could use something like this?:
if [ "${PHOENIX_NIX}" == 1 ]; then
readonly PHOENIX_ZIP='zip -r'
else
readonly PHOENIX_ZIP='zip -r -FS'
fi
Curious to hear your thoughts.
Thank you for submitting this!
I don't think a patch is the best solution here. What do you think about modifying `gen-archive.sh` directly and leveraging the `PHOENIX_NIX` environment variable instead? So, for example, maybe we could use something like this?:
```sh
if [ "${PHOENIX_NIX}" == 1 ]; then
readonly PHOENIX_ZIP='zip -r'
else
readonly PHOENIX_ZIP='zip -r -FS'
fi
```
Curious to hear your thoughts.
andromeda-fp
force-pushed dev from 2026年04月20日 16:43:35 +02:00
Compare
1c69c28a9b
to 14261d779b
andromeda-fp
commented 2026年04月20日 16:52:38 +02:00
that is a more elegant way of doing it, I agree. The reason to rm the zip file is that otherwise the following error gets thrown, whether with or without the -FS flag; afaik zip doesn't have any --overwrite sort of flag.
phoenix> Creating /build/qvz672gq8ldzzvb2k5w3bcnbyi8a3jmc-source/archives/phoenix-linux.zip...
phoenix> + zip -r /build/qvz672gq8ldzzvb2k5w3bcnbyi8a3jmc-source/archives/phoenix-linux.zip COPYING.txt README.md assets configs defaults etc phoenix.cfg policies resources unused userjs -x 'unused/*'
phoenix> zip warning: missing end signature--probably not a zip file (did you
phoenix> zip warning: remember to use binary mode when you transferred it?)
phoenix> zip warning: (if you are trying to read a damaged archive try -F)
phoenix>
phoenix> zip error: Zip file structure invalid (/build/qvz672gq8ldzzvb2k5w3bcnbyi8a3jmc-source/archives/phoenix-linux.zip)
that is a more elegant way of doing it, I agree. The reason to `rm` the zip file is that otherwise the following error gets thrown, whether with or without the `-FS` flag; afaik `zip` doesn't have any `--overwrite` sort of flag.
```
phoenix> Creating /build/qvz672gq8ldzzvb2k5w3bcnbyi8a3jmc-source/archives/phoenix-linux.zip...
phoenix> + zip -r /build/qvz672gq8ldzzvb2k5w3bcnbyi8a3jmc-source/archives/phoenix-linux.zip COPYING.txt README.md assets configs defaults etc phoenix.cfg policies resources unused userjs -x 'unused/*'
phoenix> zip warning: missing end signature--probably not a zip file (did you
phoenix> zip warning: remember to use binary mode when you transferred it?)
phoenix> zip warning: (if you are trying to read a damaged archive try -F)
phoenix>
phoenix> zip error: Zip file structure invalid (/build/qvz672gq8ldzzvb2k5w3bcnbyi8a3jmc-source/archives/phoenix-linux.zip)
```
andromeda-fp
added 1 commit 2026年04月26日 18:57:21 +02:00
celenity
approved these changes 2026年04月26日 21:09:53 +02:00
celenity
left a comment
LGTM, thank you!
LGTM, thank you!
celenity
changed title from (削除) WIP: rebuild .zip files in nix build (削除ここまで) to rebuild .zip files in nix build 2026年04月26日 21:10:01 +02:00
celenity
merged commit f24aff7db8 into dev 2026年04月26日 21:10:43 +02:00
celenity
referenced this pull request from a commit 2026年04月28日 23:28:16 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
bug
Something is not working
confirmed
contribution welcome
Contributions are very welcome, get started here
duplicate
This issue or pull request already exists
enhancement
New feature
good first issue
Interested in contributing? Get started here.
help wanted
Need some help
important
Issues with top priority
invalid
Something is wrong
other
Anything that doesn't fall under other labels...
question
More information is needed
upstream
Related to an upstream repository, already reported there
web compat
For issues with websites...
wontfix
This will not be worked on
No labels
bug
confirmed
contribution welcome
duplicate
enhancement
good first issue
help wanted
important
invalid
other
question
upstream
web compat
wontfix
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!270
Loading...
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "andromeda-fp/Phoenix:dev"
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?