!tDnwWRNkmmYtMXfaZl:nixos.org

Nix Language

1935 Members
Nix programming language362 Servers

Load older messages


SenderMessageTime
20 May 2021
@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
@sternenseemann:systemli.orgsterni (he/him) you probably should use nix show-derivation and nix-store --requisites for what you are trying to find out 12:48:17
@sternenseemann:systemli.orgsterni (he/him)getting a list of derivations your derivation depends on in nix is rather difficult and error prone12:48:53
@melg8:matrix.orgMelg8Okay, i see... thanks12:56:38
@melg8:matrix.orgMelg8 sterni: on the option of making my live harder, can https://github.com/NixOS/nix/issues/1245#issuecomment-401642781 this be used as foundation for "reimplement parts of package manager"? 13:10:09
@sternenseemann:systemli.orgsterni (he/him)this seems like the most sensible approach to the problem actually13:21:53
@sternenseemann:systemli.orgsterni (he/him)although “sensible” is relative here ofc13:22:06
@sternenseemann:systemli.orgsterni (he/him)but consider if you can solve your problem (whatever it is) without resorting to this kind of thing since it is not really intended to work13:22:39
@sternenseemann:systemli.orgsterni (he/him) * but consider if you can solve your problem (whatever it is) without resorting to this kind of thing since it is not really intended13:22:47
@figsoda:matrix.orgfigsodawhat's the point of the global flake registry?15:23:38
@figsoda:matrix.orgfigsodanixpkgs seems to be the only flake that is used15:23:54
@roosemberth:orbstheorem.chRoosI have added the flake of my own dotfiles to my NixOS system configuration.15:24:56
@roosemberth:orbstheorem.chRoosI wan easily do overrides in my system configuration without switching15:25:26
@roosemberth:orbstheorem.chRoosOr even have a lighter default configuration and pull 'customized environments'.15:25:46

Show newer messages


Back to Room ListRoom Version: 6