Merge pull request #291405 from atorres1985-contrib/vlc-bin

vlc-bin: init at 3.0.20
This commit is contained in:
Weijia Wang 2024-03-08 21:26:19 +01:00 committed by GitHub
commit 56272cfaa5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 69 additions and 0 deletions

View file

@ -14921,6 +14921,12 @@
githubId = 8641;
name = "Pierre Carrier";
};
pcasaretto = {
email = "pcasaretto@gmail.com";
github = "pcasaretto";
githubId = 817039;
name = "Paulo Casaretto";
};
pedrohlc = {
email = "root@pedrohlc.com";
github = "PedroHLC";

View file

@ -0,0 +1,61 @@
{ lib
, fetchurl
, makeWrapper
, stdenv
, undmg
, variant ?
if (stdenv.isDarwin && stdenv.isAarch64)
then "arm64"
else if (stdenv.isDarwin && stdenv.isx86_64)
then "intel64"
else "universal" # not reachable by normal means
}:
assert builtins.elem variant [ "arm64" "intel64" "universal" ];
stdenv.mkDerivation (finalAttrs: {
pname = "vlc-bin-${variant}";
version = "3.0.20";
src = fetchurl {
url = "http://get.videolan.org/vlc/${finalAttrs.version}/macosx/vlc-${finalAttrs.version}-${variant}.dmg";
hash = {
"arm64" = "sha256-XV8O5S2BmCpiL0AhkopktHBalVRJniDDPQusIlkLEY4=";
"intel64" = "sha256-pNwUQfyrjiuQxil0zlOZu4isv2xw1U8hxhWNn7H7onk=";
"universal" = "sha256-IqGPOWzMmHbGDV+0QxFslv19BC2J1Z5Qzcuja/Od1Us=";
}.${variant};
};
sourceRoot = ".";
nativeBuildInputs = [
makeWrapper
undmg
];
installPhase = ''
runHook preInstall
mkdir -p $out/Applications $out/bin
cp -r "VLC.app" $out/Applications
makeWrapper "$out/Applications/VLC.app/Contents/MacOS/VLC" "$out/bin/vlc"
runHook postInstall
'';
meta = {
description = "Cross-platform media player and streaming server; precompiled binary for MacOS, repacked from official website";
homepage = "https://www.videolan.org/vlc/";
downloadPage = "https://www.videolan.org/vlc/download-macosx.html";
license = lib.licenses.lgpl21Plus;
mainProgram = "vlc";
maintainers = with lib.maintainers; [ pcasaretto ];
platforms = lib.systems.inspect.patternLogicalAnd
(lib.systems.inspect.patterns.isDarwin)
(({
"arm64" = lib.systems.inspect.patterns.isAarch64;
"intel64" = lib.systems.inspect.patterns.isx86_64;
"universal" = lib.systems.inspect.patterns.isDarwin;
}).${variant});
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})

View file

@ -35899,6 +35899,8 @@ with pkgs;
vkeybd = callPackage ../applications/audio/vkeybd { };
vlc-bin-universal = vlc-bin.override { variant = "universal"; };
libvlc = vlc.override {
withQt5 = false;
onlyLibVLC = true;