8 if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) then
10 else if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) then
13 "universal", # not reachable by normal means
16 assert builtins.elem variant [
21 stdenv.mkDerivation (finalAttrs: {
22 pname = "vlc-bin-${variant}";
26 url = "http://get.videolan.org/vlc/${finalAttrs.version}/macosx/vlc-${finalAttrs.version}-${variant}.dmg";
29 "arm64" = "sha256-Fd1lv2SJ2p7Gpn9VhcdMQKWJk6z/QagpWKkW3XQXgEQ=";
30 "intel64" = "sha256-1DH9BRw9x68CvTE8bQXZDPYEtw7T7Fu6b9TEnvPmONk=";
31 "universal" = "sha256-UDgOVvgdYw41MUJqJlq/iz3ubAgiu3yeMLUyx9aaZcA=";
46 mkdir -p $out/Applications $out/bin
47 cp -r "VLC.app" $out/Applications
48 makeWrapper "$out/Applications/VLC.app/Contents/MacOS/VLC" "$out/bin/vlc"
54 description = "Cross-platform media player and streaming server; precompiled binary for MacOS, repacked from official website";
55 homepage = "https://www.videolan.org/vlc/";
56 downloadPage = "https://www.videolan.org/vlc/download-macosx.html";
57 license = lib.licenses.lgpl21Plus;
59 maintainers = with lib.maintainers; [ pcasaretto ];
60 platforms = lib.systems.inspect.patternLogicalAnd (lib.systems.inspect.patterns.isDarwin) (
62 "arm64" = lib.systems.inspect.patterns.isAarch64;
63 "intel64" = lib.systems.inspect.patterns.isx86_64;
64 "universal" = lib.systems.inspect.patterns.isDarwin;
67 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];