Skip to content

Non-IFD Nix Integration#314

Open
mara-schulke wants to merge 2 commits into
mainfrom
mara/non-ifd-integration
Open

Non-IFD Nix Integration#314
mara-schulke wants to merge 2 commits into
mainfrom
mara/non-ifd-integration

Conversation

@mara-schulke

Copy link
Copy Markdown
Contributor

This MR adds a non-IFD variant of the cache.nix which circumvents frequent rebuilding and performance bottlenecks on buffrs in nix. Reference on IFD: https://nix.dev/manual/nix/2.26/language/import-from-derivation

@mara-schulke mara-schulke self-assigned this May 30, 2026
@mara-schulke mara-schulke added complexity::low Issues or ideas with a low implementation cost integration Changes and ideas related to integrating buffrs with 3rd-party software or tools type::refactoring Changing the inner-workings of buffrs priority::medium This is not urgent, but we should do this. labels May 30, 2026
@mara-schulke mara-schulke requested review from asmello and j-baker May 30, 2026 09:39
Comment thread nix/cache-pure.nix
lock = builtins.fromTOML (builtins.readFile lockfile);
packages = lock.packages or [ ];

fileUrl = pkg:

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 feels a bit unstable with regards to having to keep the logic in here and inside the rust code in sync at all times. What if we had:

  • a buffrs command that downloaded a single dependency (so the hash can be reused for the fixed-output derivation)
  • a buffrs command that merges the outputs of above derivations into a cache folder

that way, the whole cache folder logic stays inside the rust binary; and can be changed without breaking things for users

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.

maybe we would be better off just having a test that this approach matches the rust behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

complexity::low Issues or ideas with a low implementation cost integration Changes and ideas related to integrating buffrs with 3rd-party software or tools priority::medium This is not urgent, but we should do this. type::refactoring Changing the inner-workings of buffrs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants