Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpv: build and install macOS App Bundle #43612

Merged
merged 1 commit into from Aug 5, 2018
Merged

Conversation

Enzime
Copy link
Member

@Enzime Enzime commented Jul 16, 2018

Things done
  • Tested without using sandboxing on macOS
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

mkdir -p $out/Applications
cp -r build/mpv.app $out/Applications
wrapProgram $out/Applications/mpv.app/Contents/MacOS/mpv \
--add-flags "--scripts=${concatStringsSep "," scripts}" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to refactor this to avoid duplication. In these cases it may make sense to just do:

mkdir -p $out/Applications
cp -r build/mpv.app $out/Applications 
rm $out/Applications/mpv.app/Contents/MacOS/mpv
ln -s $out/bin/mpv $out/Applications/mpv.app/Contents/MacOS/mpv

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this and mpv.app just quits whenever I try to open it, I don't know too much about macOS so I didn't manage to find any error messages related to this. The only method I know of was checking Console.app, but that doesn't show anything related.

At the very least I could move all the wrapProgram flags into a variable to avoid duplication that way.

@grahamc
Copy link
Member

grahamc commented Jul 17, 2018

@GrahamcOfBorg build mpv

edit: lol

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: enzime

Partial log (click to expand)

Cannot nix-instantiate `enzime' because:
error: attribute 'enzime' in selection path 'enzime' not found

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: enzime

Partial log (click to expand)

Cannot nix-instantiate `enzime' because:
error: attribute 'enzime' in selection path 'enzime' not found

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: enzime

Partial log (click to expand)

Cannot nix-instantiate `enzime' because:
�[31;1merror:�[0m attribute 'enzime' in selection path 'enzime' not found

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mpv

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/knfx60r4hvp2z22b8hg72v7xchfw6l74-mpv-0.28.2
shrinking /nix/store/knfx60r4hvp2z22b8hg72v7xchfw6l74-mpv-0.28.2/bin/.mpv-wrapped
shrinking /nix/store/knfx60r4hvp2z22b8hg72v7xchfw6l74-mpv-0.28.2/lib/libmpv.so.1.26.0
gzipping man pages under /nix/store/knfx60r4hvp2z22b8hg72v7xchfw6l74-mpv-0.28.2/share/man/
strip is /nix/store/90vmpr41dzsx350k5argycaf693hnl1l-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/knfx60r4hvp2z22b8hg72v7xchfw6l74-mpv-0.28.2/lib  /nix/store/knfx60r4hvp2z22b8hg72v7xchfw6l74-mpv-0.28.2/bin
patching script interpreter paths in /nix/store/knfx60r4hvp2z22b8hg72v7xchfw6l74-mpv-0.28.2
checking for references to /build in /nix/store/knfx60r4hvp2z22b8hg72v7xchfw6l74-mpv-0.28.2...
/nix/store/knfx60r4hvp2z22b8hg72v7xchfw6l74-mpv-0.28.2

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mpv

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/cn8rpc219gfsbm8r9zi6nfawy20wpqz9-mpv-0.28.2
shrinking /nix/store/cn8rpc219gfsbm8r9zi6nfawy20wpqz9-mpv-0.28.2/bin/.mpv-wrapped
shrinking /nix/store/cn8rpc219gfsbm8r9zi6nfawy20wpqz9-mpv-0.28.2/lib/libmpv.so.1.26.0
gzipping man pages under /nix/store/cn8rpc219gfsbm8r9zi6nfawy20wpqz9-mpv-0.28.2/share/man/
strip is /nix/store/7iyn7gn33i7xxjgmwf25k20246y6nd9d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/cn8rpc219gfsbm8r9zi6nfawy20wpqz9-mpv-0.28.2/lib  /nix/store/cn8rpc219gfsbm8r9zi6nfawy20wpqz9-mpv-0.28.2/bin
patching script interpreter paths in /nix/store/cn8rpc219gfsbm8r9zi6nfawy20wpqz9-mpv-0.28.2
checking for references to /build in /nix/store/cn8rpc219gfsbm8r9zi6nfawy20wpqz9-mpv-0.28.2...
/nix/store/cn8rpc219gfsbm8r9zi6nfawy20wpqz9-mpv-0.28.2

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: mpv

Partial log (click to expand)

/nix/store/d9i2mdw3ygb9ydjw7vsp1rgwy29zszfn-mpv-0.28.2/lib/libmpv.1.26.0.dylib: fixing dylib
/nix/store/d9i2mdw3ygb9ydjw7vsp1rgwy29zszfn-mpv-0.28.2/lib/libmpv.1.26.0.dylib: fixing dylib
/nix/store/d9i2mdw3ygb9ydjw7vsp1rgwy29zszfn-mpv-0.28.2/lib/libmpv.1.26.0.dylib: fixing dylib
/nix/store/d9i2mdw3ygb9ydjw7vsp1rgwy29zszfn-mpv-0.28.2/lib/libmpv.1.26.0.dylib: fixing dylib
/nix/store/d9i2mdw3ygb9ydjw7vsp1rgwy29zszfn-mpv-0.28.2/lib/libmpv.1.26.0.dylib: fixing dylib
/nix/store/d9i2mdw3ygb9ydjw7vsp1rgwy29zszfn-mpv-0.28.2/lib/libmpv.1.26.0.dylib: fixing dylib
/nix/store/d9i2mdw3ygb9ydjw7vsp1rgwy29zszfn-mpv-0.28.2/lib/libmpv.1.26.0.dylib: fixing dylib
/nix/store/d9i2mdw3ygb9ydjw7vsp1rgwy29zszfn-mpv-0.28.2/lib/libmpv.1.26.0.dylib: fixing dylib
/nix/store/d9i2mdw3ygb9ydjw7vsp1rgwy29zszfn-mpv-0.28.2/lib/libmpv.1.26.0.dylib: fixing dylib
/nix/store/d9i2mdw3ygb9ydjw7vsp1rgwy29zszfn-mpv-0.28.2/lib/libmpv.1.26.0.dylib: fixing dylib

@LnL7
Copy link
Member

LnL7 commented Jul 25, 2018

@GrahamcOfBorg build mpv

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: mpv

Partial log (click to expand)

[1/1] Compiling version.sh
[  2/418] Processing osdep/macOS_swift.o osdep/macOS_swift.h osdep/macOS_swift.swiftmodule: osdep/macOS_mpv_helper.swift video/out/cocoa-cb/events_view.swift video/out/cocoa-cb/video_layer.swift video/out/cocoa-cb/window.swift video/out/cocoa_cb_common.swift -> build/osdep/macOS_swift.o build/osdep/macOS_swift.h build/osdep/macOS_swift.swiftmodule
[  3/418] Compiling TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns
/bin/sh: []: command not found

Waf: Leaving directory `/private/tmp/nix-build-mpv-0.29.0.drv-0/source/build'
Build failed
 -> task in 'osdep/macOS_swift.o osdep/macOS_swift.h osdep/macOS_swift.swiftmodule' failed with exit status 127 (run with -v to display more information)
