diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2016-05-18 17:10:02 +0200 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2016-05-18 17:10:02 +0200 |
commit | f8d481754cf842ca6e6ac1427ce0f571f5a44108 (patch) | |
tree | 70e702285987429aed275e0d5e2dc15c050e1f8c /pkgs/development/libraries/phonon | |
parent | 9fbc20e2f89bc045efac7ade41949a2c2d571dec (diff) | |
parent | 3cd63ade1614d4c581735ffb0cebe181bf87dfc8 (diff) | |
download | nixlib-f8d481754cf842ca6e6ac1427ce0f571f5a44108.tar nixlib-f8d481754cf842ca6e6ac1427ce0f571f5a44108.tar.gz nixlib-f8d481754cf842ca6e6ac1427ce0f571f5a44108.tar.bz2 nixlib-f8d481754cf842ca6e6ac1427ce0f571f5a44108.tar.lz nixlib-f8d481754cf842ca6e6ac1427ce0f571f5a44108.tar.xz nixlib-f8d481754cf842ca6e6ac1427ce0f571f5a44108.tar.zst nixlib-f8d481754cf842ca6e6ac1427ce0f571f5a44108.zip |
Merge remote-tracking branch 'origin/master' into hardened-stdenv
Diffstat (limited to 'pkgs/development/libraries/phonon')
-rw-r--r-- | pkgs/development/libraries/phonon/backends/gstreamer.nix | 45 | ||||
-rw-r--r-- | pkgs/development/libraries/phonon/backends/vlc.nix | 39 | ||||
-rw-r--r-- | pkgs/development/libraries/phonon/default.nix | 26 |
3 files changed, 95 insertions, 15 deletions
diff --git a/pkgs/development/libraries/phonon/backends/gstreamer.nix b/pkgs/development/libraries/phonon/backends/gstreamer.nix new file mode 100644 index 000000000000..3f2ab6696d18 --- /dev/null +++ b/pkgs/development/libraries/phonon/backends/gstreamer.nix @@ -0,0 +1,45 @@ +{ stdenv, lib, fetchurl, cmake, gst_all_1, phonon, pkgconfig +, extra-cmake-modules ? null, qtbase ? null, qtx11extras ? null, qt4 ? null +, debug ? false }: + +with lib; + +let + v = "4.9.0"; + pname = "phonon-backend-gstreamer"; + withQt5 = extra-cmake-modules != null; +in + +assert withQt5 -> qtbase != null; +assert withQt5 -> qtx11extras != null; + +stdenv.mkDerivation rec { + name = "${pname}-${if withQt5 then "qt5" else "qt4"}-${v}"; + + meta = with stdenv.lib; { + homepage = http://phonon.kde.org/; + description = "GStreamer backend for Phonon"; + platforms = platforms.linux; + maintainers = with maintainers; [ ttuegel ]; + }; + + src = fetchurl { + url = "mirror://kde/stable/phonon/${pname}/${v}/${pname}-${v}.tar.xz"; + sha256 = "1wc5p1rqglf0n1avp55s50k7fjdzdrhg0gind15k8796w7nfbhyf"; + }; + + buildInputs = with gst_all_1; + [ gstreamer gst-plugins-base phonon ] + ++ (if withQt5 then [ qtbase qtx11extras ] else [ qt4 ]); + + NIX_CFLAGS_COMPILE = [ + # This flag should be picked up through pkgconfig, but it isn't. + "-I${gst_all_1.gstreamer}/lib/gstreamer-1.0/include" + ]; + + nativeBuildInputs = [ cmake pkgconfig ] ++ optional withQt5 extra-cmake-modules; + + cmakeFlags = + [ "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" ] + ++ optional withQt5 "-DPHONON_BUILD_PHONON4QT5=ON"; +} diff --git a/pkgs/development/libraries/phonon/backends/vlc.nix b/pkgs/development/libraries/phonon/backends/vlc.nix new file mode 100644 index 000000000000..aaff26eee286 --- /dev/null +++ b/pkgs/development/libraries/phonon/backends/vlc.nix @@ -0,0 +1,39 @@ +{ stdenv, lib, fetchurl, cmake, phonon, pkgconfig, vlc +, extra-cmake-modules ? null, qtbase ? null, qtx11extras ? null, qt4 ? null +, debug ? false }: + +with lib; + +let + v = "0.9.0"; + pname = "phonon-backend-vlc"; + withQt5 = extra-cmake-modules != null; +in + +assert withQt5 -> qtbase != null; +assert withQt5 -> qtx11extras != null; + +stdenv.mkDerivation rec { + name = "${pname}-${if withQt5 then "qt5" else "qt4"}-${v}"; + + meta = with stdenv.lib; { + homepage = http://phonon.kde.org/; + description = "GStreamer backend for Phonon"; + platforms = platforms.linux; + }; + + src = fetchurl { + url = "mirror://kde/stable/phonon/${pname}/${v}/${pname}-${v}.tar.xz"; + sha256 = "1gnd1j305mqajw5gxm42vg6ajkvi8611bxgc3qhj5k0saz5dgkn0"; + }; + + buildInputs = + [ phonon vlc ] + ++ (if withQt5 then [ qtbase qtx11extras ] else [ qt4 ]); + + nativeBuildInputs = [ cmake pkgconfig ] ++ optional withQt5 extra-cmake-modules; + + cmakeFlags = + [ "-DCMAKE_BUILD_TYPE=${if debug then "Debug" else "Release"}" ] + ++ optional withQt5 "-DPHONON_BUILD_PHONON4QT5=ON"; +} diff --git a/pkgs/development/libraries/phonon/default.nix b/pkgs/development/libraries/phonon/default.nix index db4c237c989b..3fbbccc08e30 100644 --- a/pkgs/development/libraries/phonon/default.nix +++ b/pkgs/development/libraries/phonon/default.nix @@ -1,21 +1,19 @@ -{ stdenv, fetchurl, cmake, mesa, pkgconfig, libpulseaudio -, qt4 ? null, automoc4 ? null -, qtbase ? null, qtquick1 ? null, qttools ? null +{ stdenv, lib, fetchurl, cmake, mesa, pkgconfig, libpulseaudio +, qt4 ? null, extra-cmake-modules ? null, qtbase ? null, qttools ? null , debug ? false }: -with stdenv.lib; +with lib; let - v = "4.8.3"; - withQt5 = qtbase != null; + v = "4.9.0"; + withQt5 = extra-cmake-modules != null; in -assert withQt5 -> qtquick1 != null; +assert withQt5 -> qtbase != null; assert withQt5 -> qttools != null; -assert !withQt5 -> automoc4 != null; stdenv.mkDerivation rec { - name = "phonon-${v}"; + name = "phonon-${if withQt5 then "qt5" else "qt4"}-${v}"; meta = { homepage = http://phonon.kde.org/; @@ -26,17 +24,15 @@ stdenv.mkDerivation rec { }; src = fetchurl { - url = "mirror://kde/stable/phonon/${v}/src/phonon-${v}.tar.xz"; - sha256 = "05nshngk03ln90vsjz44dx8al576f4vd5fvhs1l0jmx13jb9q551"; + url = "mirror://kde/stable/phonon/${v}/phonon-${v}.tar.xz"; + sha256 = "1q5hvsk4sfcb91625wcmldy7kgjmfpmpmkgzi6mxkqdd307v8x5v"; }; buildInputs = [ mesa libpulseaudio ] - ++ (if withQt5 then [ qtbase qtquick1 qttools ] else [ qt4 ]); + ++ (if withQt5 then [ qtbase qttools ] else [ qt4 ]); - nativeBuildInputs = - [ cmake pkgconfig ] - ++ optional (!withQt5) automoc4; + nativeBuildInputs = [ cmake pkgconfig ] ++ optional withQt5 extra-cmake-modules; NIX_CFLAGS_COMPILE = "-fPIC"; |