mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-27 11:36:29 +03:00
kodi: miscellaneous cleanup
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
4ef33dd12d
commit
901b43d439
2 changed files with 23 additions and 32 deletions
|
@ -49,7 +49,7 @@ let self = rec {
|
||||||
buildKodiAddon =
|
buildKodiAddon =
|
||||||
{ name ? "${attrs.pname}-${attrs.version}"
|
{ name ? "${attrs.pname}-${attrs.version}"
|
||||||
, namespace
|
, namespace
|
||||||
, sourceDir ? null
|
, sourceDir ? ""
|
||||||
, ... } @ attrs:
|
, ... } @ attrs:
|
||||||
toKodiAddon (stdenv.mkDerivation ({
|
toKodiAddon (stdenv.mkDerivation ({
|
||||||
name = "kodi-" + name;
|
name = "kodi-" + name;
|
||||||
|
@ -59,7 +59,7 @@ let self = rec {
|
||||||
extraRuntimeDependencies = [ ];
|
extraRuntimeDependencies = [ ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
${if sourceDir == null then "" else "cd $src/$sourceDir"}
|
cd $src/$sourceDir
|
||||||
d=$out${addonDir}/${namespace}
|
d=$out${addonDir}/${namespace}
|
||||||
mkdir -p $d
|
mkdir -p $d
|
||||||
sauce="."
|
sauce="."
|
||||||
|
|
|
@ -19,30 +19,22 @@
|
||||||
, libplist, p11-kit, zlib, flatbuffers, fmt, fstrcmp, rapidjson
|
, libplist, p11-kit, zlib, flatbuffers, fmt, fstrcmp, rapidjson
|
||||||
, lirc
|
, lirc
|
||||||
, x11Support ? true, libX11, xorgproto, libXt, libXmu, libXext, libXinerama, libXrandr, libXtst, libXfixes, xdpyinfo, libXdmcp
|
, x11Support ? true, libX11, xorgproto, libXt, libXmu, libXext, libXinerama, libXrandr, libXtst, libXfixes, xdpyinfo, libXdmcp
|
||||||
, dbusSupport ? true, dbus ? null
|
, dbusSupport ? true, dbus
|
||||||
, joystickSupport ? true, cwiid ? null
|
, joystickSupport ? true, cwiid
|
||||||
, nfsSupport ? true, libnfs ? null
|
, nfsSupport ? true, libnfs
|
||||||
, pulseSupport ? true, libpulseaudio ? null
|
, pulseSupport ? true, libpulseaudio
|
||||||
, rtmpSupport ? true, rtmpdump ? null
|
, rtmpSupport ? true, rtmpdump
|
||||||
, sambaSupport ? true, samba ? null
|
, sambaSupport ? true, samba
|
||||||
, udevSupport ? true, udev ? null
|
, udevSupport ? true, udev
|
||||||
, usbSupport ? false, libusb-compat-0_1 ? null
|
, usbSupport ? false, libusb-compat-0_1
|
||||||
, vdpauSupport ? true, libvdpau ? null
|
, vdpauSupport ? true, libvdpau
|
||||||
, waylandSupport ? false, wayland ? null, wayland-protocols ? null
|
, waylandSupport ? false, wayland, wayland-protocols
|
||||||
, waylandpp ? null, libxkbcommon ? null
|
, waylandpp ? null, libxkbcommon
|
||||||
, gbmSupport ? false, mesa ? null, libinput ? null
|
, gbmSupport ? false, mesa, libinput
|
||||||
, buildPackages
|
, buildPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert dbusSupport -> dbus != null;
|
assert usbSupport -> !udevSupport; # libusb-compat-0_1 won't be used if udev is avaliable
|
||||||
assert nfsSupport -> libnfs != null;
|
|
||||||
assert pulseSupport -> libpulseaudio != null;
|
|
||||||
assert rtmpSupport -> rtmpdump != null;
|
|
||||||
assert sambaSupport -> samba != null;
|
|
||||||
assert udevSupport -> udev != null;
|
|
||||||
assert usbSupport -> libusb-compat-0_1 != null && ! udevSupport; # libusb-compat-0_1 won't be used if udev is avaliable
|
|
||||||
assert vdpauSupport -> libvdpau != null;
|
|
||||||
assert waylandSupport -> wayland != null && wayland-protocols != null && waylandpp != null && libxkbcommon != null;
|
|
||||||
assert gbmSupport || waylandSupport || x11Support;
|
assert gbmSupport || waylandSupport || x11Support;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -78,7 +70,7 @@ let
|
||||||
"-DPKG_CONFIG_EXECUTABLE=pkg-config"
|
"-DPKG_CONFIG_EXECUTABLE=pkg-config"
|
||||||
];
|
];
|
||||||
buildInputs = [ libidn libtasn1 p11-kit zlib libva ]
|
buildInputs = [ libidn libtasn1 p11-kit zlib libva ]
|
||||||
++ lib.optional vdpauSupport libvdpau;
|
++ lib.optional vdpauSupport libvdpau;
|
||||||
nativeBuildInputs = [ cmake nasm pkg-config gnutls ];
|
nativeBuildInputs = [ cmake nasm pkg-config gnutls ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -105,11 +97,9 @@ let
|
||||||
sha256 = "1xxn01mhkdnp10cqdr357wx77vyzfb5glqpqyg8m0skyi75aii59";
|
sha256 = "1xxn01mhkdnp10cqdr357wx77vyzfb5glqpqyg8m0skyi75aii59";
|
||||||
};
|
};
|
||||||
|
|
||||||
kodi_platforms =
|
kodi_platforms = lib.optional gbmSupport "gbm"
|
||||||
lib.optional gbmSupport "gbm" ++
|
++ lib.optional waylandSupport "wayland"
|
||||||
lib.optional waylandSupport "wayland" ++
|
++ lib.optional x11Support "x11";
|
||||||
lib.optional x11Support "x11"
|
|
||||||
;
|
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
pname = "kodi";
|
pname = "kodi";
|
||||||
|
@ -143,7 +133,7 @@ in stdenv.mkDerivation {
|
||||||
libXinerama libXrandr.dev libXtst libXfixes
|
libXinerama libXrandr.dev libXtst libXfixes
|
||||||
]
|
]
|
||||||
++ lib.optional dbusSupport dbus
|
++ lib.optional dbusSupport dbus
|
||||||
++ lib.optional joystickSupport cwiid
|
++ lib.optional joystickSupport cwiid
|
||||||
++ lib.optional nfsSupport libnfs
|
++ lib.optional nfsSupport libnfs
|
||||||
++ lib.optional pulseSupport libpulseaudio
|
++ lib.optional pulseSupport libpulseaudio
|
||||||
++ lib.optional rtmpSupport rtmpdump
|
++ lib.optional rtmpSupport rtmpdump
|
||||||
|
@ -222,7 +212,8 @@ in stdenv.mkDerivation {
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
for p in $(ls $out/bin/) ; do
|
for p in $(ls $out/bin/) ; do
|
||||||
wrapProgram $out/bin/$p \
|
wrapProgram $out/bin/$p \
|
||||||
--prefix PATH ":" "${lib.makeBinPath ([ python3Packages.python glxinfo ] ++ lib.optional x11Support xdpyinfo ++ lib.optional sambaSupport samba)}" \
|
--prefix PATH ":" "${lib.makeBinPath ([ python3Packages.python glxinfo ]
|
||||||
|
++ lib.optional x11Support xdpyinfo ++ lib.optional sambaSupport samba)}" \
|
||||||
--prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath
|
--prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath
|
||||||
([ curl systemd libmad libvdpau libcec libcec_platform libass ]
|
([ curl systemd libmad libvdpau libcec libcec_platform libass ]
|
||||||
++ lib.optional nfsSupport libnfs
|
++ lib.optional nfsSupport libnfs
|
||||||
|
@ -244,7 +235,7 @@ in stdenv.mkDerivation {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Media center";
|
description = "Media center";
|
||||||
homepage = "https://kodi.tv/";
|
homepage = "https://kodi.tv/";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ titanous edwtjo peterhoeg sephalon ];
|
maintainers = with maintainers; [ titanous edwtjo peterhoeg sephalon ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue