Skip to content

Nix: package web dependencies attempt 2#1252

Draft
toast003 wants to merge 6 commits into9001:hovudstraumfrom
toast003:nix-webdebs-but-better
Draft

Nix: package web dependencies attempt 2#1252
toast003 wants to merge 6 commits into9001:hovudstraumfrom
toast003:nix-webdebs-but-better

Conversation

@toast003
Copy link
Contributor

@toast003 toast003 commented Jan 26, 2026

Better (hopefully) version of #897

Nix derivations run inside of a sandbox (think of docker, but more limited). Since we build web deps inside of a container anyways, this just extracts the commands from the Dockerfile so that we can run them inside the derivation for copyparty.

I didn't think this was feasible since you can't access the network from a normal derivation, until a while ago when I thought of using a fixed output derivation , which can access the network.

This would require a lot less maintenance than the previous pr, however it could be problematic since Nix enforces that fixed output derivations are reproducible.

To show that your contribution is compatible with the MIT License, please include the following text somewhere in this PR description:
This PR complies with the DCO; https://developercertificate.org/

@toast003 toast003 force-pushed the nix-webdebs-but-better branch from c970c15 to 4cb92d4 Compare January 26, 2026 20:31
@grawlinson
Copy link
Contributor

Package maintainer from Arch Linux here, I was doing this from a different direction. :)

A few notes:

  • zopfli/fonttools are available in alpine's repos (py3-zopfli and py3-fonttools).
  • not building these from source means that cmake/others are no longer needed in the Dockerfile.
  • busy.mp3 is not reproducible at all (different output every time), which means that it's another candidate for vendoring.

I was hoping to decouple the downloading of sources from building, e.g. having a multi-layer Dockerfile like this:

  1. install all deps from alpine repos.
  2. download all archives & setup the files/dirs that the build scripts expect them to be in.
  3. run build.sh similar to the one you currently have in this PR, with the ability to skip prebuilt/vendored deps.

9001 added a commit that referenced this pull request Jan 26, 2026
mainly with reproducible builds in mind,
and after all it's only 106 bytes
@9001
Copy link
Owner

9001 commented Jan 26, 2026

sorry for the merge conflict; feel free to forcepush or rebase however you prefer 🙏

EDIT: just to mention I'll be mostly off-grid until the weekend, got a webbrowser but no ability to build anything o/

@toast003
Copy link
Contributor Author

Dw @9001 , you're good!

  • zopfli/fonttools are available in alpine's repos (py3-zopfli and py3-fonttools).
  • not building these from source means that cmake/others are no longer needed in the Dockerfile.

What's your opinion on just using zopfli and/or fonttools from the repos? I can't really think of a reason to not use the repos, but since the Dockerfile gets specific versions I figured I might as well ask before doing anything

@9001
Copy link
Owner

9001 commented Jan 27, 2026

What's your opinion on just using zopfli and/or fonttools from the repos?

good idea, and probably overdue -- they weren't packaged by alpine back then is all 👍

@grawlinson
Copy link
Contributor

Definitely a lot better now. :)

@9001
Copy link
Owner

9001 commented Feb 8, 2026

LGTM! not much to say, happy to merge unless you had more changes in mind 👍

@toast003
Copy link
Contributor Author

toast003 commented Feb 8, 2026

Hi, I have some unpushed changes pending that are stuck on my main PC (ram failed, and warranty process is slow), so I have been focusing on other things for now.

@toast003
Copy link
Contributor Author

toast003 commented Feb 8, 2026

That said I would be ok to merge this rn without commit 43d48b2 if splitting the dockerfile is useful for other packages, like @grawlinson said.

@9001
Copy link
Owner

9001 commented Feb 8, 2026

oof, dogspeed 🙏

and no rush of course o/

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.

3 participants