2 ms·
> By default, any change to any dependency will cause all dependent derivations to be rebuilt, and their hashes to also change. You can 'break' this by introduc
by mikepurvis 6y ago
> By default, any change to any dependency will cause all dependent derivations to be rebuilt, and their hashes to also change. You can 'break' this by introducing stable ABI barriers preventing rebuilds and performing runtime loads of dependencies from .so (or whatever, executing some binaries from $PATH).
Does this imply full control over hash holding/breaking for derivation authors, or is it like a single field that's basically just meant to be used for the soname?
I would love to see more docs detailing how this works and what the user extension points are for it. Most of what I've found is pretty high level.
- q3k 6y ago> Does this imply full control over hash holding/breaking for derivation authors, or is it like a single field that's basically just meant to be used for the soname? I'm only aware for how this is done for OpenGL on NixOS, which is done by some bespoke LD_LIBRARY_PATH modifications. See: nixos/modules/hardware/opengl.nix. There might be some nixpkgs (non-NixOS) abstractions for this that I'm not aware of, or one would have to be written (which doesn't seem too hard to do).
- ywei3410 6y agoIt's full control; remote files, for example will have an hash which you inline [1] so that the resultant hash is correctly computed. [1] https://github.com/NixOS/nixpkgs/blob/842f900e73c7ce985218cc4f455e34d1d56475c1/pkgs/development/compilers/reason/default.nix#L9 https://github.com/NixOS/nixpkgs/blob/842f900e73c7ce985218cc...