| 22 May 2021 |
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 |
Melg8 | thanks! i figured out it by myself - just too much stuff were in "visited" - so i've added lib.unique - and now it works! anyway, if anyone have suggestions, i would like to hear them) | 18:31:11 |
| Stéphan set a profile picture. | 20:23:18 |
| ivan joined the room. | 21:27:59 |
| ivan changed their display name from ivank to ivan. | 21:30:08 |
| 23 May 2021 |
| codygman joined the room. | 03:12:17 |
| treed joined the room. | 04:47:52 |
| Emelie joined the room. | 07:40:29 |
| mudrii joined the room. | 08:36:13 |
| V joined the room. | 11:18:28 |
| V changed their display name from v to V. | 11:19:59 |
| fortuneteller2k changed their display name from fortuneteller2k to rtl. | 12:44:44 |
| fortuneteller2k changed their display name from rtl to f2k. | 12:45:07 |
| fortuneteller2k changed their display name from f2k to fortuneteller2k. | 12:47:58 |
| sterni (he/him) changed their display name from sterni to sterni (he/him). | 13:24:23 |
legendofmiracles | can either this channel or nix offtopic have another picture? It's hard to distinguish them | 13:24:39 |
Alyssa Ross | legendofmiracles: might want to make that request in the matrix suggestions room to make sure it's seen :) | 13:25:10 |
legendofmiracles | oh right, that exists now | 13:25:21 |
| pinage404 joined the room. | 14:20:09 |
| cicucci joined the room. | 15:36:26 |
| cicucci set a profile picture. | 15:41:38 |
| ijustwannalurk joined the room. | 20:38:09 |
| ijustwannalurk set a profile picture. | 22:46:50 |
| 24 May 2021 |
| rajivr joined the room. | 03:34:02 |
| hexa joined the room. | 04:59:23 |