Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Makefile to use host CC #449

Merged
merged 1 commit into from
Dec 31, 2022
Merged

Update Makefile to use host CC #449

merged 1 commit into from
Dec 31, 2022

Conversation

jgarte
Copy link
Contributor

@jgarte jgarte commented Dec 28, 2022

Hi, I was able to get lfe working with GNU Guix and the changes in this PR simplified my Guix code a lot. I think it might also be good general practice for the Makefile.

What do you think?

Here's how my Guix package for lfe looks if this variable exists in the Makefile. Otherwise, I have to patch the Makefile which I can do but I thought this might be nice to add upstream.

This is how the Guix package looks when I have to patch cc:

https://issues.guix.gnu.org/60372

Closes #441

;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages lfe)
  #:use-module (guix build-system gnu)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils)
  #:use-module (guix gexp)
  #:use-module (guix build utils)
  #:use-module (gnu packages erlang)
  #:use-module (gnu packages))

(define-public lfe
  (package
    (name "lfe")
    (version "2.0.1")
    (source 
      (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/lfe/lfe")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0a5cfnk3021idvv4bv2lvnksjy9d0yyd13bnj793ks86j5f3hdv5"))))
    (build-system gnu-build-system)
    (propagated-inputs (list erlang))
    (arguments 
      (list #:tests? #f
            #:make-flags
            #~(list
               (string-append "PREFIX=" #$output)
               (string-append "CC=" #$(cc-for-target)))
            #:phases
            #~(modify-phases %standard-phases
                (delete 'configure))))
    (synopsis "Lisp Flavoured Erlang")
    (description
"@code{lfe}, Lisp Flavoured Erlang, is a lisp syntax front-end to the
Erlang compiler. Code produced with it is compatible with normal Erlang
code. An @code{lfe} evaluator and shell is also included.")
    (home-page "https://lfe.io/")
    (license license:asl2.0)))

@oubiwann
Copy link
Member

Yeah, this is a good change -- thanks!

@rvirding rvirding merged commit 5f0e7c3 into lfe:develop Dec 31, 2022
@jgarte jgarte deleted the usecc branch December 31, 2022 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there any advantage to installing lfe via Make or rebar?
3 participants