Skip to content

bonfire: init at 1.0.7-beta.4 - #550073

Open
ju1m wants to merge 3 commits into
NixOS:staging-nixosfrom
ju1m:bonfire
Open

bonfire: init at 1.0.7-beta.4#550073
ju1m wants to merge 3 commits into
NixOS:staging-nixosfrom
ju1m:bonfire

Conversation

@ju1m

@ju1m ju1m commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This PR migrates Bonfire from NGIpkgs (now archived) to Nixpkgs.
It's resurrecting ngi-nix/ngipkgs#2155
I'm not using Bonfire myself, so I've only tested it with nixosTests.bonfire.

Stacked upon #506184

Things done

Acknowledgments

  • Work done as part of the Nix@NGI packaging effort.

@ju1m ju1m added this to NGI Aug 7, 2026
@github-project-automation github-project-automation Bot moved this to Needs Refinement in NGI Aug 7, 2026
@ju1m ju1m moved this from Needs Refinement to In Progress in NGI Aug 7, 2026
@ju1m
ju1m force-pushed the bonfire branch 2 times, most recently from 9f17db8 to 2b5c754 Compare August 10, 2026 03:07
nixpkgs-branch-check[bot]

This comment was marked as outdated.

@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (new) This PR adds a new package 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. labels Aug 10, 2026
@ju1m
ju1m changed the base branch from master to staging-nixos August 10, 2026 08:01
@nixpkgs-ci nixpkgs-ci Bot closed this Aug 10, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Aug 10, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in NGI Aug 10, 2026
@ju1m ju1m moved this from Done to In Progress in NGI Aug 10, 2026
@ju1m

ju1m commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Nixpkgs' CI currently fails with:

Available memory: 199 MiB, free swap: 0 MiB
Available memory: 125 MiB, free swap: 26 MiB
Command terminated by signal 9
Chunk 00 on x86_64-linux done [14841388KB max resident, 9m 3.03ss elapsed] nix-env -f /nix/store/lp7qkig63sswn7ir79pv24hvydn12x9k-source/ci/eval/chunk.nix --eval-system x86_64-linux --option restrict-eval true --option allow-import-from-derivation false --query --available --out-path --json --meta --show-trace --arg chunkSize 8000 --arg myChunk 00 --arg preEvalFile /nix/store/8369g2kx4zmlx48n8kzrsr5mxy8nwj8s-pre-eval/result.json --arg systems [ "x86_64-linux" ] --arg includeBroken false --argstr extraNixpkgsConfigJson {} -I /nix/store/lp7qkig63sswn7ir79pv24hvydn12x9k-source -I /nix/store/8369g2kx4zmlx48n8kzrsr5mxy8nwj8s-pre-eval/result.json
Evaluation failed with exit code 9
Terminated seq -w 0 "$seq_end" | xargs -I{} -P"$cores" /nix/store/r465gbnksni9n1wv69inqcmipl507l90-single-chunk "$chunkSize" {} "$evalSystem" "$chunkOutputDir" "$preEvalFile"

But I have no problem running this locally:

nix-build ci --arg nixpkgs "$PWD" -A eval.singleSystem --argstr evalSystem x86_64-linux --arg chunkSize 8000 --argstr nixPath nixVersions.latest --out-link merged

Could it be that chunkSize is too high? Here's what in CI's log:

nix-build nixpkgs/untrusted/ci --arg nixpkgs ./nixpkgs/untrusted-pinned -A eval.singleSystem
--argstr evalSystem "$MATRIX_SYSTEM"
--arg chunkSize 8000
--argstr nixPath "$MATRIX_VERSION"
--out-link merged
# If it uses too much memory, slightly decrease chunkSize.
# Note: Keep the same further down in sync!

@ju1m ju1m moved this from In Progress to Blocked in NGI Aug 13, 2026
@ju1m

ju1m commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

@NixOS/nixpkgs-ci could you please help me to understand/overcome that problem? Thanks

@mdaniels5757

mdaniels5757 commented Aug 15, 2026

Copy link
Copy Markdown
Member

