+ (add-before 'install 'create-dest-dirs + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (mkdir out) + (mkdir (string-append out "/bin"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (system (string-append "./install.sh " out "/opt")) + (symlink + (string-append out "/opt/nim/bin/nim") + (string-append out "/bin/nim"))))))))
> Done. Nim is installed in /opt because it's the easiest and recommended > way of installing it. What do you think about patching install.sh to not create a nim subfolder? Then you could replace these two phases with + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (system* "./install.sh" out))