Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #98846 from ttuegel/libvlc
Browse files Browse the repository at this point in the history
Build standalone libvlc
  • Loading branch information
ttuegel committed Sep 26, 2020
2 parents 4385083 + 06697c7 commit 6882716
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 27 deletions.
4 changes: 2 additions & 2 deletions pkgs/applications/audio/cantata/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
, withDevices ? true, udisks2
, withDynamic ? true
, withHttpServer ? true
, withLibVlc ? false, vlc
, withLibVlc ? false, libvlc
, withStreams ? true
}:

Expand Down Expand Up @@ -71,7 +71,7 @@ in mkDerivation {
++ lib.optional withMtp libmtp
++ lib.optional withMusicbrainz libmusicbrainz5
++ lib.optional withUdisks udisks2
++ lib.optional withLibVlc vlc;
++ lib.optional withLibVlc libvlc;

nativeBuildInputs = [ cmake pkgconfig qttools ];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/strawberry/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
, withGstreamer ? true
, gst_all_1 ? null
, withVlc ? true
, vlc ? null
, libvlc ? null
}:

mkDerivation rec {
Expand Down Expand Up @@ -75,7 +75,7 @@ mkDerivation rec {
gst-plugins-good
gst-plugins-ugly
])
++ lib.optional withVlc vlc;
++ lib.optional withVlc libvlc;

nativeBuildInputs = [ cmake ninja pkgconfig qttools ];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/kde/elisa.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
, kinit
, kirigami2
, baloo
, vlc
, libvlc
}:

mkDerivation rec {
name = "elisa";

buildInputs = [ vlc ];
buildInputs = [ libvlc ];

nativeBuildInputs = [ extra-cmake-modules kdoctools ];

Expand Down
8 changes: 4 additions & 4 deletions pkgs/applications/networking/p2p/tribler/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgs, python3Packages, makeWrapper
, enablePlayer ? true, vlc ? null, qt5, lib }:
, enablePlayer ? true, libvlc ? null, qt5, lib }:

