Hello! Nikita Karetnikov <nik...@karetnikov.org> skribis:
> The game is just a single Perl file. I think this is a good use case for ‘trivial-build-system’. Basically, with ‘trivial-build-system’, you just pass a Scheme expression that produces the result. In your case that would be along the lines of: (begin (use-modules (guix build utils)) (let* ((gh (assoc-ref %build-inputs "source")) (perl (assoc-ref %build-inputs "perl")) (out (assoc-ref %outputs "out")) (bin (string-append out "/bin))) (mkdir-p bin) (copy-file gh (string-append bin "/gh")) (patch-shebang (string-append bin "/gh") (list (string-append perl "/bin"))) ;; ... )) > What directories should be created in the store? $out/bin for the program, and $out/share/doc/grue-hunter for the license file. > And how can I create such directories? With the ‘mkdir’ and ‘mkdir-p’ procedures. > I've tried several things: > > 1. (zero? (system (format #f "cp -r . ~a" out))) Avoid calling out to Coreutils. Guile and the (guix build utils) provide us with everything we need to do that. HTH! Ludo’.