!tDnwWRNkmmYtMXfaZl:nixos.org

Nix Language

1317 Members
Nix programming language234 Servers

Load older messages


SenderMessageTime
25 Apr 2024
@cullenmcd:matrix.orgcullenmcd joined the room.17:42:11
@tanvir:hackliberty.org@tanvir:hackliberty.org left the room.20:31:18
@mjolnir:nixos.orgNixOS Moderation Bot banned @jonringer:matrix.org@jonringer:matrix.org (Banned until 2024/06/10 after deliberation of the Moderation team).21:11:24
@zraexy:nixos.devDavid Mell (zraexy) joined the room.23:01:43
@ss:someonex.netSomeoneSerge (UTC+1) changed their display name from SomeoneSerge (void) to SomeoneSerge (UTC+1).23:02:33
@zraexy:nixos.devDavid Mell (zraexy) changed their display name from David Mell to David Mell (zraexy).23:52:02
26 Apr 2024
@eya:catgirl.cloudKatlah [she/her] joined the room.00:16:38
@taffisher:matrix.orgtad joined the room.03:16:32
@mjolnir:nixos.orgNixOS Moderation Bot banned @ultranix:matrix.org@ultranix:matrix.org (<no reason supplied>).09:39:48
@mjolnir:nixos.orgNixOS Moderation Bot banned @apcodes:matrix.org@apcodes:matrix.org (<no reason supplied>).09:39:49
@stablejoy:matrix.orgstablejoy changed their profile picture.14:03:34
@federicodschonborn:matrix.orgFederico Damián Schonborn changed their profile picture.14:48:38
@brokenpip3:matrix.orgbrokenpip3 joined the room.16:23:15
@brokenpip3:matrix.orgbrokenpip3

Hey there, is there any way to print a flake file in json? I want to extract some info
What I tried so far:

nix-instantiate --eval -E 'builtins.toJSON (builtins.readFile ./flake.nix)

is working but it's adding a lot of newline chars

nix eval --json -f flake.nix

cannot convert the entire flake, error at the output part
Thanks!

16:29:09
@mrvandalo:terranix.orgpalo

nix-instantiate --eval --json --strict flake.nix | jq

Eventuell? Bin unterwegs

16:38:41
@mrvandalo:terranix.orgpalo * nix-instantiate --eval --json --strict flake.nix | jq
Maybe?
16:39:02
@brokenpip3:matrix.orgbrokenpip3nope:16:39:17
@brokenpip3:matrix.orgbrokenpip3 *

nope:

error: cannot convert a function to JSON
16:39:26
@brokenpip3:matrix.orgbrokenpip3 *

nope:

           28|   outputs = { self, nixpkgs, home-manager, nixos-hardware, nix-colors, nixpkgs-rolling, nixgl, disko, ... }@inputs:
             |   ^
           29|     let

       error: cannot convert a function to JSON
16:39:44
@a4blue:4d2.orga4blueif you use nix repl you can navigate through the values, otherwise nix-inspect also is a nice program :)16:45:58
@brokenpip3:matrix.orgbrokenpip3is there a way to run the repl as command to get an output without entering the repl shell? :)16:46:50
@qyriad:katesiria.orgQyriad I think newer versions of the repl accept commands from non-terminal stdin? Not sure  16:54:46
@selachimorpha:matrix.orgselachimorpha joined the room.18:25:36
@eya:catgirl.cloudKatlah [she/her] changed their display name from eya to Katlah [she/her].19:10:47
@pxc:matrix.orgpxc changed their display name from pxc to pxc (why).23:32:07
@pxc:matrix.orgpxc changed their display name from pxc (why) to pxc.23:32:15
@qyriad:katesiria.orgQyriad changed their display name from Qyriad to Qyriad (she/they).23:47:44
@qyriad:katesiria.orgQyriad changed their display name from Qyriad (she/they) to Qyriad.23:47:57
27 Apr 2024
@qyriad:katesiria.orgQyriad changed their display name from Qyriad to Qyriad .00:01:06
@qyriad:katesiria.orgQyriad changed their display name from Qyriad to Qyriad.00:09:42

There are no newer messages yet.


Back to Room ListRoom Version: 6