From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7TwL-0005i7-7L for guix-patches@gnu.org; Sun, 07 May 2017 17:42:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7TwI-0003bH-48 for guix-patches@gnu.org; Sun, 07 May 2017 17:42:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34432) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d7TwI-0003bD-0T for guix-patches@gnu.org; Sun, 07 May 2017 17:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d7TwH-00062d-Qc for guix-patches@gnu.org; Sun, 07 May 2017 17:42:01 -0400 Subject: bug#26822: [PATCH] gnu: Add git-repo. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48411) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7TvW-0005gG-Ox for guix-patches@gnu.org; Sun, 07 May 2017 17:41:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7TvT-0003U3-KD for guix-patches@gnu.org; Sun, 07 May 2017 17:41:14 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:43999) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d7TvT-0003Ta-AQ for guix-patches@gnu.org; Sun, 07 May 2017 17:41:11 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3wLfFx3NNFz1rLQW for ; Sun, 7 May 2017 23:41:09 +0200 (CEST) Received: from localhost (dynscan01.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3wLfFx1mbzz3jgYl for ; Sun, 7 May 2017 23:41:09 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan01.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id SKs4BEGuVKea for ; Sun, 7 May 2017 23:41:08 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-46-244-140-221.dynamic.mnet-online.de [46.244.140.221]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Sun, 7 May 2017 23:41:08 +0200 (CEST) Received: from lenashee.goebel-consult.de (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id B11AB6031E for ; Mon, 8 May 2017 01:36:51 +0200 (CEST) From: Hartmut Goebel Date: Sun, 7 May 2017 23:41:07 +0200 Message-Id: <1494193267-26385-1-git-send-email-h.goebel@crazy-compilers.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26822@debbugs.gnu.org * gnu/packages/android.scm (git-repo): New variable. --- gnu/packages/android.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index e23d0fd..23ffa2b 100644 --- a/gnu/packages/android.scm +++ b/gnu/packages/android.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Kai-Chung Yan ;;; Copyright © 2016 Marius Bakke ;;; Copyright © 2017 Julien Lepiller +;;; Copyright © 2017 Hartmut Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,8 +24,11 @@ #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (guix build-system python) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) + #:use-module (gnu packages python) + #:use-module (gnu packages version-control) #:use-module (gnu packages tls)) ;; The Makefiles that we add are largely based on the Debian @@ -298,3 +302,57 @@ with an emulator instance or connected Android device. It facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that can run commands on the connected device or emulator.") (license license:asl2.0))) + +(define-public git-repo + (package + (name "git-repo") + (version "1.12.37") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gerrit.googlesource.com/git-repo") + (commit (string-append "v" version)))) + (file-name (string-append "git-repo-" version "-checkout")) + (sha256 + (base32 "0qp7jqhblv7xblfgpcq4n18dyjdv8shz7r60c3vnjxx2fngkj2jd")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (repo-dir (string-append out "/share/" ,name))) + (substitute* "repo" + (("^repodir = '\\.repo'") + (string-append "repodir = '" repo-dir "'")) + (("^S_repo = 'repo'") "S_repo = '.'")) + #t + ))) + (replace 'check + (lambda _ + (zero? (system* "python" "-m" "nose")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin-dir (string-append out "/bin")) + (repo-dir (string-append out "/share/" ,name))) + (mkdir-p bin-dir) + (mkdir-p repo-dir) + (copy-recursively "." repo-dir) + (delete-file-recursively (string-append repo-dir "/tests")) + (symlink (string-append repo-dir "/repo") + (string-append bin-dir "/repo")))))))) + (native-inputs + `(("nose" ,python2-nose) + ("git" ,git))) + (home-page "https://code.google.com/p/git-repo/") + (synopsis "Helps to manage many Git repositories.") + (description "Repo is a tool built on top of Git. Repo helps manage many +Git repositories, does the uploads to revision control systems, and automates +parts of the development workflow. Repo is not meant to replace Git, only to +make it easier to work with Git. The repo command is an executable Python +script that you can put anywhere in your path.") + (license license:asl2.0))) -- 2.7.4