!tDnwWRNkmmYtMXfaZl:nixos.org

Nix Language

1928 Members
Nix programming language359 Servers

Load older messages


SenderMessageTime
20 May 2021
@yusdacra:tchncs.deyusdacra joined the room.15:34:07
@berdario:matrix.orgberdario joined the room.16:11:58
@railroadmanualjimmy:matrix.orgrailroadmanualjimmy joined the room.18:11:47
@legendofmiracles:matrix.orglegendofmiracles changed their display name from legendofmiracles to 😭.18:46:52
@legendofmiracles:matrix.orglegendofmiracles changed their display name from 😭 to legendofmiracles.18:48:05
@timidbits:matrix.orgtimidbit joined the room.18:53:41
@red:evil.redred joined the room.19:03:17
@gilganix:matrix.org-(NIX/ℝτ)- joined the room.20:03:18
@colemickens:matrix.orgcolemickens πŸ³οΈβ€πŸŒˆ changed their display name from colemickens to colemickens πŸ³οΈβ€πŸŒˆ.21:06:14
@jcie74:matrix.orgpie_ joined the room.21:13:52
@sternenseemann:systemli.orgsterni (he/him) joined the room.23:51:58
@sternenseemann:systemli.orgsterni (he/him)
In reply to @melg8:matrix.org
Hi, maybe somebody know, how can i replicate "nix-store --print-env" call but inside nix and without directly calling print-env? so i need to generate something like string with concatenated env_var1="value1"\n env_var2="value2" from given derivation A = derivation {...};?
the actual environment or the one prescribed in the derivation
23:56:03
@sternenseemann:systemli.orgsterni (he/him) derivation.drvAttrs contains everything you need theoretically, but you'd still convert it to environment values (i. e. strings) correctly 23:56:28
@sternenseemann:systemli.orgsterni (he/him) you can also do something like hello.overrideAttrs (_: { buildCommand = "env > $out"; }) which is a bit hacky, but works pretty well if a derivation is okay with you 23:57:12
21 May 2021
@melg8:matrix.orgMelg8i have custom derivations which don't have proper bash even, sou i cant just do that. But yea drvAttrs i'll try it00:15:11
@melg8:matrix.orgMelg8 sterni: thanks 00:15:33
@unclechu:matrix.orgunclechu joined the room.00:21:44
@snail:the-apothecary.clubLavender joined the room.00:30:12
@hjulle:matrix.orghjulle joined the room.01:21:36
@vborja:matrix.orgvic joined the room.02:24:32
@yusdacra:tchncs.deyusdacra changed their profile picture.05:10:19
@alarsyo:alarsyo.netalarsyo set a profile picture.08:21:20
@sternenseemann:systemli.orgsterni (he/him)
In reply to @sternenseemann:systemli.org
derivation.drvAttrs contains everything you need theoretically, but you'd still convert it to environment values (i. e. strings) correctly
I think the conversion to strings is very similar to toString if not the same thing (guess you have to check the source to find out)
08:49:15
@higebu:matrix.orghigebu joined the room.10:20:36
@rizary:matrix.orgrizary_andika (@rizary_:matrix.org) (@rizary:matrix.org) joined the room.11:54:15
@domenkozar:matrix.orgDomen KoΕΎar joined the room.12:15:12
@plabadens:matrix.orgplabadens joined the room.12:35:17
@melg8:matrix.orgMelg8 sterni: somewhat similar question, if i have nix-store -qR $(nix-instantiate ./default.nix) | grep '[.]drv$' - so i need list of all derivations in order, that i should build to build some concrete derivation X (yea i know that nix-instantiate here uses whole default.nix but you get the idea). So.. can same thing be chieved (without just using this command) on raw (no stdenv.mkDerivation) derivations and gathered? what approach would be? 12:42:47
@melg8:matrix.orgMelg8 * sterni: somewhat similar question, if i have nix-store -qR $(nix-instantiate ./default.nix) | grep '[.]drv$' - so i need list of all derivations in order, that i should build to build some concrete derivation X (yea i know that nix-instantiate here uses whole default.nix but you get the idea). So.. can same thing be achived (without just using this command) on raw (no stdenv.mkDerivation) derivations and gathered? what approach would be? 12:43:22
@sternenseemann:systemli.orgsterni (he/him)Nix doesn't really offer this kind of introspection in the language. It would probably be possible to achieve, but would require you to reimplement parts of the package manager in pure nix which is bound to result in implementation errors. Also some things required for this like inspecting string context are essentially implementation details and the nix language doesn't really know anything about realizing derivations12:47:59

Show newer messages


Back to Room ListRoom Version: 6