nixpkgs/pkgs/applications
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
..
accessibility dasher: init at 2018-04-03 2020-01-23 19:31:05 +01:00
audio Merge pull request #78829 from r-ryantm/auto-update/SunVox 2020-02-01 17:50:43 -08:00
backup
blockchains go-ethereum: 1.9.9 -> 1.9.10 2020-01-30 17:49:04 +08:00
display-managers treewide: NIX_*_FLAGS -> string 2019-12-31 00:15:46 +01:00
editors kdev-python: 5.4.6 -> 5.5.0 2020-02-03 11:03:56 -08:00
gis treewide: NIX_*_FLAGS -> string 2019-12-31 00:15:46 +01:00
graphics Revert "Revert "Merge master into staging-next"" 2020-02-05 19:41:25 +01:00
kde
misc hugo: 0.63.2 -> 0.64.0 2020-02-04 01:49:01 -08:00
networking tilt: 0.10.13 -> 0.11.3 2020-02-06 10:46:01 +01:00
office Merge pull request #78155 from dtzWill/update/zanshin-0.5.71 2020-02-03 17:38:20 -06:00
qubes/qubes-core-vchan-xen
radio fldigi: update fltk dependency to 1.4 2020-02-02 21:10:42 +01:00
science Revert "Revert "Merge master into staging-next"" 2020-02-05 19:41:25 +01:00
search
system/monitor
version-management gitRepo: Rewrite the "urllib.request.urlopen" patch for Python 3 2020-02-05 21:34:49 +01:00
video mpv: add flag for swift on darwin 2020-02-06 14:15:35 +01:00
virtualization crun: 0.11 -> 0.12 2020-02-04 08:19:12 +10:00
window-managers i3status-rust: 0.12.0 -> 0.13.0 2020-02-03 07:05:24 +01:00