Copy with symlinks resolved - Nix

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Sridhar Ratnakumar

Is there a handy function that can be used to clone a source path with symlinks in it resolved (without having to resort of creating it manually, using runCommand and the link)?

    prettyprinter = (import <nixpkgs> {}).runCommand "prettyprinter" {}
    ''
      cp -r -L ${prettyprinterSrc}/prettyprinter $out
    '';

(the -L argument achieves it manually)