!lTqhfnNvIkcEackxxk:matrix.org

Nix Bindings

52 Members
Nix C API https://github.com/NixOS/nix/blob/master/doc/manual/src/c-api.md, language-specific bindings, and their use cases (currently broken link: https://nixos.org/manual/nix/unstable/c-api)17 Servers

Load older messages


SenderMessageTime
23 Oct 2024
@o-santi:matrix.orgLeonardo Santiago * But how would that work from a C API standpoint?20:44:00
@o-santi:matrix.orgLeonardo Santiago If you set experimental-features="flakes" it would return a different EvalState instance with flakes enabled? 20:44:55
@drewrypope:matrix.orgDrewry Pope set a profile picture.20:48:33
@o-santi:matrix.orgLeonardo Santiago set a profile picture.21:07:47
@o-santi:matrix.orgLeonardo Santiago * If you set experimental-features="flakes" it would return a different EvalState instance with flakes enabled? when calling 'nix_state_crate`? 21:08:22
@o-santi:matrix.orgLeonardo Santiago * If you set experimental-features="flakes" it would return a different EvalState instance with flakes enabled? (when calling 'nix_state_crate`?) 21:08:28
@o-santi:matrix.orgLeonardo Santiago * If you set experimental-features="flakes" it would return a different EvalState instance with flakes enabled? (when calling nix\_state\_crate\?) 21:08:36
@o-santi:matrix.orgLeonardo Santiago * If you set experimental-features="flakes" it would return a different EvalState instance with flakes enabled? (when calling nix_state_crate\?) 21:08:42
@o-santi:matrix.orgLeonardo Santiago * If you set experimental-features="flakes" it would return a different EvalState instance with flakes enabled? (when calling nix_state_create?) 21:08:48
25 Oct 2024
@lholh:matrix.org@lholh:matrix.org joined the room.03:55:01
@o-santi:matrix.orgLeonardo Santiago what is the reasoning behind calling nix_value_force before returning the Value? I find this not only confusing but detrimental as it evaluates a lot more than needed most of the time. 14:03:58
@o-santi:matrix.orgLeonardo Santiago I'm saying this because a builtins.getFlake "path" call is taking 20 seconds (even though it's local, not copying anything) and I can't trace it to anything other than it evaluating the packages outputs even though I'm not asking for it 14:26:17
@o-santi:matrix.orgLeonardo SantiagoI'm trying to setup a minimal example14:26:43
@o-santi:matrix.orgLeonardo Santiago yes, I can see it's evaluating outputs.packages.x86_64-linux.default by adding a builtins.trace to it, though it seems to be the only one being eagerly evaluated 14:39:29
@o-santi:matrix.orgLeonardo Santiago

forget about it, I was testing out flake-compat and in the end it adds

    defaultNix =
      (builtins.removeAttrs result ["__functor"])
      // (if result ? defaultPackage.${system} then { default = result.defaultPackage.${system}; } else {})
      // (if result ? packages.${system}.default then { default = result.packages.${system}.default; } else {});

and it was this result ? defaultPackage.${system} that was causing the attribute to be evaluated when importing. when using builtins.getFlake, this doesn't happen but the slowness comes from copying the whole directory to the store

18:09:52
@o-santi:matrix.orgLeonardo Santiago *

forget about it, this is due to me testing out flake-compat and in the end it adds

    defaultNix =
      (builtins.removeAttrs result ["__functor"])
      // (if result ? defaultPackage.${system} then { default = result.defaultPackage.${system}; } else {})
      // (if result ? packages.${system}.default then { default = result.packages.${system}.default; } else {});

and it was this result ? defaultPackage.${system} that was causing the attribute to be evaluated when importing. when using builtins.getFlake, this doesn't happen but the slowness comes from copying the whole directory to the store

18:10:02
@o-santi:matrix.orgLeonardo Santiago *

forget about it, this is due to me testing out flake-compat and in the end it calls

    defaultNix =
      (builtins.removeAttrs result ["__functor"])
      // (if result ? defaultPackage.${system} then { default = result.defaultPackage.${system}; } else {})
      // (if result ? packages.${system}.default then { default = result.packages.${system}.default; } else {});

and it was this result ? defaultPackage.${system} that was causing the attribute to be evaluated when importing. when using builtins.getFlake, this doesn't happen but the slowness comes from copying the whole directory to the store

18:10:07
@flowerava:matrix.org@flowerava:matrix.org joined the room.22:09:13
@lholh:matrix.org@lholh:matrix.org left the room.22:42:56
@flowerava:matrix.org@flowerava:matrix.org left the room.23:49:24
26 Oct 2024
@alex:afuchs.deAlexander Fuchs joined the room.13:37:50
27 Oct 2024
@saucerr:matrix.org@saucerr:matrix.org joined the room.17:36:56
@mjolnir:nixos.orgNixOS Moderation Bot banned @saucerr:matrix.org@saucerr:matrix.org (spam).17:36:57
1 Nov 2024
@reh678:matrix.orgMuhammad Rehan Khan joined the room.22:39:36
3 Nov 2024
@roberthensing:matrix.orgRobert Hensing (roberth)
In reply to @Ericson2314:matrix.org
I was thinking of making a libflake subclass of the evaluator
subclassing feels like a step back
11:17:03
7 Nov 2024
@gwenlan:matrix.orggwenlan joined the room.14:58:15
8 Nov 2024
@artur:glasgow.socialmoved to @amadaluzia:tchncs.de changed their display name from (artur 'manuel) to @amadaluzia:tchncs.de.14:28:49
@artur:glasgow.socialmoved to @amadaluzia:tchncs.de changed their display name from @amadaluzia:tchncs.de to moved to @amadaluzia:tchncs.de.14:30:09
13 Nov 2024
@kayden45:matrix.org@kayden45:matrix.org joined the room.06:03:29
@mjolnir:nixos.orgNixOS Moderation Bot banned @kayden45:matrix.org@kayden45:matrix.org (spam).06:03:29

There are no newer messages yet.


Back to Room ListRoom Version: 10