From 18082c3bdd42edfb6afc97f96a80744874c27986 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Wed, 2 Dec 2020 00:03:09 +0300 Subject: gn: python3-genenetwork2: Generate static dependencies file * gn/packages/genenetwork.scm (python3-genenetwork2): [arguments]{generate-dependency-file}: Add new phase after "install" that generates a "DEPENDENCY.md" file which will be displayed in the gn2 web interface. --- gn/packages/genenetwork.scm | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'gn/packages') diff --git a/gn/packages/genenetwork.scm b/gn/packages/genenetwork.scm index 1e15cbb..24e3732 100644 --- a/gn/packages/genenetwork.scm +++ b/gn/packages/genenetwork.scm @@ -495,9 +495,38 @@ Graphical Fragment Assembly} files and related formats.") (("grep") (which "grep")) (("rm") (which "rm")) (("which") (which "which"))) - #t)))) - )) - )))) + #t)) + (add-after 'install 'generate-dependency-file + (lambda* (#:key inputs outputs #:allow-other-keys) + (call-with-output-file + (string-append + (assoc-ref outputs "out") + "/lib/python3.8/site-packages" + "/wqflask/DEPENDENCIES.md") + (lambda (port) + (format + port " +#### System Inputs (generated from ~a package ~a) +|Name | Description | +|-----|-------------| +~a +" + ,(package-name this-package) + ,(package-version this-package) + ,(apply + string-append + (map + (lambda (input) + (let* ((pkg (cadr input)) + (name (package-name pkg)) + (version (package-version pkg)) + (home-page (package-home-page pkg)) + (description (package-synopsis pkg))) + (string-append + "| **[" name "](" home-page ")** v" + version"| " + description " |\n"))) + (package-propagated-inputs this-package)))))))))))))))) ;; ./pre-inst-env guix download http://files.genenetwork.org/raw_database/db_webqtl_s.zip ;; 0sscjh0wml2lx0mb43vf4chg9gpbfi7abpjxb34n3kyny9ll557x -- cgit v1.2.3