From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Asfaw, Nardos" Subject: Re: [External] Re: New outreachy participant introduction Date: Sun, 13 Oct 2019 00:41:15 +0000 Message-ID: <1570927278147.77440@iu.edu> References: <1570119118548.1674@iu.edu> <1570504991415.84097@iu.edu> <87a7abag1z.fsf@cbaines.net>, Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:51406) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJRwp-0003yz-OW for guix-devel@gnu.org; Sat, 12 Oct 2019 20:41:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJRwn-0001I4-Dh for guix-devel@gnu.org; Sat, 12 Oct 2019 20:41:23 -0400 Received: from robin.uits.iu.edu ([134.68.220.32]:26814) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iJRwn-00017G-0T for guix-devel@gnu.org; Sat, 12 Oct 2019 20:41:21 -0400 In-Reply-To: Content-Language: en-US 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: zimoun , Christopher Baines Cc: Guix Devel Thank you Zimon. =0A= =0A= This has been very helpful. =0A= ________________________________________=0A= From: zimoun =0A= Sent: Tuesday, October 8, 2019 9:24 AM=0A= To: Christopher Baines=0A= Cc: Asfaw, Nardos; Guix Devel=0A= Subject: Re: [External] Re: New outreachy participant introduction=0A= =0A= Hi Nardos,=0A= =0A= Welcome ! :-)=0A= =0A= =0A= On Tue, 8 Oct 2019 at 08:48, Christopher Baines wrote:= =0A= =0A= > One good starting point would be an importer, there are a set of=0A= > importers included in Guix that take a package definition from somewhere= =0A= > else (like the Python package index, or Rubygems) and try to generate a= =0A= > Guix package definition. If you're familiar with some packages from one= =0A= > of the collections with a corresponding importer, that might be a good=0A= > place to start.=0A= =0A= As an example, let consider packages from BioConductor [1] (mainly R=0A= packages used in bioinformatics field). If I have right, then 2002=0A= packages are still missing in Guix, so there is materials. ;-)=0A= =0A= Well, let's pick one which is not packaged yet: zinbwave [2]. Then it is ea= sy:=0A= =0A= guix import cran -r -a bioconductor zinbwave=0A= =0A= This will download TAR archives and automatically compute the hash. It=0A= corresponds to the manual:=0A= =0A= guix download=0A= https://bioconductor.org/packages/release/bioc/src/contrib/zinbwave_1.6.0.t= ar.gz=0A= =0A= =0A= [1] https://bioconductor.org/=0A= [2] https://bioconductor.org/packages/release/bioc/html/zinbwave.html=0A= =0A= =0A= Moreover, the importer provides the definition of the package:=0A= =0A= --8<---------------cut here---------------start------------->8---=0A= (define-public r-zinbwave=0A= (package=0A= (name "r-zinbwave")=0A= (version "1.6.0")=0A= (source=0A= (origin=0A= (method url-fetch)=0A= (uri (bioconductor-uri "zinbwave" version))=0A= (sha256=0A= (base32=0A= "187r7l9jf2q74qaqx63df5zx6iphmvl817448balvfv9vqyhrp2j"))))=0A= (properties `((upstream-name . "zinbwave")))=0A= (build-system r-build-system)=0A= (propagated-inputs=0A= `(("r-biocparallel" ,r-biocparallel)=0A= ("r-copula" ,r-copula)=0A= ("r-edger" ,r-edger)=0A= ("r-genefilter" ,r-genefilter)=0A= ("r-glmnet" ,r-glmnet)=0A= ("r-matrix" ,r-matrix)=0A= ("r-singlecellexperiment"=0A= ,r-singlecellexperiment)=0A= ("r-softimpute" ,r-softimpute)=0A= ("r-summarizedexperiment"=0A= ,r-summarizedexperiment)))=0A= (home-page=0A= "https://bioconductor.org/packages/zinbwave")=0A= (synopsis=0A= "Zero-Inflated Negative Binomial Model for RNA-Seq Data")=0A= (description=0A= " Implements a general and flexible zero-inflated negative=0A= binomial model that can be used to provide a low-dimensional=0A= representations of single-cell RNA-seq data. The model accounts for=0A= zero inflation (dropouts), over-dispersion, and the count nature of=0A= the data. The model also accounts for the difference in library sizes=0A= and optionally for batch effects and/or other covariates, avoiding the=0A= need for pre-normalize the data.")=0A= (license artistic2.0)))=0A= --8<---------------cut here---------------end--------------->8---=0A= =0A= In the propagated input, you can see the package `r-copula` which is=0A= not yet packaged neither. But, the nice option --recursive does the=0A= job for you and it also gives you the package definition.=0A= =0A= Now, let add them to the Guix source. Clone the repo and go in the=0A= folder. The command:=0A= =0A= guix environment guix=0A= =0A= will download the dependencies to build Guix and setup all the=0A= variables correctly. Well, refer to the documentation to compile Guix=0A= from source. Basically:=0A= =0A= ./bootstrap=0A= ./configure --localstatedir=3D/var=0A= make=0A= =0A= Now, you can run this version with ./pre-inst-env, for example:=0A= =0A= ./pre-inst-env guix describe=0A= =0A= =0A= Well, ready to add one package! For example, add `r-copula` to the=0A= file gnu/package/cran.scm then recompile with make. Check if it is ok:=0A= =0A= ./pre-inst-env guile show r-copula=0A= =0A= Ouch! `r-psline` is missing so let also add it (the definition was=0A= provided by the importer), run make again. Now "./pre-inst-env guix=0A= show r-copula" should work.=0A= Add the package definition of zinbwave to the file gnu/package/bioconductor= .scm.=0A= =0A= Let build them:=0A= =0A= ./pre-inst-env guix build r-zinbwave=0A= =0A= and time to breath. ;-)=0A= =0A= =0A= If something fails, try to investigate by yourself and do not hesitate=0A= to ask advices or help.=0A= If everything is ok, the package still needs some polishing: synopsis,=0A= description, indentation, etc and really important: check the license=0A= field.=0A= =0A= The next step is to commit the changes. In this case, three commits=0A= (one per package) seem nice. Give a look to previous commits as=0A= example of commit message (ChangeLog format, etc.). Now, it is time to=0A= prepare the submission:=0A= =0A= git format-patch --cover-letter - o patches master=0A= =0A= this will create the 3 patches in the folder patches/ and one cover=0A= letter. Edit the cover letter to describe what the patches are about=0A= then submit it to the bug tracker:=0A= =0A= git send-email --to=3Dguix-patches@gnu.org patches/0000-cover-letter.patc= h=0A= =0A= Wait the answer to the bug tracker.=0A= You should receive an email (if your .gitconfig is ok) with the bug=0A= number. Last submit the patches:=0A= =0A= git send-email --to=3DABCDEF@debbugs.gnu.org patches/000{1,2,3}-*=0A= =0A= where ABCDEF is the bug number.=0A= =0A= =0A= =0A= Well, if you need some inspiration to find unpackaged tools from BioConduct= or:=0A= =0A= wget https://git.bioconductor.org -qO - | sed -ne=0A= '/packages\/[a-zA-Z]/{s,^.*R.*packages/,,p}' > bioc_manifest=0A= ./pre-inst-env guile --no-auto-compile missing-bioconductor.scm bioc_mani= fest=0A= =0A= where the file `missing-bioconductor.scm` is given by:=0A= =0A= --8<---------------cut here---------------start------------->8---=0A= (use-modules ((guix import utils) #:select (guix-name))=0A= (gnu packages)=0A= (srfi srfi-1) ;lists=0A= (ice-9 textual-ports))=0A= =0A= (define (fetch-names manifest)=0A= "Return a list of strings, each corresponding to a name from the=0A= input file MANIFEST."=0A= (call-with-input-file manifest=0A= (lambda (port)=0A= (let loop ((lines '())=0A= (line (get-line port)))=0A= (if (eof-object? line)=0A= (reverse lines)=0A= (loop (cons line lines)=0A= (get-line port)))))))=0A= =0A= ;;; Start!=0A= =0A= (map (lambda (name)=0A= (when (null? (find-packages-by-name (guix-name "r-" name)))=0A= (begin=0A= (display name)=0A= (newline))))=0A= (fetch-names (cadr (command-line))))=0A= =0A= ;; wget https://git.bioconductor.org -qO - | sed -ne=0A= '/packages\/[a-zA-Z]/{s,^.*R.*packages/,,p}' > bioc_manifest=0A= ;; ./pre-inst-env guile --no-auto-compile missing-bioconductor.scm bioc_man= ifest=0A= --8<---------------cut here---------------end--------------->8---=0A= =0A= =0A= Hope that help.=0A= =0A= All the best,=0A= simon=0A=