!9IQChSjwSHXPPWTa:lix.systems

Lix

1108 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms296 Servers

Load older messages


SenderMessageTime
22 Oct 2025
@guipsp:matrix.orgGuilherme EspadaI'm confused as to why https://docs.lix.systems/manual/lix/nightly/release-notes/ doesn't seem to include the 2.93 release notes10:36:42
@aloisw:julia0815.dealoiswBecause it's wildly out of date and was generated before the release.15:36:55
@helle:tacobelllabs.nethelle (just a stray cat girl)I've considered figuring out some infrastructure for it, but there are higher priority fixes to the docs access situation15:52:17
@mxcurly:matrix.orgmxcurly joined the room.18:15:18
@jassu:kumma.juttu.asiaJassuko
In reply to @lillecarl:matrix.org
Why not?! I depend on builtins.fromJSON and builtins.toJSON for several usecases

Ohh, so those ended up being included in the builtins at some point? Nice.

Last time I checked (few years ago) people were too concerned about possible serialization issues and having to maintain compatibility over long time, so JSON was not supported as a builtin.

20:31:57
@ekler:feel-co.orgeklerfromJSON has existed since nix 1.8 (2014) and toJSON is from 1.7 (2013)20:46:59
@ekler:feel-co.orgeklerBut that's just for arbitrary data and chokes sometimes e.g. functions20:49:56
@jassu:kumma.juttu.asiaJassukoWtf. Why I didn’t find a usable JSON thing when I needed it, then. :o21:16:43
@lillecarl:matrix.orglillecarl Maybe your memory is mixing JSON and YAML. YAML is still IFD 21:24:54
@rosssmyth:matrix.orgrosssmyth They were talking about derivation serialization, which is different from Nix expression serialization. You can view derivation serialization if you run something like nix derivation show nixpkgs#hello (for JSON), while the usual serialization of derivation is to ATerm, a weird old format you can view with something like nix eval nixpkgs#hello.drvPath | xargs cat. These are the "*.drv" files references sometimes. 21:44:57
@rosssmyth:matrix.orgrosssmyth * They were talking about derivation serialization, which is different from Nix expression serialization. You can view derivation serialization if you run something like nix derivation show nixpkgs#hello (for JSON), while the usual serialization of derivation is to ATerm, a weird old format you can view with something like nix eval nixpkgs#hello.drvPath | xargs cat. These are the "*.drv" files referenced sometimes. 21:45:22
23 Oct 2025
@emilazy:matrix.orgemily "I’d so much prefer writing Nix over JSON any day, but last time I checked (way over a year ago) that was not supported use case." sounds like just fromJSON/toJSON to me? 00:19:58
@emilazy:matrix.orgemilya stable JSON serialization format for Nix derivations would not help with writing Nix over JSON00:20:12
@emilazy:matrix.orgemilyunless the JSON you want to write happens to be exactly what the stable JSON derivation format would be :)00:20:24
@arianvp:matrix.orgArianThe context here is i want to record build provenance info in Rekor. For which i need some canonical serialization of the build. I was using the json serialization now. But i think ATerm might be more honest?00:41:48
@arianvp:matrix.orgArianI guess I'll just also notarize the version of Lix used and then it doesn't matter wtf I do00:42:27
@raitobezarius:matrix.orgraitobezariusgood00:44:45
@rainbowcat:xmr.seRcat 🏳️‍🌈🏳️‍⚧️ changed their profile picture.10:54:17
@lillecarl:matrix.orglillecarl
[lillecarl@shitbox] in [☸ kubernetes-admin@shitbox]~/C/nix-csi [🎋 main][!?⇡][🗀 loaded/allowed][🐚fish][as🧙]
[14:54:27]❌1 ❯ NIX_PATH=$NIX_PATH:dinix=/home/lillecarl/Code/dinix nix build --file guests/ctest.nix 
/nix/store/abc0z84prslflqi1m8kssggarfnvcl5z-dinit-wrapped
[lillecarl@shitbox] in [☸ kubernetes-admin@shitbox]~/C/nix-csi [🎋 main][!?⇡][🗀 loaded/allowed][🐚fish][as🧙]
[14:54:43]❯ NIX_PATH=$NIX_PATH:dinix=/home/lillecarl/Code/dinix nix eval --raw --file guests/ctest.nix
error:
       … while generating the eval command output

       error: cannot coerce a function to a string: «lambda @ /home/lillecarl/Code/nix-csi/guests/ctest.nix:1:1»

