0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 14:10:33 +03:00
nixpkgs/pkgs/development/compilers/swift/libdispatch/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.1 KiB
Nix
Raw Normal View History

2022-07-25 20:36:50 +02:00
{ lib
, stdenv
, callPackage
2022-07-25 20:36:50 +02:00
, cmake
, ninja
, useSwift ? true, swift
}:
let
sources = callPackage ../sources.nix { };
in stdenv.mkDerivation {
2022-07-25 20:36:50 +02:00
pname = "swift-corelibs-libdispatch";
inherit (sources) version;
src = sources.swift-corelibs-libdispatch;
2022-07-25 20:36:50 +02:00
outputs = [ "out" "dev" "man" ];
nativeBuildInputs = [ cmake ]
++ lib.optionals useSwift [ ninja swift ];
patches = [ ./disable-swift-overlay.patch ];
cmakeFlags = lib.optional useSwift "-DENABLE_SWIFT=ON";
postInstall = ''
# Provide a CMake module. This is primarily used to glue together parts of
# the Swift toolchain. Modifying the CMake config to do this for us is
# otherwise more trouble.
mkdir -p $dev/lib/cmake/dispatch
export dylibExt="${stdenv.hostPlatform.extensions.sharedLibrary}"
substituteAll ${./glue.cmake} $dev/lib/cmake/dispatch/dispatchConfig.cmake
'';
meta = {
description = "Grand Central Dispatch";
homepage = "https://github.com/apple/swift-corelibs-libdispatch";
platforms = lib.platforms.linux;
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ cmm dtzWill trepetti dduan trundle stephank ];
};
}