From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] gnu: Add git-review. Date: Fri, 09 Sep 2016 21:49:53 +0300 Message-ID: <87inu4zz5a.fsf@gmail.com> References: <20160908070630.18458-1-clement@lassieur.org> <439770f1-4691-45ac-348e-9e41bc126e0d@uq.edu.au> <20160908183217.GK12493@macbook42.flashner.co.il> <87oa3xfpmv.fsf@lassieur.org> <20160909150021.GD5507@macbook42.flashner.co.il> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biQsD-0004Hv-Cy for guix-devel@gnu.org; Fri, 09 Sep 2016 14:50:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biQs8-0006lL-9G for guix-devel@gnu.org; Fri, 09 Sep 2016 14:50:00 -0400 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:34526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biQs8-0006lH-1U for guix-devel@gnu.org; Fri, 09 Sep 2016 14:49:56 -0400 Received: by mail-lf0-x244.google.com with SMTP id k12so3010859lfb.1 for ; Fri, 09 Sep 2016 11:49:55 -0700 (PDT) In-Reply-To: <20160909150021.GD5507@macbook42.flashner.co.il> (Efraim Flashner's message of "Fri, 9 Sep 2016 18:00:21 +0300") 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: Efraim Flashner Cc: guix-devel@gnu.org Efraim Flashner (2016-09-09 18:00 +0300) wrote: [...] > + (arguments > + `(#:tests? #f ; tests require a running Gerrit server > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'hardcode-outside-programs > + (lambda _ A side note: I think in phases it is better to use 'inputs' argument instead of %build-inputs: (lambda* (#:key inputs #:allow-other-keys) > + (let* ((git (string-append > + (assoc-ref %build-inputs "git") "/bin/git")) > + (base (assoc-ref %build-inputs "openssh")) (assoc-ref inputs "git") and (assoc-ref inputs "openssh") here > + (ssh (string-append base "/bin/ssh")) > + (scp (string-append base "/bin/scp"))) > + (substitute* '("git_review/cmd.py" "git_review/tests/test_git_review.py" > + "git_review/tests/test_unit.py" "git_review/tests/utils.py") > + (("\"git ") (string-append "\"" git " ")) > + (("\"git\"") (string-append "\"" git "\"")) > + (("'git'") (string-append "'" git "'"))) > + (substitute* "git_review/cmd.py" > + (("\"ssh\"") (string-append "\"" ssh "\"")) > + (("'ssh'") (string-append "'" ssh "'")) > + (("\"scp\"") (string-append "\"" scp "\"")) > + (("'scp") (string-append "'" scp))) > + #t)))))) > (native-inputs > `(("python-pbr" ,python-pbr))) > (inputs > `(("python-requests" ,python-requests) > + ("openssh" ,openssh) > ("git" ,git))) > (home-page "http://docs.openstack.org/infra/git-review/") > (synopsis "Command-line tool for Gerrit") -- Alex