Loading pkgs/development/compilers/swift/swiftpm/cmake-glue.nix +5 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,11 @@ lib.mapAttrs mkInstallScript { SwiftCrypto = '' add_library(Crypto SHARED IMPORTED) set_property(TARGET Crypto PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libCrypto@sharedLibExt@") add_library(_CryptoExtras SHARED IMPORTED) # this can't possibly be right... I really think it should be `libCryptoExtras` # swift-certificates did build with this though..... set_property(TARGET _CryptoExtras PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libCrypto@sharedLibExt@") ''; SwiftASN1 = '' Loading pkgs/development/compilers/swift/swiftpm/default.nix +19 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,11 @@ let inherit (swift) swiftOs swiftModuleSubdir swiftStaticModuleSubdir; inherit (swift) swiftOs swiftModuleSubdir swiftStaticModuleSubdir ; sharedLibraryExt = stdenv.hostPlatform.extensions.sharedLibrary; sources = callPackage ../sources.nix { }; Loading Loading @@ -322,6 +326,14 @@ let fetchSubmodules = true; }; buildInputs = [ swift-asn1 ]; patches = [ ./patches/install-crypto-extras.patch ]; postPatch = '' # Fix use of hardcoded tool paths on Darwin. substituteInPlace CMakeLists.txt \ Loading @@ -336,6 +348,12 @@ let # Headers are not installed. cp -r ../Sources/CCryptoBoringSSL/include $out/include # Swift modules are put in the wrong place by default (and not all are linked) mkdir -p $out/${swiftModuleSubdir} rm -rf $out/${swiftModuleSubdir}/*.swift{module,doc} # I assume we don't care about .swiftsourceinfo cp swift/*.swift{module,doc} $out/${swiftModuleSubdir}/ ''; }; Loading pkgs/development/compilers/swift/swiftpm/patches/install-crypto-extras.patch 0 → 100644 +10 −0 Original line number Diff line number Diff line Install _CryptoExtras target when building with CMake --- a/Sources/_CryptoExtras/CMakeLists.txt +++ b/Sources/_CryptoExtras/CMakeLists.txt @@ -42,4 +42,5 @@ target_link_options(_CryptoExtras PRIVATE set_target_properties(_CryptoExtras PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) +_install_target(_CryptoExtras) set_property(GLOBAL APPEND PROPERTY SWIFT_CRYPTO_EXPORTS _CryptoExtras) Loading
pkgs/development/compilers/swift/swiftpm/cmake-glue.nix +5 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,11 @@ lib.mapAttrs mkInstallScript { SwiftCrypto = '' add_library(Crypto SHARED IMPORTED) set_property(TARGET Crypto PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libCrypto@sharedLibExt@") add_library(_CryptoExtras SHARED IMPORTED) # this can't possibly be right... I really think it should be `libCryptoExtras` # swift-certificates did build with this though..... set_property(TARGET _CryptoExtras PROPERTY IMPORTED_LOCATION "@out@/lib/swift/@swiftOs@/libCrypto@sharedLibExt@") ''; SwiftASN1 = '' Loading
pkgs/development/compilers/swift/swiftpm/default.nix +19 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,11 @@ let inherit (swift) swiftOs swiftModuleSubdir swiftStaticModuleSubdir; inherit (swift) swiftOs swiftModuleSubdir swiftStaticModuleSubdir ; sharedLibraryExt = stdenv.hostPlatform.extensions.sharedLibrary; sources = callPackage ../sources.nix { }; Loading Loading @@ -322,6 +326,14 @@ let fetchSubmodules = true; }; buildInputs = [ swift-asn1 ]; patches = [ ./patches/install-crypto-extras.patch ]; postPatch = '' # Fix use of hardcoded tool paths on Darwin. substituteInPlace CMakeLists.txt \ Loading @@ -336,6 +348,12 @@ let # Headers are not installed. cp -r ../Sources/CCryptoBoringSSL/include $out/include # Swift modules are put in the wrong place by default (and not all are linked) mkdir -p $out/${swiftModuleSubdir} rm -rf $out/${swiftModuleSubdir}/*.swift{module,doc} # I assume we don't care about .swiftsourceinfo cp swift/*.swift{module,doc} $out/${swiftModuleSubdir}/ ''; }; Loading
pkgs/development/compilers/swift/swiftpm/patches/install-crypto-extras.patch 0 → 100644 +10 −0 Original line number Diff line number Diff line Install _CryptoExtras target when building with CMake --- a/Sources/_CryptoExtras/CMakeLists.txt +++ b/Sources/_CryptoExtras/CMakeLists.txt @@ -42,4 +42,5 @@ target_link_options(_CryptoExtras PRIVATE set_target_properties(_CryptoExtras PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) +_install_target(_CryptoExtras) set_property(GLOBAL APPEND PROPERTY SWIFT_CRYPTO_EXPORTS _CryptoExtras)