From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7dYW-0000v6-HY for guix-patches@gnu.org; Mon, 08 May 2017 03:58:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7dYQ-0002Cf-KW for guix-patches@gnu.org; Mon, 08 May 2017 03:58:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34669) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d7dYQ-0002CN-5Z for guix-patches@gnu.org; Mon, 08 May 2017 03:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d7dYP-0003JJ-VI for guix-patches@gnu.org; Mon, 08 May 2017 03:58:01 -0400 Subject: bug#26822: [PATCH] gnu: Add git-repo. Resent-Message-ID: From: Marius Bakke In-Reply-To: <1494193267-26385-1-git-send-email-h.goebel@crazy-compilers.com> References: <1494193267-26385-1-git-send-email-h.goebel@crazy-compilers.com> Date: Mon, 08 May 2017 09:57:31 +0200 Message-ID: <87mvanye50.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: Hartmut Goebel , 26822@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hartmut Goebel writes: > * 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 =C2=A9 2015 Kai-Chung Yan > ;;; Copyright =C2=A9 2016 Marius Bakke > ;;; Copyright =C2=A9 2017 Julien Lepiller > +;;; Copyright =C2=A9 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)) >=20=20 > ;; The Makefiles that we add are largely based on the Debian > @@ -298,3 +302,57 @@ with an emulator instance or connected Android devic= e. It facilitates a variety > of device actions, such as installing and debugging apps, and it provide= s access > to a Unix shell that can run commands on the connected device or emulato= r.") > (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")))) The indentation of (sha256.. should align with file-name. > + (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 =3D '\\.repo'") > + (string-append "repodir =3D '" repo-dir "'")) > + (("^S_repo =3D 'repo'") "S_repo =3D '.'")) > + #t > + ))) These parens want to stay closer to the #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")))))))) (symlink* ..) has an unspecified return value, so please return #t here. Otherwise looks good. Would it make sense to have it in version-control.scm, or is this tool mostly for doing Android development? > + (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 auto= mates > +parts of the development workflow. Repo is not meant to replace Git, on= ly to > +make it easier to work with Git. The repo command is an executable Pyth= on > +script that you can put anywhere in your path.") > + (license license:asl2.0))) > --=20 > 2.7.4 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlkQJOsACgkQoqBt8qM6 VPqTkwgAr1DWffK2CEh1VR07L5g78foafFzEApIBzuqwDRD1STi3cZ46bBAcupGt CXcqtgCyVD8GNoJcLzUwv4ozqpKN2ZM+6TTRnBaQxDDmIeeq53ctjpUAVOZlOUVW X61EcdDKhW2KX1pmC4XvTfCJ9bzcwYaSIeAIHv19dZ5zRNa1gxg1wTfyKtzE1hnn pAaMqc84kE946DLIkE1VcTAQVES9BD5DJTGEMMwa1aPqSHhnohpHC1P12XQfms2f YDPmSdCGBidlA6NYWMcOXisDVlEIqLXZaPPEMbnAwoJMTbgZ5RcnqL27MWaaHjun lFn9yMXZSmK0I73Ze1ox+q6vW16ViQ== =cbim -----END PGP SIGNATURE----- --=-=-=--