[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need some help packaging parts of a scientific workflow

From: Kyle Andrews
Subject: Need some help packaging parts of a scientific workflow
Date: Wed, 22 Mar 2023 21:29:38 +0000

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

>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:

 (name "custom-shell-tool")
 (version "1")
  (local-file "package_location")) ; how to refer to local files?
 (build-system copy-build-system)
   #~(modify-phases %standard-phases
      (add-before 'install 'compile 
       (lambda _
        (invoke "raco" "exe"
          #$package-folder ; how to refer to the build itself?
   #~'(("custom-shell-tool" "bin/")))
  (home-page #f)
   "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

I'm especially interested in figuring out how I can productively learn
to experiment productively with this stuff for myself.

Thanks for your help,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]