nightkr / Sbtix

Generates Nix definitions for your SBT builds

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sbtix commands are unuseable within nix-shell

cessationoftime opened this issue · comments

If nix-shell is used to load the sbtix build environment then sbtix commands are not useable.

Running nix-shell sets the SBT_OPTS environment variable, which interferes with the sbtix commands. Simply unsetting the SBT_OPTS environment fixes it. The sbtix script should ignore the SBT_OPTS settings without modifying the environment variable.

SBT_OPTS = ''
 -Dsbt.ivy.home=./.ivy2/
 -Dsbt.boot.directory=./.sbt/boot/
 -Dsbt.global.base=./.sbt
 -Dsbt.global.staging=./.staging
 -Dsbt.override.build.repos=true
 -Dsbt.repository.config=${sbtixRepos}
'';

one solution is to make this line in the sbtix script look like:

${sbt}/bin/sbt -Dsbt.global.base=$SBTIX_GLBASE_DIR -Dsbt.override.build.repos=false -Dsbt.repository.config -Dsbt.boot.directory -Dsbt.ivy.home -Dsbt.global.staging "$@"

Hopefully it should work now.

It works now.