unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: jgart <jgart@dismail.de>
To: Guix Devel <guix-devel@gnu.org>
Subject: How do I reference the src checkout in a package?
Date: Sat, 29 Oct 2022 23:05:50 -0500	[thread overview]
Message-ID: <20221029230550.GB19931@dismail.de> (raw)

Hi,

I need to reference the carp checkout in an environment variable so that
carp can find the libs it needs:

/gnu/store/0xhn0vyjlcb2dv1h2333vhbj7j1vvrr6-carp-0.5.5-checkout

How can I do that?

* carp package definition

```
(define-public carp
  (package
    (name "carp")
    (version "0.5.5")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/carp-lang/Carp")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "14jdnv0ljqvpr9ych1plfw7hp5q57a8j1bv8h3v345x06z783d07"))))
    (build-system haskell-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
           (add-after 'install 'make-clang-available-at-runtime
             (lambda* (#:key inputs outputs #:allow-other-keys)
               (let ((out (assoc-ref outputs "out"))
                     (clang (assoc-ref inputs "clang")))
                 (wrap-program (string-append out "/bin/carp")
                   `("CARP_DIR" = (,out))
                   `("PATH" = (,(string-append clang "/bin"))))
                 (wrap-program (string-append out "/bin/carp-header-parse")
                   `("CARP_DIR" = (,out))
                   `("PATH" = (,(string-append clang "/bin"))))))))))
    (native-inputs (list ghc-hunit))
    (inputs (list clang
                  ghc-blaze-markup
                  ghc-blaze-html
                  ghc-split
                  ghc-ansi-terminal
                  ghc-cmark
                  ghc-edit-distance
                  ghc-hashable
                  ghc-open-browser
                  ghc-optparse-applicative))
    (home-page "https://carp-lang.org/")
    (synopsis "Statically typed Lisp without a garbage collector")
    (description
"@code{carp} is a programming language designed to work well for
interactive and performance sensitive use cases like games, sound
synthesis and visualizations.")
    (license license:asl2.0)))
```


             reply	other threads:[~2022-10-30  4:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30  4:05 jgart [this message]
2022-10-30  4:09 ` How do I reference the src checkout in a package? jgart
2022-10-30  4:47   ` Zhu Zihao
2022-10-30 16:32     ` jgart

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=20221029230550.GB19931@dismail.de \
    --to=jgart@dismail.de \
    --cc=guix-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).