diff options
Diffstat (limited to 'pkgs/applications/video/kodi/unwrapped.nix')
-rw-r--r-- | pkgs/applications/video/kodi/unwrapped.nix | 86 |
1 files changed, 34 insertions, 52 deletions
diff --git a/pkgs/applications/video/kodi/unwrapped.nix b/pkgs/applications/video/kodi/unwrapped.nix index f97b53b60937b..f1e11c1d80e61 100644 --- a/pkgs/applications/video/kodi/unwrapped.nix +++ b/pkgs/applications/video/kodi/unwrapped.nix @@ -1,14 +1,13 @@ -{ stdenv, lib, fetchFromGitHub -, fetchpatch +{ stdenv, lib, fetchFromGitHub, fetchzip , autoconf, automake, libtool, makeWrapper , pkg-config, cmake, yasm, python3Packages , libxcrypt, libgcrypt, libgpg-error, libunistring , boost, avahi, lame , gettext, pcre-cpp, yajl, fribidi, which -, openssl, gperf, tinyxml2, taglib, libssh, swig, jre_headless +, openssl, gperf, tinyxml2, tinyxml-2, taglib, libssh, swig, jre_headless , gtest, ncurses, spdlog , libxml2, systemd -, alsa-lib, libGLU, libGL, fontconfig, freetype, ftgl +, alsa-lib, libGLU, libGL, ffmpeg, fontconfig, freetype, ftgl , libjpeg, libpng, libtiff , libmpeg2, libsamplerate, libmad , libogg, libvorbis, flac, libxslt @@ -33,7 +32,7 @@ , vdpauSupport ? true, libvdpau , waylandSupport ? false, wayland, wayland-protocols , waylandpp ? null, libxkbcommon -, gbmSupport ? false, mesa, libinput +, gbmSupport ? false, mesa, libinput, libdisplay-info , buildPackages }: @@ -41,54 +40,12 @@ assert usbSupport -> !udevSupport; # libusb-compat-0_1 won't be used if udev is assert gbmSupport || waylandSupport || x11Support; let - kodiReleaseDate = "20240302"; - kodiVersion = "20.5"; - rel = "Nexus"; - - kodi_src = fetchFromGitHub { - owner = "xbmc"; - repo = "xbmc"; - rev = "${kodiVersion}-${rel}"; - hash = "sha256-R/tzk3ZarJ4BTR312p2lTLezeCEsqdQH54ROsNIoJZA="; - }; + kodiReleaseDate = "20240405"; + kodiVersion = "21.0"; + rel = "Omega"; # see https://github.com/xbmc/xbmc/blob/${kodiVersion}-${rel}/tools/depends/target/ to get suggested versions for all dependencies - # kodi 20.0 moved to ffmpeg 5, *but* there is a bug making the compilation fail which will - # only been fixed in kodi 21, so stick to ffmpeg 4 for now - ffmpeg = stdenv.mkDerivation rec { - pname = "kodi-ffmpeg"; - version = "4.4.1"; - src = fetchFromGitHub { - owner = "xbmc"; - repo = "FFmpeg"; - rev = "${version}-${rel}-Alpha1"; - sha256 = "sha256-EQHmmWnDw+/udKYq7Nrf00nL7I5XWUtmzdauDryfTII="; - }; - patches = [ - # Backport fix for binutils-2.41. - (fetchpatch { - name = "binutils-2.41.patch"; - url = "https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/effadce6c756247ea8bae32dc13bb3e6f464f0eb"; - hash = "sha256-vlBUMJ1bORQHRNpuzc5iXsTWwS/CN5BmGIA8g7H7mJE="; - }) - ]; - preConfigure = '' - cp ${kodi_src}/tools/depends/target/ffmpeg/{CMakeLists.txt,*.cmake} . - sed -i 's/ --cpu=''${CPU}//' CMakeLists.txt - sed -i 's/--strip=''${CMAKE_STRIP}/--strip=''${CMAKE_STRIP} --ranlib=''${CMAKE_RANLIB}/' CMakeLists.txt - ''; - cmakeFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ - "-DCROSSCOMPILING=ON" - "-DCPU=${stdenv.hostPlatform.parsed.cpu.name}" - "-DOS=${stdenv.hostPlatform.parsed.kernel.name}" - "-DPKG_CONFIG_EXECUTABLE=pkg-config" - ]; - buildInputs = [ libidn2 libtasn1 p11-kit zlib libva ] - ++ lib.optional vdpauSupport libvdpau; - nativeBuildInputs = [ cmake nasm pkg-config gnutls ]; - }; - # We can build these externally but FindLibDvd.cmake forces us to build it # them, so we currently just use them for the src. libdvdcss = fetchFromGitHub { @@ -112,6 +69,21 @@ let sha256 = "sha256-AphBQhXud+a6wm52zjzC5biz53NnqWdgpL2QDt2ZuXc="; }; + groovy = fetchzip { + url = "https://archive.apache.org/dist/groovy/4.0.16/distribution/apache-groovy-binary-4.0.16.zip"; + sha256 = "sha256-OfZBiMVrhw6VqHRHCSC7ZV3FiZ26n4+F8hsskk+L6yU="; + }; + + apache_commons_lang = fetchzip { + url = "https://dlcdn.apache.org//commons/lang/binaries/commons-lang3-3.14.0-bin.zip"; + sha512 = "sha512-eKF1IQ6PDtifb4pMHWQ2SYHIh0HbMi3qpc92lfbOo3uSsFJVR3n7JD0AdzrG17tLJQA4z5PGDhwyYw0rLeLsXw=="; + }; + + apache_commons_text = fetchzip { + url = "https://dlcdn.apache.org//commons/text/binaries/commons-text-1.11.0-bin.zip"; + sha512 = "sha512-P2IvnrHSYRF70LllTMI8aev43h2oe8lq6rrMYw450PEhEa7OuuCjh1Krnc/A4OqENUcidVAAX5dK1RAsZHh8Dg=="; + }; + kodi_platforms = lib.optional gbmSupport "gbm" ++ lib.optional waylandSupport "wayland" ++ lib.optional x11Support "x11"; @@ -120,13 +92,19 @@ in stdenv.mkDerivation { pname = "kodi"; version = kodiVersion; - src = kodi_src; + src = fetchFromGitHub { + owner = "xbmc"; + repo = "xbmc"; + rev = "${kodiVersion}-${rel}"; + hash = "sha256-xrFWqgwTkurEwt3/+/e4SCM6Uk9nxuW62SrCFWWqZO0="; + }; + buildInputs = [ gnutls libidn2 libtasn1 nasm p11-kit libxml2 python3Packages.python boost libmicrohttpd gettext pcre-cpp yajl fribidi libva libdrm - openssl gperf tinyxml2 taglib libssh + openssl gperf tinyxml2 tinyxml-2 taglib libssh gtest ncurses spdlog alsa-lib libGL libGLU fontconfig freetype ftgl libjpeg libpng libtiff @@ -168,6 +146,7 @@ in stdenv.mkDerivation { libxkbcommon.dev mesa.dev libinput.dev + libdisplay-info ]; nativeBuildInputs = [ @@ -192,6 +171,9 @@ in stdenv.mkDerivation { "-Dlibdvdcss_URL=${libdvdcss}" "-Dlibdvdnav_URL=${libdvdnav}" "-Dlibdvdread_URL=${libdvdread}" + "-Dgroovy_SOURCE_DIR=${groovy}" + "-Dapache-commons-lang_SOURCE_DIR=${apache_commons_lang}" + "-Dapache-commons-text_SOURCE_DIR=${apache_commons_text}" "-DGIT_VERSION=${kodiReleaseDate}" "-DENABLE_EVENTCLIENTS=ON" "-DENABLE_INTERNAL_CROSSGUID=OFF" |