I can reproduce this locally with nix-build ci -A eval.singleSystem on an x86_64-linux system with 32GB memory. I can also reproduce it with just the first chunk (nix-env -f /nix/store/84mi0wks11hjanfzbr1i4pgzfwfxn74b-source/ci/eval/chunk.nix --eval-system x86_64-linux --option restrict-eval true --option allow-import-from-derivation false --query --available --out-path --json --meta --show-trace --arg chunkSize 5000 --arg myChunk 0 --arg preEvalFile /nix/store/fyszp3939xava22ky8gh419dnf99wk0j-pre-eval/result.json --arg systems '[ "x86_64-linux" ]' --arg includeBroken false --argstr extraNixpkgsConfigJson {} -I /nix/store/84mi0wks11hjanfzbr1i4pgzfwfxn74b-source -I /nix/store/fyszp3939xava22ky8gh419dnf99wk0j-pre-eval/result.json).

I don't think it's chunkSize, I think that it's the truly massive number of instantiations (258,000) that building even just bonfire-ember requires. bonfire-social requires an additional 372,000, and bonfire-open_science another 442,774.

The total number of instantiations required to build just those three packages is 1,100,126. For context, with chunkSize 5000, the entire 2nd chunk has 118,163 instantiations.

@ju1m

ju1m commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

@mdaniels5757, thanks for your help.

I reproduced the problem, first with:

firejail --noprofile --rlimit-as=$((8 * 1024 * 1024 * 1024)) nix-env -f /nix/store/84mi0wks11hjanfzbr1i4pgzfwfxn74b-source/ci/eval/chunk.nix --eval-system x86_64-linux --option restrict-eval true --option allow-import-from-derivation false --query --available --out-path --json --meta --show-trace --arg chunkSize 1 --arg myChunk 3455 --arg preEvalFile /nix/store/fyszp3939xava22ky8gh419dnf99wk0j-pre-eval/result.json --arg systems '[ "x86_64-linux" ]' --arg includeBroken false --argstr extraNixpkgsConfigJson {} -I /nix/store/84mi0wks11hjanfzbr1i4pgzfwfxn74b-source -I /nix/store/fyszp3939xava22ky8gh419dnf99wk0j-pre-eval/result.json

where 3455 is the index of bonfire-ember in the result.json file

