Hello Nardos, We have not heard from you for a while. Should you need any help, please feel free to reach out to us. Asfaw, Nardos ezt írta (időpont: 2019. okt. 13., Vas 2:41): > Thank you Zimon. > > This has been very helpful. > ________________________________________ > From: zimoun > Sent: Tuesday, October 8, 2019 9:24 AM > To: Christopher Baines > Cc: Asfaw, Nardos; Guix Devel > Subject: Re: [External] Re: New outreachy participant introduction > > Hi Nardos, > > Welcome ! :-) > > > On Tue, 8 Oct 2019 at 08:48, Christopher Baines wrote: > > > One good starting point would be an importer, there are a set of > > importers included in Guix that take a package definition from somewhere > > else (like the Python package index, or Rubygems) and try to generate a > > Guix package definition. If you're familiar with some packages from one > > of the collections with a corresponding importer, that might be a good > > place to start. > > As an example, let consider packages from BioConductor [1] (mainly R > packages used in bioinformatics field). If I have right, then 2002 > packages are still missing in Guix, so there is materials. ;-) > > Well, let's pick one which is not packaged yet: zinbwave [2]. Then it is > easy: > > guix import cran -r -a bioconductor zinbwave > > This will download TAR archives and automatically compute the hash. It > corresponds to the manual: > > guix download > > https://bioconductor.org/packages/release/bioc/src/contrib/zinbwave_1.6.0.tar.gz > > > [1] https://bioconductor.org/ > [2] https://bioconductor.org/packages/release/bioc/html/zinbwave.html > > > Moreover, the importer provides the definition of the package: > > --8<---------------cut here---------------start------------->8--- > (define-public r-zinbwave > (package > (name "r-zinbwave") > (version "1.6.0") > (source > (origin > (method url-fetch) > (uri (bioconductor-uri "zinbwave" version)) > (sha256 > (base32 > "187r7l9jf2q74qaqx63df5zx6iphmvl817448balvfv9vqyhrp2j")))) > (properties `((upstream-name . "zinbwave"))) > (build-system r-build-system) > (propagated-inputs > `(("r-biocparallel" ,r-biocparallel) > ("r-copula" ,r-copula) > ("r-edger" ,r-edger) > ("r-genefilter" ,r-genefilter) > ("r-glmnet" ,r-glmnet) > ("r-matrix" ,r-matrix) > ("r-singlecellexperiment" > ,r-singlecellexperiment) > ("r-softimpute" ,r-softimpute) > ("r-summarizedexperiment" > ,r-summarizedexperiment))) > (home-page > "https://bioconductor.org/packages/zinbwave") > (synopsis > "Zero-Inflated Negative Binomial Model for RNA-Seq Data") > (description > " Implements a general and flexible zero-inflated negative > binomial model that can be used to provide a low-dimensional > representations of single-cell RNA-seq data. The model accounts for > zero inflation (dropouts), over-dispersion, and the count nature of > the data. The model also accounts for the difference in library sizes > and optionally for batch effects and/or other covariates, avoiding the > need for pre-normalize the data.") > (license artistic2.0))) > --8<---------------cut here---------------end--------------->8--- > > In the propagated input, you can see the package `r-copula` which is > not yet packaged neither. But, the nice option --recursive does the > job for you and it also gives you the package definition. > > Now, let add them to the Guix source. Clone the repo and go in the > folder. The command: > > guix environment guix > > will download the dependencies to build Guix and setup all the > variables correctly. Well, refer to the documentation to compile Guix > from source. Basically: > > ./bootstrap > ./configure --localstatedir=/var > make > > Now, you can run this version with ./pre-inst-env, for example: > > ./pre-inst-env guix describe > > > Well, ready to add one package! For example, add `r-copula` to the > file gnu/package/cran.scm then recompile with make. Check if it is ok: > > ./pre-inst-env guile show r-copula > > Ouch! `r-psline` is missing so let also add it (the definition was > provided by the importer), run make again. Now "./pre-inst-env guix > show r-copula" should work. > Add the package definition of zinbwave to the file > gnu/package/bioconductor.scm. > > Let build them: > > ./pre-inst-env guix build r-zinbwave > > and time to breath. ;-) > > > If something fails, try to investigate by yourself and do not hesitate > to ask advices or help. > If everything is ok, the package still needs some polishing: synopsis, > description, indentation, etc and really important: check the license > field. > > The next step is to commit the changes. In this case, three commits > (one per package) seem nice. Give a look to previous commits as > example of commit message (ChangeLog format, etc.). Now, it is time to > prepare the submission: > > git format-patch --cover-letter - o patches master > > this will create the 3 patches in the folder patches/ and one cover > letter. Edit the cover letter to describe what the patches are about > then submit it to the bug tracker: > > git send-email --to=guix-patches@gnu.org patches/0000-cover-letter.patch > > Wait the answer to the bug tracker. > You should receive an email (if your .gitconfig is ok) with the bug > number. Last submit the patches: > > git send-email --to=ABCDEF@debbugs.gnu.org patches/000{1,2,3}-* > > where ABCDEF is the bug number. > > > > Well, if you need some inspiration to find unpackaged tools from > BioConductor: > > wget https://git.bioconductor.org -qO - | sed -ne > '/packages\/[a-zA-Z]/{s,^.*R.*packages/,,p}' > bioc_manifest > ./pre-inst-env guile --no-auto-compile missing-bioconductor.scm > bioc_manifest > > where the file `missing-bioconductor.scm` is given by: > > --8<---------------cut here---------------start------------->8--- > (use-modules ((guix import utils) #:select (guix-name)) > (gnu packages) > (srfi srfi-1) ;lists > (ice-9 textual-ports)) > > (define (fetch-names manifest) > "Return a list of strings, each corresponding to a name from the > input file MANIFEST." > (call-with-input-file manifest > (lambda (port) > (let loop ((lines '()) > (line (get-line port))) > (if (eof-object? line) > (reverse lines) > (loop (cons line lines) > (get-line port))))))) > > ;;; Start! > > (map (lambda (name) > (when (null? (find-packages-by-name (guix-name "r-" name))) > (begin > (display name) > (newline)))) > (fetch-names (cadr (command-line)))) > > ;; wget https://git.bioconductor.org -qO - | sed -ne > '/packages\/[a-zA-Z]/{s,^.*R.*packages/,,p}' > bioc_manifest > ;; ./pre-inst-env guile --no-auto-compile missing-bioconductor.scm > bioc_manifest > --8<---------------cut here---------------end--------------->8--- > > > Hope that help. > > All the best, > simon > >