From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: [PATCH 1/2] gnu: Add dub. Date: Sun, 22 Jan 2017 12:26:56 +0100 Message-ID: <20170122112657.18982-2-dannym@scratchpost.org> References: <20170122112657.18982-1-dannym@scratchpost.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVGIe-0003EB-VS for guix-devel@gnu.org; Sun, 22 Jan 2017 06:27:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVGIc-0004Vb-Ar for guix-devel@gnu.org; Sun, 22 Jan 2017 06:27:09 -0500 Received: from dd1012.kasserver.com ([85.13.128.8]:48869) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cVGIc-0004V2-4j for guix-devel@gnu.org; Sun, 22 Jan 2017 06:27:06 -0500 In-Reply-To: <20170122112657.18982-1-dannym@scratchpost.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/ldc.scm (dub): New variable. --- gnu/packages/ldc.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm index 6ea7f664b..4663d7d0c 100644 --- a/gnu/packages/ldc.scm +++ b/gnu/packages/ldc.scm @@ -27,6 +27,7 @@ #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages compression) + #:use-module (gnu packages curl) #:use-module (gnu packages libedit) #:use-module (gnu packages llvm) #:use-module (gnu packages python) @@ -171,3 +172,39 @@ latest DMD frontend and uses LLVM as backend.") (license (list license:bsd-3 license:gpl2+ license:boost1.0)))) + +(define-public dub + (package + (name "dub") + (version "1.2.0-rc.1") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/dlang/dub/archive/" + "v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "048067427rxpz58vxjsj3jzjhvgfs959k4yif0na76kjaxwf084v")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; it would have tested itself by installing some packages (vibe etc) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (zero? (system* "./build.sh")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (outbin (string-append out "/bin"))) + (mkdir-p outbin) + (install-file "bin/dub" outbin))))))) + (inputs + `(("curl" ,curl))) + (native-inputs + `(("ldc" ,ldc))) + (home-page "https://code.dlang.org/getting_started") + (synopsis "DUB package manager") + (description "D package manager") + (license (list license:expat)))) ; FIXME which MIT