Loading pkgs/development/compilers/swift/swiftpm/cmake-glue.nix +10 −0 Original line number Diff line number Diff line Loading @@ -89,4 +89,14 @@ lib.mapAttrs mkInstallScript { add_library(Crypto SHARED IMPORTED) set_property(TARGET Crypto PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libCrypto@sharedLibExt@") ''; SwiftASN1 = '' add_library(SwiftASN1 SHARED IMPORTED) set_property(TARGET SwiftASN1 PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libSwiftASN1@sharedLibExt@") ''; SwiftCertificates = '' add_library(SwiftCertificates SHARED IMPORTED) set_property(TARGET SwiftCertificates PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libCertificates@sharedLibExt@") ''; } pkgs/development/compilers/swift/swiftpm/default.nix +30 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,8 @@ let + lib.optionalString stdenv.hostPlatform.isDarwin '' # On Darwin only, Swift uses arm64 as cpu arch. if [ -e cmake/modules/SwiftSupport.cmake ]; then # At least in swift-asn1, this has been removed and the module uses the full target triple as the name # (https://github.com/apple/swift-asn1/pull/103) substituteInPlace cmake/modules/SwiftSupport.cmake \ --replace '"aarch64" PARENT_SCOPE' '"arm64" PARENT_SCOPE' fi Loading Loading @@ -331,6 +333,32 @@ let ''; }; swift-asn1 = mkBootstrapDerivation { name = "swift-asn1"; src = generated.sources.swift-asn1; postInstall = cmakeGlue.SwiftASN1 + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # SwiftASN1 uses the full target triple as the name of the swiftmodule # (https://github.com/apple/swift-asn1/pull/103) mkdir -p $out/${swiftModuleSubdir} cp swift/*.swift{module,doc} $out/${swiftModuleSubdir}/ ''; }; swift-certificates = mkBootstrapDerivation { name = "swift-certificates"; src = generated.sources.swift-certificates; buildInputs = [ swift-asn1 swift-crypto ]; postInstall = cmakeGlue.SwiftCertificates; }; # Build a bootrapping swiftpm using CMake. swiftpm-bootstrap = mkBootstrapDerivation ( commonAttrs Loading @@ -341,6 +369,8 @@ let llbuild sqlite swift-argument-parser swift-asn1 swift-certificates swift-collections swift-crypto swift-driver Loading Loading
pkgs/development/compilers/swift/swiftpm/cmake-glue.nix +10 −0 Original line number Diff line number Diff line Loading @@ -89,4 +89,14 @@ lib.mapAttrs mkInstallScript { add_library(Crypto SHARED IMPORTED) set_property(TARGET Crypto PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libCrypto@sharedLibExt@") ''; SwiftASN1 = '' add_library(SwiftASN1 SHARED IMPORTED) set_property(TARGET SwiftASN1 PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libSwiftASN1@sharedLibExt@") ''; SwiftCertificates = '' add_library(SwiftCertificates SHARED IMPORTED) set_property(TARGET SwiftCertificates PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libCertificates@sharedLibExt@") ''; }
pkgs/development/compilers/swift/swiftpm/default.nix +30 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,8 @@ let + lib.optionalString stdenv.hostPlatform.isDarwin '' # On Darwin only, Swift uses arm64 as cpu arch. if [ -e cmake/modules/SwiftSupport.cmake ]; then # At least in swift-asn1, this has been removed and the module uses the full target triple as the name # (https://github.com/apple/swift-asn1/pull/103) substituteInPlace cmake/modules/SwiftSupport.cmake \ --replace '"aarch64" PARENT_SCOPE' '"arm64" PARENT_SCOPE' fi Loading Loading @@ -331,6 +333,32 @@ let ''; }; swift-asn1 = mkBootstrapDerivation { name = "swift-asn1"; src = generated.sources.swift-asn1; postInstall = cmakeGlue.SwiftASN1 + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # SwiftASN1 uses the full target triple as the name of the swiftmodule # (https://github.com/apple/swift-asn1/pull/103) mkdir -p $out/${swiftModuleSubdir} cp swift/*.swift{module,doc} $out/${swiftModuleSubdir}/ ''; }; swift-certificates = mkBootstrapDerivation { name = "swift-certificates"; src = generated.sources.swift-certificates; buildInputs = [ swift-asn1 swift-crypto ]; postInstall = cmakeGlue.SwiftCertificates; }; # Build a bootrapping swiftpm using CMake. swiftpm-bootstrap = mkBootstrapDerivation ( commonAttrs Loading @@ -341,6 +369,8 @@ let llbuild sqlite swift-argument-parser swift-asn1 swift-certificates swift-collections swift-crypto swift-driver Loading