!lTqhfnNvIkcEackxxk:matrix.org

Nix Bindings

72 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)18 Servers

Load older messages


SenderMessageTime
25 Oct 2024
@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.orgflowerava joined the room.22:09:13
@lholh:matrix.orglholh left the room.22:42:56
@flowerava:matrix.orgflowerava 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.social(lambda (f l) (format nil "~a ~a")) "Artur" "Manuel" changed their display name from (artur 'manuel) to @amadaluzia:tchncs.de.14:28:49
@artur:glasgow.social(lambda (f l) (format nil "~a ~a")) "Artur" "Manuel" 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
15 Nov 2024
@zoechi:matrix.orgzoechi joined the room.10:17:34
16 Nov 2024
@xokdvium:matrix.orgxokdvium set a profile picture.10:47:56
21 Nov 2024
@warrenr:matrix.org@warrenr:matrix.org joined the room.10:32:37
@mjolnir:nixos.orgNixOS Moderation Bot banned @warrenr:matrix.org@warrenr:matrix.org (spam).10:32:38
25 Nov 2024
@tom_show:matrix.org@tom_show:matrix.org joined the room.23:43:02
@mjolnir:nixos.orgNixOS Moderation Bot banned @tom_show:matrix.org@tom_show:matrix.org (spam).23:43:03
26 Nov 2024
@roberthensing:matrix.orgRobert Hensing (roberth) I've added libflake to bring back getFlake. Call these three functions before creating an eval state: https://github.com/NixOS/nix/pull/11940/files#diff-5bf91a38f0c7fb288abe818751d512cdb01277aced08211b0b888fc73d67f103 16:54:13
27 Nov 2024
@o-santi:matrix.orgLeonardo Santiagogreat!14:06:33
29 Nov 2024
@trigomm:matrix.orgDaniel Furquin joined the room.03:20:10
@trigomm:matrix.orgDaniel Furquin left the room.05:20:04
5 Dec 2024
@o-santi:matrix.orgLeonardo Santiago is there any way to set verbosity through settings? 18:50:27
6 Dec 2024
@o-santi:matrix.orgLeonardo Santiagoor better yet, any way to plug custom loggers instead of the builtins ones?13:17:35
@roberthensing:matrix.orgRobert Hensing (roberth)I'd also be interested in that, but I'm slightly concerned that wrapping the current logging interface would be the wrong thing. We have an issue about OpenTelemetry support, and I expect that we'll want to apply lessons from implementing that13:56:24

Show newer messages


Back to Room ListRoom Version: 10