7 if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
9 else if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64)
11 else "universal" # not reachable by normal means
14 assert builtins.elem variant [ "arm64" "intel64" "universal" ];
15 stdenv.mkDerivation (finalAttrs: {
16 pname = "vlc-bin-${variant}";
20 url = "http://get.videolan.org/vlc/${finalAttrs.version}/macosx/vlc-${finalAttrs.version}-${variant}.dmg";
22 "arm64" = "sha256-Fd1lv2SJ2p7Gpn9VhcdMQKWJk6z/QagpWKkW3XQXgEQ=";
23 "intel64" = "sha256-1DH9BRw9x68CvTE8bQXZDPYEtw7T7Fu6b9TEnvPmONk=";
24 "universal" = "sha256-UDgOVvgdYw41MUJqJlq/iz3ubAgiu3yeMLUyx9aaZcA=";
38 mkdir -p $out/Applications $out/bin
39 cp -r "VLC.app" $out/Applications
40 makeWrapper "$out/Applications/VLC.app/Contents/MacOS/VLC" "$out/bin/vlc"
46 description = "Cross-platform media player and streaming server; precompiled binary for MacOS, repacked from official website";
47 homepage = "https://www.videolan.org/vlc/";
48 downloadPage = "https://www.videolan.org/vlc/download-macosx.html";
49 license = lib.licenses.lgpl21Plus;
51 maintainers = with lib.maintainers; [ pcasaretto ];
52 platforms = lib.systems.inspect.patternLogicalAnd
53 (lib.systems.inspect.patterns.isDarwin)
55 "arm64" = lib.systems.inspect.patterns.isAarch64;
56 "intel64" = lib.systems.inspect.patterns.isx86_64;
57 "universal" = lib.systems.inspect.patterns.isDarwin;
59 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];