1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00
nixpkgs/pkgs/os-specific/darwin
Daiderd Jordan 3987ea9a9d
mpv: add flag for swift on darwin
While we currently don't have a pure swift build on macOS it's possible
to build mpv using the swift compiler from CLT. eg.

    self: super:
    let
      CommandLineTools = "/Library/Developer/CommandLineTools";
    in
    {
      swift = super.stdenv.mkDerivation {
        name = "swift-CommandLineTools-0.0.0";
        phases = [ "installPhase" "fixupPhase" ];

        propagatedBuildInputs = [ self.darwin.DarwinTools ];

        installPhase = ''
            mkdir -p $out/bin $out/lib
            ln -s ${CommandLineTools}/usr/bin/swift $out/bin
            ln -s ${CommandLineTools}/usr/lib/swift $out/lib
            ln -s ${CommandLineTools}/SDKs $out
        '';

        setupHook = builtins.toFile "hook" ''
            addCommandLineTools() {
                echo >&2
                echo "WARNING: this is impure and unreliable, make sure the CommandLineTools are installed!" >&2
                echo "  $ xcode-select --install" >&2
                echo >&2
                [ -d ${CommandLineTools} ]
                export NIX_LDFLAGS+=" -L@out@/lib/swift/macosx"
                export SWIFT=swift
                export SWIFT_LIB_DYNAMIC=@out@/lib/swift/macosx
                export MACOS_SDK_VERSION=$(sw_vers -productVersion | awk -F. '{print $1 "." $2}')
                export MACOS_SDK=@out@/SDKs/MacOSX$MACOS_SDK_VERSION.sdk
            }

            prePhases+=" addCommandLineTools"
        '';

        __impureHostDeps = [ CommandLineTools ];
      };

      mpv = super.mpv.override { swiftSupport = true; };
    }
2020-02-06 14:15:35 +01:00
..
apple-sdk mpv: add flag for swift on darwin 2020-02-06 14:15:35 +01:00
apple-source-releases graalvm8: 19.1.1 -> 19.2.1 2020-01-18 16:43:03 +01:00
binutils cctools, darwin biutils: Use pname and version 2019-11-24 18:36:40 +00:00
cctools cctools: fixup gnu-config detection 2020-01-03 15:20:55 -05:00
chunkwm treewide: name -> pname (easy cases) (#66585) 2019-08-15 13:41:18 +01:00
CoreSymbolication CoreSymbolication: init 2018-04-09 18:35:35 -05:00
darling Revert "Revert "darwin 10.12 commits"" 2019-04-20 23:17:04 -04:00
DarwinTools
duti treewide: name -> pname (easy cases) (#66585) 2019-08-15 13:41:18 +01:00
ghc-standalone-archive haskell infra: Fix cross as much as possible without changing hashes 2018-01-02 21:00:13 -05:00
goku treewide: name -> pname (easy cases) (#66585) 2019-08-15 13:41:18 +01:00
insert_dylib darwin: fix more *_cmds derivation 2019-01-06 22:34:19 -06:00
iproute2mac darwin.iproute2mac: explicitly use python2 2020-01-13 11:41:23 +01:00
khd treewide: name -> pname (easy cases) (#66585) 2019-08-15 13:41:18 +01:00
kwm treewide: name -> pname (easy cases) (#66585) 2019-08-15 13:41:18 +01:00
libtapi darwin.libtapi: python2 -> python3 2020-01-13 11:41:23 +01:00
lsusb treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
m-cli treewide: name -> pname (easy cases) (#66585) 2019-08-15 13:41:18 +01:00
maloader darwin.maloader: mark as broken 2018-09-08 20:08:34 +02:00
native-x11-and-opengl treewide: remove platform assertions 2018-05-03 13:09:20 -05:00
noah noah: init at 0.5.1 2019-06-12 21:30:00 -05:00
opencflite treewide: name -> pname (easy cases) (#66585) 2019-08-15 13:41:18 +01:00
osxfuse treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
osxsnarf osxsnarf: init at 0.1.0 2019-10-30 08:57:59 -07:00
qes treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
reattach-to-user-namespace reattach-to-user-namespace: 2.7 -> 2.8 2020-01-08 13:50:08 +03:00
skhd treewide: name -> pname (easy cases) (#66585) 2019-08-15 13:41:18 +01:00
smimesign treewide: name -> pname (easy cases) (#66585) 2019-08-15 13:41:18 +01:00
stubs treewide: use runtimeShell instead of stdenv.shell whenever possible 2019-02-26 14:10:49 +00:00
swift-corelibs darwin.CF: python2 -> python3 2020-01-13 11:13:06 +01:00
trash treewide: name -> pname (easy cases) (#66585) 2019-08-15 13:41:18 +01:00
usr-include
wifi-password wifi-password: init at 0.1.0 (#68373) 2019-09-10 00:40:05 +02:00
xcode lib/systems: use newer ios sdk 2020-01-03 15:20:54 -05:00