forked from bernardoct/WaterPaths
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSingTemplate
36 lines (26 loc) · 998 Bytes
/
SingTemplate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Bootstrap: shub
From: federatedcloud/NixTemplates:nix_alpine_base_e51467b4ad06617b8b104f6c9066df915fb4dfbd
# For development:
# Bootstrap: localimage
# From: Base/nix_alpine_base_bc4bd803c3aaa8622b493bcf66190c3944706ec3_testing.img
%environment
export TRIGGER=1
export PATH="${PATH}:/usr/local/bin"
%setup
%files
Utils/persist-env.sh $ENVSDIR/
ContainerFiles/config.nix /template/hometmp/.config/nixpkgs/
ContainerFiles/dev-env.nix $ENVSDIR/
ContainerFiles/entrypoint* $ENVSDIR/
ContainerFiles/default.sh $ENVSDIR/
%runscript
# Run the base nix runscript to initialize nix
source /.singularity.d/runscript-nixbase
# We need to overwrite the file from base
cp -R /template/hometmp/.config/nixpkgs/* $HOME/.config/nixpkgs/
$nixenv && cd /tmp && sh $ENVSDIR/persist-env.sh $ENVSDIR/dev-env.nix
# TODO: May need this later
# cp default-mca-params.conf ${HOME}/.openmpi/mca-params.conf
#TODO: check if "$@", if not, run default.sh
# exec /bin/sh "$@"
exec /bin/sh "/nixenv/nixuser/default.sh"