makes icon indicating copy to clipboard operation
makes copied to clipboard

Support Nix Flakes

Open kamadorueda opened this issue 4 years ago • 2 comments
trafficstars

Related:

  • #512
  • #540

Useful links:

  • https://nixos.wiki/wiki/Flakes

Examples:

  • https://github.com/numtide/flake-utils/blob/master/flake.nix

Things to take into account:

  • We wan to benefit from flakes hermeticity
  • We want to keep installation and usage of non-nix-experts users as simple as it's today

kamadorueda avatar Sep 16 '21 19:09 kamadorueda

I'm just gonna drop here two good reasons not to use flakes yet:


  1. It's unstable, which means bugs in the core binary do exist and will sooner or later bite you, no matter what --option xxx yyy, ulimit, etc, you configure to try controlling file descriptor leaks:

image

for some companies like us it's not reasonable to risk reliability on production, the thing must just work, preferably for ever

on Nix stable this too-many-open-files do not happen (downgrading from Flakes was actually the fix to the problem)


  1. Evaluation cache is awesome on flakes, but runtime cache-ability is not perfect yet, for instance we cannot make use of projectPath or something similar:

image

which means that in a tree like following:

  • a
    • whatever-code
  • b
    • c.sh
    • d.nix (depends on c.sh)

if whatever-code changes, then the entire inputs.self.sourceInfo.outPath changes, and thus ./b/c.sh changes, and ./b/d.nix must be build again. This does not happen on Makes using Nix stable because using projectPath you can make d.nix depend only on the NAR serialization of b folder, and changes outside of b do not require to rebuild d.nix.

Maybe this is the reason why some nix experts are using Bazel to achieve incremental builds?

We achieved incremental builds at Fluid Attacks using nix stable and projectPath only


I'm gonna stop working towards Flakes for now

The work done so far serves as a draft on how compatibility with Flakes can be implemented

kamadorueda avatar Sep 17 '21 19:09 kamadorueda

2. runtime cache-ability is not perfect yet, for instance we cannot make use of projectPath or something similar:

Unless I'm mistaken this is fixed the next day by https://github.com/fluidattacks/makes/commit/2143be2f8f00ac6ef530d029e72dc71f59d7a001, correct?

Ten0 avatar Dec 24 '23 08:12 Ten0