rocmPackages.llvm.libcxx: fix build by disabling test (#375850)
[NixPkgs.git] / pkgs / by-name / vl / vlc-bin / package.nix
blob6aed05b571ca3f25252ab5c035dce7f38c5d966f
2   lib,
3   fetchurl,
4   makeWrapper,
5   stdenv,
6   undmg,
7   variant ?
8     if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) then
9       "arm64"
10     else if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) then
11       "intel64"
12     else
13       "universal", # not reachable by normal means
16 assert builtins.elem variant [
17   "arm64"
18   "intel64"
19   "universal"
21 stdenv.mkDerivation (finalAttrs: {
22   pname = "vlc-bin-${variant}";
23   version = "3.0.21";
25   src = fetchurl {
26     url = "http://get.videolan.org/vlc/${finalAttrs.version}/macosx/vlc-${finalAttrs.version}-${variant}.dmg";
27     hash =
28       {
29         "arm64" = "sha256-Fd1lv2SJ2p7Gpn9VhcdMQKWJk6z/QagpWKkW3XQXgEQ=";
30         "intel64" = "sha256-1DH9BRw9x68CvTE8bQXZDPYEtw7T7Fu6b9TEnvPmONk=";
31         "universal" = "sha256-UDgOVvgdYw41MUJqJlq/iz3ubAgiu3yeMLUyx9aaZcA=";
32       }
33       .${variant};
34   };
36   sourceRoot = ".";
38   nativeBuildInputs = [
39     makeWrapper
40     undmg
41   ];
43   installPhase = ''
44     runHook preInstall
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"
50     runHook postInstall
51   '';
53   meta = {
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;
58     mainProgram = "vlc";
59     maintainers = with lib.maintainers; [ pcasaretto ];
60     platforms = lib.systems.inspect.patternLogicalAnd (lib.systems.inspect.patterns.isDarwin) (
61       ({
62         "arm64" = lib.systems.inspect.patterns.isAarch64;
63         "intel64" = lib.systems.inspect.patterns.isx86_64;
64         "universal" = lib.systems.inspect.patterns.isDarwin;
65       }).${variant}
66     );
67     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
68   };