Dear Guix,
Part of my scientific workflow involves compiling a small Racket script for a command line program into its executable and placing that on PATH. I had bundled this script inside an R package which made sure it got compiled and everything was correctly configured at library load time. >From hanging around here for a bit, I have learned this practice is probably a bad thing for reproducibility. I should separate my support programs out from my R package rather than leaving them bundled in. >From reading the documentation a lot, I think the actual compilation step can be done using the "invoke" procedure like so: ``` (invoke "raco" "exe" "{package_location}/custom-shell-tool.rkt") ``` What I'm struggling with the most is understanding all the boilerplate code I need to place around that fundamental call. Below is a text-painting of the state of my misunderstanding: ``` (package (name "custom-shell-tool") (version "1") (source (local-file "package_location")) ; how to refer to local files? (build-system copy-build-system) (arguments (list #:phases #~(modify-phases %standard-phases (add-before 'install 'compile (lambda _ (invoke "raco" "exe" (string-append #$package-folder ; how to refer to the build itself? "custom-shell-tool.rkt")))))) #:install-plan #~'(("custom-shell-tool" "bin/"))) (home-page #f) (synopsis "A custom shell tool needed only for the niche workflows I write") (description "This package is different from the ones in Guix.") (license #f)) ``` Would you please help me translate this text painting into a working package? I'm especially interested in figuring out how I can productively learn to experiment productively with this stuff for myself. Thanks for your help, Kyle