;; To use this file to build HEAD of gemma: ;; ;; guix build -f guix.scm # default builds pangemma-git ;; guix build -L . gemma-git # builds original (still) ;; ;; To get a development container (e.g., run in emacs shell). ;; ;; guix shell -C -D -F -v 3 -L . pangemma-shell-git # pangemma-shell-git ;; ;; see premake5.lua header for examples. ;; ;; guix shell -C -D -F -v 3 -L . gemma-git # for specific packages ;; (define-module (guix) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (gnu packages algebra) #:use-module (gnu packages base) #:use-module (gnu packages build-tools) #:use-module (gnu packages compression) #:use-module (gnu packages commencement) #:use-module (gnu packages check) #:use-module (gnu packages databases) #:use-module (gnu packages gdb) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) #:use-module (gnu packages maths) #:use-module (gnu packages ninja) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages ruby) #:use-module (srfi srfi-1) #:use-module (ice-9 popen) #:use-module (ice-9 rdelim)) (define %source-dir (dirname (current-filename))) (define %git-commit (read-string (open-pipe "git describe --always --tags --long|tr -d $'\n'" OPEN_READ))) (define %pangemma-version (read-string (open-pipe "cat VERSION|tr -d $'\n'" OPEN_READ))) (define-public pangemma-base-git "Pangemma base build package" (package (name "pangemma-git") (version (git-version %pangemma-version "HEAD" %git-commit)) (source (local-file %source-dir #:recursive? #t)) (build-system gnu-build-system) (inputs (list gsl openblas guile-3.0 `(,guile-3.0 "debug") guile-lmdb lmdb ninja ruby zlib)) (propagated-inputs (list `("guile" ,guile-3.0-latest) `("guile-debug" ,guile-3.0-latest "debug"))) ;; ("gsl-static" ,gsl-static) ;; ("zlib:static" ,zlib "static") (arguments `(#:phases (modify-phases %standard-phases (delete 'configure) (delete 'validate-runpath) (add-before 'build 'bin-mkdir (lambda _ (mkdir-p "bin") )) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (install-file "bin/gemma" (string-append out "/bin")))))) #:tests? #t #:parallel-tests? #f)) (home-page "https://git.genenetwork.org/pangemma/") (synopsis "Tool for genome-wide efficient mixed model association") (description "New version of Genome-wide Efficient Mixed Model Association (PANGEMMA) provides a standard linear mixed model resolver with application in genome-wide association studies (GWAS).") (license license:gpl3))) (define-public pangemma-shell-git "Shell version for development" (package (inherit pangemma-base-git) (name "pangemma-shell-git") (build-system gnu-build-system) (propagated-inputs (modify-inputs (package-inputs pangemma-base-git) (append which binutils coreutils gcc-toolchain premake5 gnu-make ;; for the shell ))) (arguments `(#:phases (modify-phases %standard-phases (delete 'configure) (delete 'build) (delete 'package) (delete 'check) (delete 'install)))) (description "Pangemma shell for development") )) ;; ---- legacy build ----------------------------------------------------------------- (define-public gemma-git "Original legacy gemma -- for as long as it compiles" (package (name "gemma-git") (version (git-version %pangemma-version "HEAD" %git-commit)) (source (local-file %source-dir #:recursive? #t)) (build-system gnu-build-system) (inputs (list catch2 gdb gsl openblas zlib)) ;; ("gsl-static" ,gsl-static) ;; ("zlib:static" ,zlib "static") (native-inputs ; for running tests (list perl which)) (arguments `(#:phases (modify-phases %standard-phases (delete 'configure) (delete 'validate-runpath) (add-before 'build 'bin-mkdir (lambda _ (mkdir-p "bin") )) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (install-file "bin/gemma" (string-append out "/bin")))))) #:tests? #t #:parallel-tests? #f)) (home-page "https://github.com/genetics-statistics") (synopsis "Tool for genome-wide efficient mixed model association") (description "Genome-wide Efficient Mixed Model Association (GEMMA) provides a standard linear mixed model resolver with application in genome-wide association studies (GWAS).") (license license:gpl3))) gemma-git