From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Lirzin Subject: Re: Using Eclipse IDE on GuixSD Date: Sun, 08 Jul 2018 21:16:21 +0200 Message-ID: <87lgalk06y.fsf@gnu.org> References: <87h8rrjb9j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcFAZ-0007z0-Ct for help-guix@gnu.org; Sun, 08 Jul 2018 15:16:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcFAW-00063V-45 for help-guix@gnu.org; Sun, 08 Jul 2018 15:16:27 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcFAV-00063N-VB for help-guix@gnu.org; Sun, 08 Jul 2018 15:16:24 -0400 Received: from 85.63.10.109.rev.sfr.net ([109.10.63.85]:37696 helo=token) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fcFAV-0001kA-HH for help-guix@gnu.org; Sun, 08 Jul 2018 15:16:23 -0400 In-Reply-To: <87h8rrjb9j.fsf@gnu.org> (Mathieu Lirzin's message of "Fri, 12 Jan 2018 17:24:24 +0100") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix@gnu.org --=-=-= Content-Type: text/plain Mathieu Lirzin writes: > I would like to have a package definition that uses an official > prebuilt tarball [1] as origin. Does anybody has a custom package > definition in their GUIX_PACKAGE_PATH for doing that? If not, I will > try to convert the Nix package definition [2] myself. But I would be > pleased not to have to. Just in case it interests anyone here is my package definition. --=-=-= Content-Type: text/x-script.guile; charset=utf-8 Content-Disposition: inline; filename=eclipse.scm Content-Transfer-Encoding: quoted-printable ;;;; eclipse.scm -- Mthl's eclipse package definition ;;; Copyright =C2=A9 2018 Mathieu Lirzin ;;; ;;; This program 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. ;;; ;;; This program 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 this program. If not, see . (define-module (mthl packages eclipse) #:use-module (guix packages) #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (gnu packages elf) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) #:use-module (gnu packages java) #:use-module (gnu packages xorg) #:use-module (guix download) #:use-module (guix build-system trivial) #:use-module ((guix licenses) #:prefix license:)) (define-public eclipse-java ;; XXX: This package is not built from source. (package (name "eclipse-java") (version "oxygen") ;; TODO: Handle i686 alternate origin and augment 'supported-systems'. (source (origin (method url-fetch) (uri (string-append "https://www.eclipse.org/downloads/download.php?" "r=3D1&nf=3D1&file=3D/technology/epp/downloads/release/" version "/3a/" name "-" version "-3a-linux-gtk-x86_64.tar.gz")) (sha256 (base32 "0m7y7jfm059w01x9j5b5qkinjjmhkyygpjabhjf19fg2smxmwcim")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) (let* ((source (assoc-ref %build-inputs "source")) (out (assoc-ref %outputs "out")) (eclipse (string-append out "/eclipse/eclipse"))) (mkdir-p (string-append out "/bin")) (set-path-environment-variable "PATH" '("bin") (map cdr %build-inputs)) (and (invoke "tar" "xvf" source "-C" out) (let ((ld-so (string-append (assoc-ref %build-inputs "libc") "/lib/ld-linux-x86-64.so.2"))) (invoke "patchelf" "--set-interpreter" ld-so eclipse)) (let ((jdk (assoc-ref %build-inputs "jdk"))) (define (libdir input) (string-append (assoc-ref %build-inputs input) "/lib")) (wrap-program eclipse `("PATH" prefix (,(string-append jdk "/bin"))) `("LD_LIBRARY_PATH" prefix ,(map libdir '("gtk+" "libxtst" "glib")))) (symlink eclipse (string-append out "/bin/eclipse")) #t)))))) (native-inputs `(("tar" ,tar) ("gzip" ,gzip) ("patchelf" ,patchelf))) (inputs `(("bash" ,bash) ("glib" ,glib) ("gtk+" ,gtk+) ("jdk" ,icedtea-8) ("libc" ,glibc) ("libxtst" ,libxtst))) (supported-systems '("x86_64-linux")) (synopsis "Java Integrated Development Environment") (description "Eclipse is an integrated development environment (IDE) used in comput= er programming, in particular for Java development. It contains a base worksp= ace and an extensible plug-in system for customizing the environment.") (home-page "https://www.eclipse.org/") (license license:mpl2.0))) --=-=-= Content-Type: text/plain -- Mathieu Lirzin GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37 --=-=-=--