unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Need some help packaging parts of a scientific workflow
@ 2023-03-22 21:29 Kyle Andrews
  2023-03-23 21:30 ` Philip McGrath
  0 siblings, 1 reply; 3+ messages in thread
From: Kyle Andrews @ 2023-03-22 21:29 UTC (permalink / raw)
  To: help-guix


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-29  4:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-22 21:29 Need some help packaging parts of a scientific workflow Kyle Andrews
2023-03-23 21:30 ` Philip McGrath
2023-03-29  4:46   ` Kyle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).