diff options
Diffstat (limited to 'pkgs/development/compilers/swift/swiftpm/setup-hook.sh')
-rw-r--r-- | pkgs/development/compilers/swift/swiftpm/setup-hook.sh | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/pkgs/development/compilers/swift/swiftpm/setup-hook.sh b/pkgs/development/compilers/swift/swiftpm/setup-hook.sh deleted file mode 100644 index 160fbb1ccca3..000000000000 --- a/pkgs/development/compilers/swift/swiftpm/setup-hook.sh +++ /dev/null @@ -1,60 +0,0 @@ -# Build using 'swift-build'. -swiftpmBuildPhase() { - runHook preBuild - - local buildCores=1 - if [ "${enableParallelBuilding-1}" ]; then - buildCores="$NIX_BUILD_CORES" - fi - - local flagsArray=( - -j $buildCores - -c "${swiftpmBuildConfig-release}" - $swiftpmFlags "${swiftpmFlagsArray[@]}" - ) - - echoCmd 'build flags' "${flagsArray[@]}" - TERM=dumb swift-build "${flagsArray[@]}" - - runHook postBuild -} - -if [ -z "${dontUseSwiftpmBuild-}" ] && [ -z "${buildPhase-}" ]; then - buildPhase=swiftpmBuildPhase -fi - -# Check using 'swift-test'. -swiftpmCheckPhase() { - runHook preCheck - - local buildCores=1 - if [ "${enableParallelBuilding-1}" ]; then - buildCores="$NIX_BUILD_CORES" - fi - - local flagsArray=( - -j $buildCores - -c "${swiftpmBuildConfig-release}" - $swiftpmFlags "${swiftpmFlagsArray[@]}" - ) - - echoCmd 'check flags' "${flagsArray[@]}" - TERM=dumb swift-test "${flagsArray[@]}" - - runHook postCheck -} - -if [ -z "${dontUseSwiftpmCheck-}" ] && [ -z "${checkPhase-}" ]; then - checkPhase=swiftpmCheckPhase -fi - -# Helper used to find the binary output path. -# Useful for performing the installPhase of swiftpm packages. -swiftpmBinPath() { - local flagsArray=( - -c "${swiftpmBuildConfig-release}" - $swiftpmFlags "${swiftpmFlagsArray[@]}" - ) - - swift-build --show-bin-path "${flagsArray[@]}" -} |