setup-for-nix.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 mydir=$(dirname $(dirname $(readlink -f $BASH_SOURCE)))
4 
5 source $HOME/.nix-profile/etc/profile.d/nix.sh
6 
7 for maybe in "$mydir/install-nix"
8 do
9  if [ -d "$maybe" ] ; then
10  echo "Located likely wire-cell toolkit installation: $maybe"
11  export LD_LIBRARY_PATH=$maybe/lib
12  PATH=$maybe/bin:$PATH
13  break
14  fi
15 done
16 
17 echo "Starting subshell with Nix Python packages enabled, exit when done."
18 nix-shell -p python27Packages.matplotlib \
19  -p python27Packages.virtualenv \
20  -p python27Packages.jsonnet \
21  -p python27Packages.click
22 echo "Exiting Nix Python enabled subshell"
23