Here are the memory profiles (using nixpkgs#python3Packages.memory-profiler) of evaluating bonfire flavours separately with ci/eval/chunk.nix:
bonfire memory-profiler

This is under the 16GB recommended in the manual:

Note that 16GB memory is the recommended minimum, while with less than 8GB memory evaluation time suffers greatly.

But when they get in the same chunk, and get evaluated at the very same time which is likely because they take more than a minute, their memory consumptions add up, here bonfire-open_science and bonfire-social reaches 24GiB, add the 9GiB bonfire-ember and you exceed 32GiB:
bonfire open_science+social

So I gave a try to --eval-profiler flamegraph:

#!/usr/bin/env nix
#! nix shell --impure --expr ``
#! nix let nixpkgs = builtins.getFlake "nixpkgs"; in
#! nix let pkgs = import nixpkgs {}; in
#! nix [
#! nix    pkgs.inferno
#! nix    pkgs.python3Packages.memory-profiler
#! nix ]
#! nix ``
#! nix --command bash
set -eux

drv=${1-bonfire-ember}

id=$(date +%s)
export NIX_COUNT_CALLS=1
export NIX_SHOW_STATS=1
export NIX_SHOW_STATS_PATH="prof/stats.$id.json"
mkdir -p prof
mprof run \
  --output "prof/$drv.mprof.$id.dat" \
  nix eval -f. "$drv" \
  --eval-system x86_64-linux \
  --option allow-import-from-derivation false \
  --eval-profiler flamegraph \
  --eval-profiler-frequency 10 \
  --eval-profile-file "prof/$drv.nix.$id.eval"

svg=~/Downloads/"$drv.nix.$id.eval.svg"
inferno-flamegraph >"$svg" \
  --minwidth 0.5 \
  -i "prof/$drv.nix.$id.eval" \
  --flamechart
mprof plot -t "$drv" "prof/$drv.mprof.$id.dat" \
  --output "prof/$drv.mprof.$id.png"
geeqie "prof/$drv.mprof.$id.png" &
firefox "$svg" &

Here's the output of ./prof.sh bonfire-ember:
bonfire-ember flamegraph
It showed me that there were no single mixNixDeps dependency consuming a disproportionate amount of time,
but diving a bit deeper I noticed that some dependencies consuming more than 1% where evaluated many times.

Those dependencies had all in common to use workarounds.rustlerPrecompiled from https://github.com/code-supply/deps_nix . Since workarounds.rustlerPrecompiled requires --allow-import-from-derivation which is not allowed in Nixpkgs, I was overrideAttrsing it to avoid using it, but apparently it kept having an evaluation performance impact, I thus worked around workarounds.rustlerPrecompiled without using overrideAttrs and it dropped the memory consumption by an order of magnitude:
image

@nixpkgs-branch-check
nixpkgs-branch-check Bot dismissed their stale review August 16, 2026 04:17

Review dismissed automatically

@nixpkgs-ci nixpkgs-ci Bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: erlang General-purpose, concurrent, functional high-level programming language 8.has: documentation This PR adds or changes documentation labels Aug 16, 2026
Comment thread nixos/modules/services/web-apps/bonfire.nix Outdated

@mdaniels5757 mdaniels5757 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A partial review:

Comment thread pkgs/by-name/bo/bonfire/extensions/ember/config
Comment thread pkgs/by-name/bo/bonfire/generic.nix Outdated
Comment thread nixos/tests/bonfire.nix Outdated
Comment thread nixos/tests/bonfire/default.nix
Comment thread nixos/modules/services/web-apps/bonfire/default.nix
Comment thread pkgs/by-name/bo/bonfire/generic.nix Outdated
in
beamPkgs.mixRelease (
let
# ToDo(maintenance): use proper `finalAttrs` once `mixRelease` supports it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#553428 :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is merged, so should be reflected here.

@ju1m ju1m moved this from Blocked to In Review in NGI Aug 16, 2026
@ju1m

ju1m commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

@ofborg test bonfire

@ju1m

ju1m commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

sigh, I can't print the derivation from ofborg to see why it finds a different hash for the bonfire-social.xla.deps fixed-output derivation

       … while calling the 'readFile' builtin
         at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ofborg-core/pkgs/by-name/bo/bonfire/generic.nix:190:22:
          189|           # with makemake's and hope to understand why the FOD mismatches.
          190|           lib.trace (lib.readFile drv.drvPath) drv;
             |                      ^
          191|

       error: access to absolute path '/nix/store/qa4i02bliacfq4c38kp94vcxpppd87ww-xla-0.10.0.drv' is forbidden in restricted mode

@ju1m
ju1m marked this pull request as ready for review August 18, 2026 08:56
@nixpkgs-ci
nixpkgs-ci Bot requested a review from a team August 18, 2026 09:09

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still say this is an anti pattern and a misconfiguration. Did you ever pursue configuring the deps so they write to somewhere else instead?

@ju1m ju1m Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in bonfire-setup, config/current_flavour/assets/ points to extensions/social/assets/ (when using social flavour), and surface_form_helpers cleans and generates into config/current_flavour/assets/hooks/, so maybe something could be done there, but I've not tried anything yet. Thanks for the idea.

@adamcstephens

adamcstephens commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

I'm not using Bonfire myself, so I've only tested it with nixosTests.bonfire.

I know you've put a bunch of work into this, but if you're not a user of this complex stack then who is? Why are they not the ones adding this package? Who will maintain it moving forward if they have no vested interest in it being in nixpkgs? There are layers upon layers of workarounds here, and it seems incredibly fragile to me. When the next update breaks who will fix it? What about the one after that? I understand the other repo was archived, but that doesn't necessarily mean nixpkgs is the best place for it if there are no users.

As an aside, you're in the github ngi team, but not in the team-list.nix file. At first I thought you were submitting this for other people to maintain.

The workarounds for deps_nix pulling in a completely different toolchain are frankly gross. I would prefer to see a fix submitted upstream to deps_nix to (optionally?) make the generated file acceptable in nixpkgs. This would be more valuable than hacking around the code we're committing here in nixpkgs. Have you pursued this?

Do we really need to vendor all these Cargo.lock files? I understand the lumis situation and have worked with upstream to resolve that, but the latest release isn't quite right. For the others though, can we not use cargoHashes instead?

Back to maintainability, I think this is bordering on or already is unmaintainable. While there are downsides to using mixFodDeps, a large portion of this PR would disappear if that was used instead, and would set future maintainers up for success. I fear this sets them up for failure and I am worried this will rot in nixpkgs accordingly. As someone who frequently builds all elixir/erlang packages, I'm concerned about what you've submitted here.

`mix compile.surface` or `Fine.include_dir()`
use `module_info/1` to get source files of BEAM dependencies.

To work this requires:

1. `erlangDeterministicBuilds` set to `false`
   to preserve the build directory in `.beam` files.
2. to build dependencies in a directory persisting
   across nix builds: `$out/src` instead of `/build/source`.

Issue: surface-ui/surface#762
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Aug 20, 2026
@phanirithvij phanirithvij added the 6.topic: NLNet / NGI The project is part of the NGI funding grant. https://nlnet.nl/NGI/ label Aug 20, 2026
@ju1m

ju1m commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@adamcstephens, thanks for voicing your concerns, I hope I've addressed them all to your satisfaction below. Otherwise please let me know.

I know you've put a bunch of work into this,

Unfortunately yes, that was a totally unexpected journey of 250h spanning 10 months,
paid however by the NGI/Nlnet at the same rate as GSoC,
so don't worry, I'm perfectly open to criticisms and even to keep it out-of-tree
because the usefulness over complexity ratio is too low.

but if you're not a user of this complex stack then who is?

For extra context, AFAIK, the overwhelming majority of software
packaged by the Nix@NGI team are not used by anyone in the Nix@NGI team itself,
so my situation is not uncommon in the context
of that Nix@NGI team managing funds to package and maintain software
which have received NGI/Nlnet grants.

Though likely not as popular as mastodon, ejabberd, mobilizon, or even pleroma or akkoma,
Bonfire does have its own little community AFAICS
(at the moment, they are 147 accounts on #bonfire-tech:matrix.org
and 311 accounts on #bonfire-networks:matrix.org),
but at this point no one is using any version of this packaging
which has never been the subject of a large announcement on https://discourse.nixos.org
back when included in NGIpkgs (because I was reassigned to NGI Forge
before finishing an update ngi-nix/ngipkgs#2155).

Bonfire's main developers have been helpful and responsive when I pinpointed any issue:
https://github.com/bonfire-networks/bonfire-app/issues?q=author%3Aju1m
But keep on using Docker so far.

Why are they not the ones adding this package?

Maybe because it was that hard to package it.
AFAICS, 3 previous attempts at packaging or just servicing Bonfire with Nix
were done:

Who will maintain it moving forward if they have no vested interest in it being in nixpkgs?

Good chance is that it will remain the Nix@NGI team,
at least so long as NGI/Nlnet keeps on giving grants to Bonfire.
AFAIK, the latest NGI fund "Restack" allows to sponsor the Nix@NGI team to work on Bonfire
through this grant https://nlnet.nl/project/Sciety-ActivityPub/
part of the NGI0 Commons Fund program.

For the record, this latest update of Bonfire (1.0.1-beta.11 -> 1.0.7-beta.4)
required a month of work mainly because it:

  • introduced WITH_IA (xla), lumis, and mdex_native;
  • updated opencv-4.11 to opencv-4.13;
  • changed the way justfile#_rel-compile-assets works;
  • broke the UI test;
  • broke the PostgreSQL Unix connection (still unsolved, TCP is used instead for now);
  • required to migrate from NGIpkgs to Nixpkgs.

Investigating why the packaging part broke is expectedly the hardest part,
often involving opening issues in Bonfire, or Elixir dependencies.
The service is a bit simpler, yet still has opened issues wrt. supporting Unix sockets.

There are layers upon layers of workarounds here, and it seems incredibly fragile to me.

Yes, and there were even more workarounds in previous versions
(eg. lazy_html before it was included in deps_nix,
or backporting opencv-4.11),
hopefully each one has an explanation in inlined comments
to help future updates (be it my future self or someone else).

And yes, the humonguous size of Bonfire's closure
(spanning mix, cargo, cmake, yarn and yarn-berry packages)
makes it fragile.
Especially when there are incomplete lock files (eg. lumis),
or lock files not generated with the same activated options as this package (eg. WITH_IA).

Workarounds are documented so that when a similar problem happens somewhere else
there's already an example to follow to fix it.
But it's not workarounds I fear the most, it's evision (opencv bindings) and exla (xla bindings) packages,
because of their complexity; I hope to have reached a point where updating to the next (exact) revision they expect
will avoid troubles requiring to open issues against those dependencies, but there's always a risk:
I was able to manage the update to opencv-4.13 this month with opening only
1 upstream issue
that made the build less fragile (it's now giving opencv's source-tree to evision instead of its installed-tree).
I don't know if those could be reused as is by other Elixir project depending on evision and exla,
but the path is beaten.

I guess updating the package more regularly (Bonfire has new release candidates almost every week)
would help to spot problems early on, which helps tracking them down, and not let them accumulate,
which is rapidly exhausting one's sanity.
Ideally Bonfire's devs would use Nix and care directly,
but it's not currently the case.

When the next update breaks who will fix it?

My current contract with Nix@NGI runs up to December 2026.

What about the one after that?

I can only speculate that it will remain me for the time being.

I understand the other repo was archived, but that doesn't necessarily mean nixpkgs is the best place for it if there are no users.

For sure, I can't speak for the Nix@NGI team, but as far as I'm concerned,
I don't mind re-targeting that PR to Bonfire's upstream,
especially since you require a minimum user base upfront to accept this PR,
having it upstream instead/along Docker may foster even more such adoption of the Nix packaging.

As an aside, you're in the github ngi team, but not in the team-list.nix file. At first I thought you were submitting this for other people to maintain.

I'm sorry for the confusion, though I work for them I am not officially part of the Nix@NGI team
and I don't even know if it would make sense for me to be notified as much as other team members are,
since besides Bonfire I'm not assigned to any other NGI-sponsored packages in Nixpkgs, like the others.

The workarounds for deps_nix pulling in a completely different toolchain are frankly gross. I would prefer to see a fix submitted upstream to deps_nix to (optionally?) make the generated file acceptable in nixpkgs. This would be more valuable than hacking around the code we're committing here in nixpkgs. Have you pursued this?

I opened an issue 8 months ago:
code-supply/deps_nix#42

It used to be a onliner preConfigure = "" before the evaluation bottleneck
I tracked down above, 5 days ago
adding 22 lines to bypass workarounds.rustlerPrecompiled entirely.
I'll suggest to at least introduce a flag to disable Rust support in deps_nix.

Do we really need to vendor all these Cargo.lock files?
I understand the lumis situation and have worked with upstream to resolve that, but the latest release isn't quite right.

Good to know, and thanks for that.

For the others though, can we not use cargoHashes instead?

I guess this could be achieved using the relevant updateScript yes.
I'll have to try, thanks.

Back to maintainability, I think this is bordering on or already is unmaintainable.
While there are downsides to using mixFodDeps,
a large portion of this PR would disappear if that was used instead,

And so would reproducibility and whatever trust one can have in the resulting software
now plagued with binary blobs, possibly not even open source as it already happened.
As I argued in code-supply/deps_nix#42,
I consider mixFodDeps to be no better than Docker.

and would set future maintainers up for success.

Yet mixFodDeps has not set two previous attempts to full success.

But I do concede that caching at the package level (ie. mixNixDeps)
has much less importance in Elixir than in other languages like Nixpkgs' haskellPackages
because any change in config/ will rebuild all Elixir deps,
and deps pinning is not shared by all mixReleases in Nixpkgs
since there's no equivalent to the curated package set Stackage for Elixir.

I fear this sets them up for failure and I am worried this will rot in nixpkgs accordingly.
As someone who frequently builds all elixir/erlang packages,
I'm concerned about what you've submitted here.

I understand, and you made your point very clear that this PR is too daunting
even for someone already at ease with Elixir packaging.
A warning I take very seriously.

Within the Nix@NGI team I pleaded in favor of properly packaging complex packages like Bonfire
for their umbrella effect
(eg. here on beamPackages (NGIpkgs' was ahead of Nixpkgs),
on deps_nix (adding workarounds)
and the Elixir dependencies directly).
But this could be achieved almost the same out-of-tree
albeit with a less thorough CI and with a greater temptation
to replace underlying helpers like beamPackages when they have shortcomings,
as I did in NGIpkgs.

I guess Bonfire's devs will agree to have this PR retargeted
to replace the 2yo flake.nix upstream
which has already bitrotten anyway, so it can hardly get worse.
But I'll forward your opinion and let the next Nix@NGI team meeting
decide what's the best way forward.

Thanks for your review,
Cheers.

@adamcstephens

Copy link
Copy Markdown
Contributor

Thank you @ju1m for your detailed response. In hindsight I realize my comment was more confrontational than I prefer, so I apologize if I came off too harsh.

I've followed bonfire for a while and agree it would be cool to have nix packaging support for it.

But I do concede that caching at the package level (ie. mixNixDeps)
has much less importance in Elixir than in other languages like Nixpkgs' haskellPackages
because any change in config/ will rebuild all Elixir deps

It actually doesn't always have to be this way, and one of my personal goals is to shine light on this. See code-supply/deps_nix#50 for how deps_nix can be used to change this default. Yes, some deps (including rustler ones) rely on compile-time config, but much of the elixir ecosystem does not. In my personal projects I've been switching to defaulting no-app-config and only selectively enabling those that need it through overrides. I'd like these to be the exceptions, not the standard, and nixpkgs+deps_nix tooling should support this. I'm open to ideas for how we can improve this further. For example, one idea that just came to mind, can we create a simple config/ shim for rustler-only deps that could limit the scope of changing inputs?

I opened an issue 8 months ago:
code-supply/deps_nix#42

Thanks, I hadn't seen this. I've admittedly not looked too deeply into the rustler workarounds in deps_nix. Perhaps I should.

I guess updating the package more regularly (Bonfire has new release candidates almost every week)

I'd actually strongly recommend this, and do so leveraging the updateScript. This will prove the script works as needed, and will allow you to feel more confident in the longer term. A release could bring other breaking changes, but at least you can be confident in the core of the updating scripts.

I don't mind re-targeting that PR to Bonfire's upstream,

Personally, I'd be worried that much of my concerns would apply upstream as well. I've seen too many projects where a nix user contributed nix bits, only for them to languish and become broken. Doubly so with the complexity of this packaging.

I don't mean to run you away from nixpkgs, or discourage you from continuing here. I'd feel a lot better if there was at least one committed user of this work. Without that, and with a limited timespan of paid maintenance, I'm worried this will end up like so many other packages in nixpkgs that don't have active users/maintainers. That said, I am but one committer amongst many and others can disagree and proceed with or without my support.

Thanks again for hearing me out and thinking through these concerns.

# Warning(maint/update): bonfire having a huge dependency closure,
# expect a lot of downloads during several minutes.
# Besides, Bonfire takes about one hour to update
# because `deps_nix` somehow triggers some compiling when updating.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code-supply/deps_nix#51 can avoid deps_nix needing to compile a behavior. By extracting deps_nix itself from the project, my testing shows that it doesn't need to compile anything.

# and load_from because rustler defaults to priv/native/#{crate}
# but deps_nix installs into priv/native/lib#{crate}.
#
# Issue: https://github.com/code-supply/deps_nix/issues/36

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue is resolved, so the code should be updated here.

);

beamPackages = beamPkgs // {
buildMix =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would strongly recommend using per-dep overrides in mixNixDeps to fix these issues rather than overriding buildMix itself globally.

Also, post #554005 this should be done with overrideScope. But again, I'd prefer to not see this done at all.

Comment thread pkgs/by-name/bo/bonfire/generic.nix
Comment on lines +824 to +825
# at least :rustler_precompiled and :mime
# Issue: https://github.com/bonfire-networks/bonfire-app/issues/1696

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still an issue to FixMe? The upstream issue was closed as possibly resolved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid Nixpkgs' CI complain about missing enlines in .hash files.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately required to satisfy Nixpkgs' CI which is not aware that it's not used even though it's referenced in generated deps.nix

in
beamPkgs.mixRelease (
let
# ToDo(maintenance): use proper `finalAttrs` once `mixRelease` supports it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is merged, so should be reflected here.

Comment on lines +22 to +23
This package only exists to provide a location for an `updateScript`
updating `src` just once before calling each extensions' `update.script`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems awkward to me to create a stub package like this. Is this just because of the limitations of the by-name structure? Is this really more of a package set, and should be treated differently?

let
bonfire = generic {
inherit bonfire;
FLAVOUR = extension;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not refer to these as flavours then, given that's what upstream calls them? Their use of the term extension seems to be much more granular.

@h7x4 h7x4 added 8.has: module (new) This PR adds a module in `nixos/` 8.has: tests This PR has tests labels Aug 23, 2026
@imincik imincik linked an issue Aug 31, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: erlang General-purpose, concurrent, functional high-level programming language 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: NLNet / NGI The project is part of the NGI funding grant. https://nlnet.nl/NGI/ 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 8.has: tests This PR has tests 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches.

Projects

Status: In Review
Status: No status

Development

Successfully merging this pull request may close these issues.

Bonfire: migrate packaging from NGIpkgs to Nixpkgs

6 participants