unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Kyle Andrews <kyle@posteo.net>
To: help-guix\@gnu.org <help-guix@gnu.org>
Subject: Need some help packaging parts of a scientific workflow
Date: Wed, 22 Mar 2023 21:29:38 +0000	[thread overview]
Message-ID: <874jqcs4s7.fsf@posteo.net> (raw)


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


             reply	other threads:[~2023-03-23  0:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 21:29 Kyle Andrews [this message]
2023-03-23 21:30 ` Need some help packaging parts of a scientific workflow Philip McGrath
2023-03-29  4:46   ` Kyle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jqcs4s7.fsf@posteo.net \
    --to=kyle@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).