mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-12 09:44:13 +00:00
Add --pure to nix-shell calls
This commit is contained in:
parent
0fb9cabcfc
commit
a7f8252d50
@ -39,7 +39,7 @@ pipeline {
|
||||
steps {
|
||||
sh """
|
||||
nix build -v --no-link &&
|
||||
nix-shell --run echo
|
||||
nix-shell --pure --run echo
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ pipeline {
|
||||
sh """
|
||||
. ~/.nix-profile/etc/profile.d/nix.sh && \
|
||||
nix build -v --no-link && \
|
||||
nix-shell --run echo
|
||||
nix-shell --pure --run echo
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ RUN export USER=jenkins \
|
||||
&& /tmp/nix-install.sh \
|
||||
&& . ~/.nix-profile/etc/profile.d/nix.sh \
|
||||
&& nix-build --no-out-link https://github.com/status-im/status-react/tarball/${GIT_COMMIT} \
|
||||
&& nix-shell --run 'echo' https://github.com/status-im/status-react/tarball/${GIT_COMMIT}
|
||||
&& nix-shell --pure --run 'echo' https://github.com/status-im/status-react/tarball/${GIT_COMMIT}
|
||||
|
||||
# hack to avoid calling login
|
||||
ENV USER=jenkins
|
||||
|
@ -16,12 +16,15 @@ def getToolVersion(name) {
|
||||
}
|
||||
|
||||
def nix_sh(cmd) {
|
||||
def isPure = env.TARGET_PLATFORM == 'linux'
|
||||
def pureFlag = isPure ? '--pure' : ''
|
||||
|
||||
sh """
|
||||
set +x
|
||||
. ~/.nix-profile/etc/profile.d/nix.sh
|
||||
set -x
|
||||
nix-shell --argstr target-os \'${env.TARGET_PLATFORM}\' \\
|
||||
--run \'${cmd}\' \\
|
||||
${pureFlag} --run \'${cmd}\' \\
|
||||
\'${env.WORKSPACE}/shell.nix\'
|
||||
"""
|
||||
}
|
||||
|
@ -22,10 +22,12 @@ if ! command -v "nix" >/dev/null 2>&1; then
|
||||
fi
|
||||
|
||||
if command -v "nix" >/dev/null 2>&1; then
|
||||
echo -e "${GREEN}Configuring Nix shell for target '${TARGET_OS:=all}'...${NC}";
|
||||
echo -e "${GREEN}Configuring Nix shell for target '${TARGET_OS:=all}'...${NC}"
|
||||
if [[ $@ == "ENTER_NIX_SHELL" ]]; then
|
||||
exec nix-shell --show-trace --argstr target-os ${TARGET_OS}
|
||||
else
|
||||
exec nix-shell --show-trace --argstr target-os ${TARGET_OS} --run "$@"
|
||||
is_pure=''
|
||||
[ "${TARGET_OS}" == 'linux' ] && is_pure='--pure'
|
||||
exec nix-shell ${is_pure} --show-trace --argstr target-os ${TARGET_OS} --run "$@"
|
||||
fi
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user