Skip to content

Commit

Permalink
Extracting the SBT config options to a common variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
krisajenkins committed Jun 12, 2018
1 parent 97898c3 commit f1ec282
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions jobsets/mantis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ stdenv.mkDerivation {

configurePhase = ''
export HOME="$NIX_BUILD_TOP"
export "_JAVA_OPTIONS=-Dsbt.global.base=.sbt/1.0 -Dsbt.ivy.home=.ivy"
cp -r ${sbtVerify}/.ivy .
cp -r ${sbtVerify}/.sbt .
cp -r ${sbtVerify}/target .
Expand All @@ -18,7 +20,7 @@ stdenv.mkDerivation {
# Get sbt to pre-fetch its dependencies. The cleanest way I've
# found of doing this is to get it to list the available projects,
# which it can only do once deps are downloaded.
sbt -Dsbt.global.base=.sbt/1.0 -Dsbt.ivy.home=.ivy projects
sbt projects
# We have to patch the executable embedded inside protoc-jar for
# the one nix provides. :-(
Expand All @@ -28,7 +30,7 @@ stdenv.mkDerivation {
'';

buildPhase = ''
sbt -Dsbt.global.base=.sbt/1.0 -Dsbt.ivy.home=.ivy 'set test in Test := {}' dist
sbt 'set test in Test := {}' dist
'';

installPhase = ''
Expand Down
3 changes: 2 additions & 1 deletion jobsets/sbt-verify.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ stdenv.mkDerivation {

configurePhase = ''
export HOME="$NIX_BUILD_TOP"
export "_JAVA_OPTIONS=-Dsbt.global.base=.sbt/1.0 -Dsbt.ivy.home=.ivy"
'';

buildPhase = "
sbt -Dsbt.global.base=.sbt/1.0 -Dsbt.ivy.home=.ivy publishLocal
sbt publishLocal
";

installPhase = ''
Expand Down

0 comments on commit f1ec282

Please sign in to comment.