Hello,

I've got an issue I don't fully know how to solve in the simplest way.

I have a file which contains something like this:

'text' -> input_port var_name_instance(a_dynamic_component_name)
output_port ... etc etc

a_dynamic_component_name could be a name of one of my components in a file
equivalent to all-packages.nix

How do I replace the name a_dynamic_component_name with
/nix/store/<hash>-a_dynamic_component_name/lib/libcomponent.so dynamically?

ie

'text' -> input_port var_name_instance(a_dynamic_component_name)
output_port ... etc etc

becomes

'text' -> input_port
var_name_instance(/nix/store/<hash>-a_dynamic_component_name/lib/libcomponent.so)
output_port ... etc etc

This file is now ready for execution by a vm.

I do not know the name ahead of time.

Would builtins.tryEval help at all? Seems the docs are sparse and whatever
is written on the subject lead me to believe it's a tryCatch.

/sjm
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to