From 43f8536aee86d52e52cfa4cfc6d2e00e2ca4b04c Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 31 Mar 2017 22:28:56 -0400 Subject: Include an example of a snakemake-shell-file-name script --- guix-snakemake-environment | 11 +++++++++++ snakemake.el | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 guix-snakemake-environment diff --git a/guix-snakemake-environment b/guix-snakemake-environment new file mode 100755 index 0000000..18f6c85 --- /dev/null +++ b/guix-snakemake-environment @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +### Set up a pure environment for snakemake.el commands +### +### If `snakemake-shell-file-name' is points to this file, +### `snakemake-term-start` will start a terminal with an environment +### that exposes snakemake and the dependencies defined in "guix.scm", +### which should be located in the same directory as the current +### Snakefile. + +guix environment --pure -l guix.scm --ad-hoc snakemake diff --git a/snakemake.el b/snakemake.el index ac2db17..278afcd 100644 --- a/snakemake.el +++ b/snakemake.el @@ -595,7 +595,10 @@ that starts a shell with the desired environment. For example, to set up an enviroment with Guix, `snakemake-shell-file-name' could point to a script that runs - guix environment -l guix.scm --ad-hoc snakemake --pure" + guix environment -l guix.scm --ad-hoc snakemake --pure + +The file 'guix-snakemake-environment' in Snakemake mode's source +directory can be used for this purpose." (interactive) (let ((default-directory (snakemake-snakefile-directory))) (unless (snakemake-term-process) -- cgit v1.2.3