Unverified Commit 19d240b6 authored by Sam's avatar Sam
Browse files

swiftPackages.{sourcekit-lsp,swift-format}: link libdispatch.so

In my experience this solution seems to be necessary on almost all if
not all Swift packages on Linux
parent d8754b1b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
  swift,
  swiftpm,
  swiftpm2nix,
  Dispatch,
  Foundation,
  XCTest,
  sqlite,
@@ -40,6 +41,10 @@ stdenv.mkDerivation {
    ncursesInput
  ];

  env.LD_LIBRARY_PATH = lib.optionalString stdenv.hostPlatform.isLinux (
    lib.makeLibraryPath [ Dispatch ]
  );

  configurePhase = generated.configure + ''
    swiftpmMakeMutable indexstore-db
    patch -p1 -d .build/checkouts/indexstore-db -i ${./patches/indexstore-db-macos-target.patch}
+5 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
  swift,
  swiftpm,
  swiftpm2nix,
  Dispatch,
  Foundation,
}:
let
@@ -24,6 +25,10 @@ stdenv.mkDerivation {
  ];
  buildInputs = [ Foundation ];

  env.LD_LIBRARY_PATH = lib.optionalString stdenv.hostPlatform.isLinux (
    lib.makeLibraryPath [ Dispatch ]
  );

  configurePhase = generated.configure;

  # We only install the swift-format binary, so don't need the other products.