unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How do I reference the src checkout in a package?
@ 2022-10-30  4:05 jgart
  2022-10-30  4:09 ` jgart
  0 siblings, 1 reply; 4+ messages in thread
From: jgart @ 2022-10-30  4:05 UTC (permalink / raw)
  To: Guix Devel

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


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

end of thread, other threads:[~2022-10-30 16:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-30  4:05 How do I reference the src checkout in a package? jgart
2022-10-30  4:09 ` jgart
2022-10-30  4:47   ` Zhu Zihao
2022-10-30 16:32     ` jgart

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