guix-devel
[Top][All Lists]
Advanced

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

How do I reference the src checkout in a package?


From: jgart
Subject: How do I reference the src checkout in a package?
Date: Sat, 29 Oct 2022 23:05:50 -0500

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 via email to

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