Why is it that I can build this file but not eval it? I just wanna get the storePath during eval

{
  pkgs ? import <nixpkgs> { },
  dinix ? import <dinix>,
}:
pkgs.hello # simplified for brevity
12:56:26
@lillecarl:matrix.orglillecarl *
[lillecarl@shitbox] in [☸ kubernetes-admin@shitbox]~/C/nix-csi [🎋 main][!?⇡][🗀 loaded/allowed][🐚fish][as🧙]
[14:54:27]❌1 ❯ NIX_PATH=$NIX_PATH:dinix=/home/lillecarl/Code/dinix nix build --file guests/ctest.nix 
/nix/store/abc0z84prslflqi1m8kssggarfnvcl5z-dinit-wrapped
[lillecarl@shitbox] in [☸ kubernetes-admin@shitbox]~/C/nix-csi [🎋 main][!?⇡][🗀 loaded/allowed][🐚fish][as🧙]
[14:54:43]❯ NIX_PATH=$NIX_PATH:dinix=/home/lillecarl/Code/dinix nix eval --raw --file guests/ctest.nix
error:
       … while generating the eval command output

       error: cannot coerce a function to a string: «lambda @ /home/lillecarl/Code/nix-csi/guests/ctest.nix:1:1»

Why is it that I can build this file but not eval it? I just wanna get the storePath when evaluating

{
  pkgs ? import <nixpkgs> { },
  dinix ? import <dinix>,
}:
pkgs.hello # simplified for brevity
12:56:53
@raitobezarius:matrix.orgraitobezarius.outPath ?12:57:25
@raitobezarius:matrix.orgraitobezariusalso12:57:35
@raitobezarius:matrix.orgraitobezariusi don't think nix eval does auto call semantics12:57:44
@raitobezarius:matrix.orgraitobezariusyou need to apply the function12:57:51
@lillecarl:matrix.orglillecarl
[15:00:59]❯ NIX_PATH=$NIX_PATH:dinix=/home/lillecarl/Code/dinix nix eval --impure --raw --expr 'import ./guests/ctest.nix {}'
/nix/store/abc0z84prslflqi1m8kssggarfnvcl5z-dinit-wrapped⏎   

Thanks! I think I can make it work with this 😄

13:01:33
@lavender.pet:voip.vera-visions.comlavender.pet changed their profile picture.13:15:50
@lavender.pet:voip.vera-visions.comlavender.pet changed their profile picture.13:19:05
24 Oct 2025
@cjablons:matrix.orgcjab joined the room.02:01:05
@522_:catgirl.cloud522 it/its ⛯ΘΔ

lix module overlay without flakes question: i'm experimenting with removing flakes from my system but am running into an issue where some override accesses the lix.rev of the lix argument, which doesn't exist (i'm using npins, it's called .revision)

nixpkgs.overlays = [
  (import "${sources.lix-module}/overlay.nix" {
    lix = sources.lix // {
      # rev = sources.lix.revision;
    };
    versionSuffix = "-pre-${builtins.substring 0 12 sources.lix.revision}";
  })
];

in my configuration.nix gets me

error: attribute 'rev' missing
at /nix/store/bbl3a77bpxlqml9sqclz2ax2fqvgj1y3-source/overlay.nix:120:62:
   119|           __intentionallyOverridingVersion = true;
   120|           version = "2.94.0-lix-${builtins.substring 0 7 lix.rev}";
      |                                                              ^
   121|

(with my hacky fix for this commented out)

10:46:28
@522_:catgirl.cloud522 it/its ⛯ΘΔspecifically it only happens when adding colmena to my system, since that causes nix-eval-jobs to be evaluated(which this is an overlay for)10:47:18

Show newer messages


Back to Room ListRoom Version: 10