Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 7789299ff9a0
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 230ab62e1053
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Feb 6, 2020

  1. 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; };
        }
    LnL7 committed Feb 6, 2020
    Copy the full SHA
    3987ea9 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2020

  1. mpv: call with frameworks

    Referencing darwin.* directly makes overriding dependencies very
    awkward.
    LnL7 committed Feb 7, 2020
    Copy the full SHA
    408f369 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2020

  1. Merge pull request #79344 from LnL7/darwin-mpv-swift

    mpv: add flag for swift on darwin
    LnL7 committed Feb 19, 2020
    Copy the full SHA
    230ab62 View commit details
    Browse the repository at this point in the history