Open aartaka opened 4 years ago
Most packages use a similar pattern of installation through trivial-build-system and patterns like:
trivial-build-system
(begin (use-modules (guix build utils)) (let* ((src (assoc-ref %build-inputs "source")) (out (assoc-ref %outputs "out")) (bin (string-append out "/bin")) (bash (string-append (assoc-ref %build-inputs "bash") "/bin/bash")) (perl (string-append (assoc-ref %build-inputs "perl") "/bin/perl"))) (mkdir-p bin) (copy-recursively src out) (with-directory-excursion bin (call-with-output-file "nikto" (lambda (p) (format p "#!~a exec ~a ~a/program/nikto.pl \"$@\"" bash perl out))) (chmod "nikto" #o555) #t)))
It'd be nice to have shell-exec-build-system to abstract this repeating code away.
shell-exec-build-system
make-wrapper from (nonguix build utils) is getting close to solving this, but it has no support for custom interpreters.
make-wrapper
(nonguix build utils)
Most packages use a similar pattern of installation through
trivial-build-system
and patterns like:It'd be nice to have
shell-exec-build-system
to abstract this repeating code away.