sbt: support build scala-native targets

This commit is contained in:
Volth 2017-06-16 15:47:38 +00:00
parent 517d65ec9b
commit b1928704d4
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,14 @@
{ lib, sbt, makeWrapper, boehmgc, libunwind, re2, llvmPackages, zlib }:
sbt.overrideDerivation(old: {
nativeBuildInputs = [ makeWrapper ];
postFixup = ''
wrapProgram $out/bin/sbt \
--set CLANG_PATH "${llvmPackages.clang}/bin/clang" \
--set CLANGPP_PATH "${llvmPackages.clang}/bin/clang" \
--set CPATH "${lib.makeSearchPathOutput "dev" "include" [ re2 zlib boehmgc libunwind llvmPackages.libcxxabi llvmPackages.libcxx ]}/c++/v1" \
--set LIBRARY_PATH "${lib.makeLibraryPath [ re2 zlib boehmgc libunwind llvmPackages.libcxxabi llvmPackages.libcxx ]}" \
--set NIX_CFLAGS_LINK "-lc++abi -lc++"
'';
})

View File

@ -7062,6 +7062,7 @@ with pkgs;
scons = callPackage ../development/tools/build-managers/scons { };
sbt = callPackage ../development/tools/build-managers/sbt { };
sbt-with-scala-native = callPackage ../development/tools/build-managers/sbt/scala-native.nix { };
simpleBuildTool = sbt;
shards = callPackage ../development/tools/build-managers/shards { };