stdenv.mkDerivation rec {
pname = "tribler";
Expand Down Expand Up @@ -50,9 +50,9 @@ stdenv.mkDerivation rec {

postPatch = ''
${stdenv.lib.optionalString enablePlayer ''
substituteInPlace "./TriblerGUI/vlc.py" --replace "ctypes.CDLL(p)" "ctypes.CDLL('${vlc}/lib/libvlc.so')"
substituteInPlace "./TriblerGUI/vlc.py" --replace "ctypes.CDLL(p)" "ctypes.CDLL('${libvlc}/lib/libvlc.so')"
substituteInPlace "./TriblerGUI/widgets/videoplayerpage.py" --replace "if vlc and vlc.plugin_path" "if vlc"
substituteInPlace "./TriblerGUI/widgets/videoplayerpage.py" --replace "os.environ['VLC_PLUGIN_PATH'] = vlc.plugin_path" "os.environ['VLC_PLUGIN_PATH'] = '${vlc}/lib/vlc/plugins'"
substituteInPlace "./TriblerGUI/widgets/videoplayerpage.py" --replace "os.environ['VLC_PLUGIN_PATH'] = vlc.plugin_path" "os.environ['VLC_PLUGIN_PATH'] = '${libvlc}/lib/vlc/plugins'"
''}
'';

Expand All @@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
--run 'cd $_TRIBLERPATH' \
--add-flags "-O $out/run_tribler.py" \
${stdenv.lib.optionalString enablePlayer ''
--prefix LD_LIBRARY_PATH : ${vlc}/lib
--prefix LD_LIBRARY_PATH : ${libvlc}/lib
''}
mkdir -p $out/share/applications $out/share/icons $out/share/man/man1
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/video/hdhomerun-config-gui/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, libhdhomerun, vlc, gcc, gnumake, pkg-config, gtk2 }:
{ stdenv, fetchurl, libhdhomerun, gcc, gnumake, pkg-config, gtk2 }:

stdenv.mkDerivation rec {
pname = "hdhomerun-config-gui";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/video/obs-studio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
, xorg
, makeWrapper
, pkgconfig
, vlc
, libvlc
, mbedtls

, scriptingSupport ? true
Expand Down Expand Up @@ -65,7 +65,7 @@ in mkDerivation rec {
qtsvg
speex
x264
vlc
libvlc
makeWrapper
mbedtls
]
Expand All @@ -84,7 +84,7 @@ in mkDerivation rec {

postInstall = ''
wrapProgram $out/bin/obs \
--prefix "LD_LIBRARY_PATH" : "${xorg.libX11.out}/lib:${vlc}/lib"
--prefix "LD_LIBRARY_PATH" : "${xorg.libX11.out}/lib:${libvlc}/lib"
'';

postFixup = stdenv.lib.optionalString stdenv.isLinux ''
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/video/vlc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ stdenv.mkDerivation rec {
homepage = "http://www.videolan.org/vlc/";
license = licenses.lgpl21Plus;
platforms = platforms.linux;
broken = versionAtLeast qtbase.version "5.15";
broken = if qtbase != null then versionAtLeast qtbase.version "5.15" else false;
};
}
4 changes: 2 additions & 2 deletions pkgs/development/libraries/phonon/backends/vlc.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, cmake, phonon, pkgconfig, vlc
{ stdenv, lib, fetchurl, cmake, phonon, pkgconfig, libvlc
, extra-cmake-modules, qttools, qtbase, qtx11extras
, debug ? false
}:
Expand All @@ -23,7 +23,7 @@ stdenv.mkDerivation rec {

buildInputs = [
phonon
vlc
libvlc
qtbase
qtx11extras
];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/python-vlc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
, buildPythonPackage
, fetchPypi
, setuptools
, vlc
, libvlc
, substituteAll
}:

Expand All @@ -22,7 +22,7 @@ buildPythonPackage rec {
patches = [
(substituteAll {
src = ./vlc-paths.patch;
libvlcPath="${vlc}/lib/libvlc.so.5";
libvlcPath="${libvlc}/lib/libvlc.so.5";
})
];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/games/megaglest/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, cmake, pkgconfig, git, curl, SDL2, xercesc, openal, lua, vlc
{ stdenv, cmake, pkgconfig, git, curl, SDL2, xercesc, openal, lua, libvlc
, libjpeg, wxGTK, cppunit, ftgl, glew, libogg, libvorbis, buildEnv, libpng
, fontconfig, freetype, xorg, makeWrapper, bash, which, gnome3, libGLU, glib
, fetchFromGitHub
Expand Down Expand Up @@ -29,7 +29,7 @@ stdenv.mkDerivation {
};

nativeBuildInputs = [ pkgconfig ];
buildInputs = [ cmake git curl SDL2 xercesc openal lua libpng libjpeg vlc wxGTK
buildInputs = [ cmake git curl SDL2 xercesc openal lua libpng libjpeg libvlc wxGTK
glib cppunit fontconfig freetype ftgl glew libogg libvorbis makeWrapper libGLU ];

configurePhase = ''
Expand Down
17 changes: 11 additions & 6 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2637,9 +2637,7 @@ in

davix = callPackage ../tools/networking/davix { };

cantata = libsForQt5.callPackage ../applications/audio/cantata {
inherit vlc;
};
cantata = libsForQt5.callPackage ../applications/audio/cantata { };

can-utils = callPackage ../os-specific/linux/can-utils { };

Expand Down Expand Up @@ -15147,8 +15145,6 @@ in

telepathy = callPackage ../development/libraries/telepathy/qt { };

vlc = callPackage ../applications/video/vlc {};

qtwebkit-plugins = callPackage ../development/libraries/qtwebkit-plugins { };

};
Expand Down Expand Up @@ -23932,10 +23928,19 @@ in

vkeybd = callPackage ../applications/audio/vkeybd {};

vlc = libsForQt514.vlc;
vlc = libsForQt514.callPackage ../applications/video/vlc {};

vlc_qt5 = vlc;

libvlc = vlc.override {
withQt5 = false;
qtbase = null;
qtsvg = null;
qtx11extras = null;
wrapQtAppsHook = null;
onlyLibVLC = true;
};

vmpk = callPackage ../applications/audio/vmpk { };

vocproc = callPackage ../applications/audio/vocproc { };
Expand Down

0 comments on commit 6882716

Please sign in to comment.