builder for '/nix/store/74ym8fvcvm2aa1k38pbshdm68ljdjqiv-mpv-0.29.0.drv' failed with exit code 1
�[31;1merror:�[0m build of '/nix/store/74ym8fvcvm2aa1k38pbshdm68ljdjqiv-mpv-0.29.0.drv' failed

@LnL7
Copy link
Member

LnL7 commented Jul 25, 2018

Hmm, this worked before.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mpv

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/ffqp98gm7n9pcp8sxpkxykp66f5zripd-mpv-0.29.0
shrinking /nix/store/ffqp98gm7n9pcp8sxpkxykp66f5zripd-mpv-0.29.0/lib/libmpv.so.1.101.0
shrinking /nix/store/ffqp98gm7n9pcp8sxpkxykp66f5zripd-mpv-0.29.0/bin/.mpv-wrapped
gzipping man pages under /nix/store/ffqp98gm7n9pcp8sxpkxykp66f5zripd-mpv-0.29.0/share/man/
strip is /nix/store/a3nk8z2i7m7wa3jdckgv710n7j3yx4b5-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/ffqp98gm7n9pcp8sxpkxykp66f5zripd-mpv-0.29.0/lib  /nix/store/ffqp98gm7n9pcp8sxpkxykp66f5zripd-mpv-0.29.0/bin
patching script interpreter paths in /nix/store/ffqp98gm7n9pcp8sxpkxykp66f5zripd-mpv-0.29.0
checking for references to /build in /nix/store/ffqp98gm7n9pcp8sxpkxykp66f5zripd-mpv-0.29.0...
/nix/store/ffqp98gm7n9pcp8sxpkxykp66f5zripd-mpv-0.29.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mpv

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/pl6v4bck0a7pi0hzz3k7qhzlxda5mfvd-mpv-0.29.0
shrinking /nix/store/pl6v4bck0a7pi0hzz3k7qhzlxda5mfvd-mpv-0.29.0/lib/libmpv.so.1.101.0
shrinking /nix/store/pl6v4bck0a7pi0hzz3k7qhzlxda5mfvd-mpv-0.29.0/bin/.mpv-wrapped
gzipping man pages under /nix/store/pl6v4bck0a7pi0hzz3k7qhzlxda5mfvd-mpv-0.29.0/share/man/
strip is /nix/store/a245zacjzf3qw0davhvlfarihcy2yyrc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/pl6v4bck0a7pi0hzz3k7qhzlxda5mfvd-mpv-0.29.0/lib  /nix/store/pl6v4bck0a7pi0hzz3k7qhzlxda5mfvd-mpv-0.29.0/bin
patching script interpreter paths in /nix/store/pl6v4bck0a7pi0hzz3k7qhzlxda5mfvd-mpv-0.29.0
checking for references to /build in /nix/store/pl6v4bck0a7pi0hzz3k7qhzlxda5mfvd-mpv-0.29.0...
/nix/store/pl6v4bck0a7pi0hzz3k7qhzlxda5mfvd-mpv-0.29.0

@matthewbauer
Copy link
Member

I am able to build it locally.

@Enzime
Copy link
Member Author

Enzime commented Aug 2, 2018

@matthewbauer are you building this with mpv 0.29.0?

@samueldr
Copy link
Member

samueldr commented Aug 4, 2018

@GrahamcOfBorg build mpv

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mpv

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/qk2ganslj6gy1b6m21slm8i2b0gk72n0-mpv-0.29.0
shrinking /nix/store/qk2ganslj6gy1b6m21slm8i2b0gk72n0-mpv-0.29.0/bin/.mpv-wrapped
shrinking /nix/store/qk2ganslj6gy1b6m21slm8i2b0gk72n0-mpv-0.29.0/lib/libmpv.so.1.101.0
gzipping man pages under /nix/store/qk2ganslj6gy1b6m21slm8i2b0gk72n0-mpv-0.29.0/share/man/
strip is /nix/store/1hi76hr87bd1y1q1qjk0lv8nmcjip1c8-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/qk2ganslj6gy1b6m21slm8i2b0gk72n0-mpv-0.29.0/lib  /nix/store/qk2ganslj6gy1b6m21slm8i2b0gk72n0-mpv-0.29.0/bin
patching script interpreter paths in /nix/store/qk2ganslj6gy1b6m21slm8i2b0gk72n0-mpv-0.29.0
checking for references to /build in /nix/store/qk2ganslj6gy1b6m21slm8i2b0gk72n0-mpv-0.29.0...
/nix/store/qk2ganslj6gy1b6m21slm8i2b0gk72n0-mpv-0.29.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: mpv

Partial log (click to expand)

/nix/store/4fn5zp75cdm8dr98c3j1mdcfg9s3hvzg-mpv-0.29.0/lib/libmpv.1.101.0.dylib: fixing dylib
/nix/store/4fn5zp75cdm8dr98c3j1mdcfg9s3hvzg-mpv-0.29.0/lib/libmpv.1.101.0.dylib: fixing dylib
/nix/store/4fn5zp75cdm8dr98c3j1mdcfg9s3hvzg-mpv-0.29.0/lib/libmpv.1.101.0.dylib: fixing dylib
/nix/store/4fn5zp75cdm8dr98c3j1mdcfg9s3hvzg-mpv-0.29.0/lib/libmpv.1.101.0.dylib: fixing dylib
/nix/store/4fn5zp75cdm8dr98c3j1mdcfg9s3hvzg-mpv-0.29.0/lib/libmpv.1.101.0.dylib: fixing dylib
/nix/store/4fn5zp75cdm8dr98c3j1mdcfg9s3hvzg-mpv-0.29.0/lib/libmpv.1.101.0.dylib: fixing dylib
/nix/store/4fn5zp75cdm8dr98c3j1mdcfg9s3hvzg-mpv-0.29.0/lib/libmpv.1.101.0.dylib: fixing dylib
/nix/store/4fn5zp75cdm8dr98c3j1mdcfg9s3hvzg-mpv-0.29.0/lib/libmpv.1.101.0.dylib: fixing dylib
/nix/store/4fn5zp75cdm8dr98c3j1mdcfg9s3hvzg-mpv-0.29.0/lib/libmpv.1.101.0.dylib: fixing dylib
/nix/store/4fn5zp75cdm8dr98c3j1mdcfg9s3hvzg-mpv-0.29.0/lib/libmpv.1.101.0.dylib: fixing dylib

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mpv

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/zr3blyxf1wi5whyxjwdjd6ag4asd0kgk-mpv-0.29.0
shrinking /nix/store/zr3blyxf1wi5whyxjwdjd6ag4asd0kgk-mpv-0.29.0/lib/libmpv.so.1.101.0
shrinking /nix/store/zr3blyxf1wi5whyxjwdjd6ag4asd0kgk-mpv-0.29.0/bin/.mpv-wrapped
gzipping man pages under /nix/store/zr3blyxf1wi5whyxjwdjd6ag4asd0kgk-mpv-0.29.0/share/man/
strip is /nix/store/zrs21zqcchgyabjf4xfimncdq16njizc-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/zr3blyxf1wi5whyxjwdjd6ag4asd0kgk-mpv-0.29.0/lib  /nix/store/zr3blyxf1wi5whyxjwdjd6ag4asd0kgk-mpv-0.29.0/bin
patching script interpreter paths in /nix/store/zr3blyxf1wi5whyxjwdjd6ag4asd0kgk-mpv-0.29.0
checking for references to /build in /nix/store/zr3blyxf1wi5whyxjwdjd6ag4asd0kgk-mpv-0.29.0...
/nix/store/zr3blyxf1wi5whyxjwdjd6ag4asd0kgk-mpv-0.29.0

@LnL7 LnL7 merged commit 78e2e32 into NixOS:master Aug 5, 2018
@Enzime Enzime deleted the add/mpv-app-bundle branch August 5, 2018 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants