Created
May 15, 2018 06:19
-
-
Save otwieracz/a1c6f6bc0d6e8069a5773e25f08a6ed3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
let | |
rEnv = pkgs.rWrapper.override { | |
packages = with pkgs.rPackages; [ | |
MASS | |
]; | |
}; | |
envpath = "/home/otwieracz/env/work-env"; | |
startpath = "/home/otwieracz/work/end/git"; | |
fhs = pkgs.buildFHSUserEnv { | |
name = "work-env"; | |
targetPkgs = pkgs: with pkgs; | |
[ base | |
lisp | |
dev | |
latex | |
virt | |
gnupg | |
curl | |
openssl_1_0_2 | |
#openssl | |
gnumake | |
utillinux | |
zip | |
ruby_2_2 | |
pinentry | |
autoconf | |
automake | |
libffi | |
gecode_3_7_3 | |
openssh | |
nmap | |
postgresql | |
rsync | |
man | |
R | |
nodejs | |
#nodePackages.npm | |
octave | |
which | |
]; | |
runScript = "bash --login"; | |
profile = '' | |
export SHELL=/bin/bash | |
export PATH=/bin:${envpath}/ruby/gems/bin/:$PATH | |
export GEM_HOME=${envpath}/ruby/gems | |
export R_LIBS_USER=${envpath}/R/libs | |
export C_INCLUDE_PATH=/usr/include | |
export CPLUS_INCLUDE_PATH=/usr/include | |
export LD_LIBRARY_PATH=/usr/lib:/usr/lib/R/lib | |
export LIBRARY_PATH=/usr/lib:/usr/lib/R/lib | |
export ASPELL_CONF="dict-dir /lib/aspell" | |
''; | |
extraBindMounts = [ | |
"/dev=/dev" | |
"/tmp=/tmp" | |
"/srv=/srv" | |
]; | |
}; | |
in pkgs.stdenv.mkDerivation { | |
name = "work-env-shell"; | |
nativeBuildInputs = [ fhs ]; | |
shellHook = '' | |
cd ${startpath} | |
''; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment