| 21 May 2021 |
| gkaply532 joined the room. | 16:16:52 |
| kalbasit joined the room. | 16:50:56 |
| gilligan (he/him) joined the room. | 17:46:36 |
| rosariopulella joined the room. | 19:14:19 |
| zuckerberg joined the room. | 19:17:49 |
| toonn joined the room. | 20:06:16 |
| Lavender changed their display name from Lavender to Lavender's first braincell. | 20:07:07 |
| Lavender changed their display name from Lavender's first braincell to Lavender. | 20:08:14 |
| Josh joined the room. | 20:10:02 |
| escaP joined the room. | 20:15:59 |
| princemachiavelli joined the room. | 21:50:25 |
| maralorn joined the room. | 23:09:31 |
| 22 May 2021 |
| globin joined the room. | 00:04:23 |
| raccoon! joined the room. | 08:55:30 |
| andi- removed their profile picture. | 13:25:20 |
| andi- set a profile picture. | 13:34:02 |
| codyopel joined the room. | 14:24:03 |
| yusdacra changed their profile picture. | 15:11:39 |
| -chi joined the room. | 15:50:09 |
| mvnetbiz joined the room. | 15:52:23 |
| Alyssa Ross joined the room. | 18:01:06 |
Alyssa Ross | hmm, this channel isn't going to be the same without puck | 18:01:26 |
7c6f434c | Alyssa Ross: I guess puck will join in a few days? | 18:07:17 |
toonn | Back to being a quiet place to learn about Nix quirks. | 18:06:48 |
Alyssa Ross | i'm not sure she's going to make the move to matrix | 18:07:55 |
7c6f434c | Well, if there is not an IRC bridge in sight in a week… | 18:08:46 |
toonn | Tell them we'll keep them company over on Libera.Chat : ) | 18:11:02 |
Melg8 | Can somebody help, i've created a monster... now want it to be alive. How to test: nix-instantiate --eval --strict -E 'toString (import ./build_inputs_1.nix { pkg = (import <nixpkgs> {}).hello; })' Create file build_inputs_1.nix with:
{ pkg, lib ? import <nixpkgs/lib> }:
let
drv_direct_dependencies =
drv_path:
let
drv_file = builtins.readFile drv_path;
storeDirRe = lib.replaceStrings [ "." ] [ "\\." ] builtins.storeDir;
storeBaseRe = "[0-9a-df-np-sv-z]{32}-[+_?=a-zA-Z0-9-][+_?=.a-zA-Z0-9-]*";
re = "(${storeDirRe}/${storeBaseRe}\\.drv)";
inputs = lib.concatLists (lib.filter lib.isList (builtins.split re drv_file));
in
inputs;
drv_all_dependencies = { drv_path, visited }:
let
direct_dependencies = drv_direct_dependencies drv_path;
minimal_path = { paths = [ drv_path ]; visited = visited ++ [ drv_path ]; };
just_visited = { paths = [ ]; visited = visited ++ [ drv_path ];};
concat_outs = (out1: out2: { paths = out1.paths ++ out2.paths; visited = out1.visited ++ out2.visited; });
visit_all_childs = (out: dependency:
if (builtins.elem dependency out.visited) then out
else concat_outs out (drv_all_dependencies { drv_path = dependency; visited = out.visited; }));
result =
if (builtins.length direct_dependencies) == 0 then minimal_path
else concat_outs (builtins.foldl' visit_all_childs just_visited direct_dependencies) minimal_path;
in
result;
in
(drv_all_dependencies { drv_path = pkg.drvPath; visited = [ ]; }).paths
Problem: GC Warning: Repeated allocation of very large block (appr. size 2525917184):
but it works on small example (only 4 derivations in chain).
What i try to achieve: given drv_path function must reaturn a list, containing all derivations which need to be build in order to build derivation from drv_path. list should be ordered, so first on list is most needed derivation, last on list - derivation from given path.
| 18:16:10 |
Melg8 | i can add my initial attempt - without visited part, but it falis in other way - just too long to execute. | 18:18:49 |
sterni (he/him) | In reply to @qyliss:fairydust.space hmm, this channel isn't going to be the same without puck indeed :( | 18:19:11 |