From 458d86fd9ce01637f6a4a80559aaf207862a9dd5 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 8 Jun 2020 13:19:18 -0400 Subject: [PATCH] clementine: 1.3.1 -> 1.4.0rc1, switch to Qt 5, fix build --- ...ntine-spotify-blob-remove-from-build.patch | 21 ---------- .../applications/audio/clementine/default.nix | 41 ++++++++----------- 2 files changed, 17 insertions(+), 45 deletions(-) delete mode 100644 pkgs/applications/audio/clementine/clementine-spotify-blob-remove-from-build.patch diff --git a/pkgs/applications/audio/clementine/clementine-spotify-blob-remove-from-build.patch b/pkgs/applications/audio/clementine/clementine-spotify-blob-remove-from-build.patch deleted file mode 100644 index 226536a13ba7..000000000000 --- a/pkgs/applications/audio/clementine/clementine-spotify-blob-remove-from-build.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 23070d9..83b6772 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -275,8 +275,6 @@ optional_component(LIBPULSE ON "Pulse audio integration" - optional_component(VISUALISATIONS ON "Visualisations") - - if(NOT HAVE_SPOTIFY_BLOB AND NOT CRYPTOPP_FOUND) -- message(FATAL_ERROR "Either crypto++ must be available or the non-GPL Spotify " -- "code must be compiled in") - elseif(CRYPTOPP_FOUND) - set(HAVE_CRYPTOPP ON) - set(HAVE_SPOTIFY_DOWNLOADER ON) -@@ -434,7 +432,6 @@ if(HAVE_BREAKPAD) - endif(HAVE_BREAKPAD) - - if(HAVE_SPOTIFY_BLOB) -- add_subdirectory(ext/clementine-spotifyblob) - endif(HAVE_SPOTIFY_BLOB) - - if(HAVE_MOODBAR) diff --git a/pkgs/applications/audio/clementine/default.nix b/pkgs/applications/audio/clementine/default.nix index 15d0f92b76aa..0c1690f1462a 100644 --- a/pkgs/applications/audio/clementine/default.nix +++ b/pkgs/applications/audio/clementine/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchFromGitHub, fetchpatch, boost, cmake, chromaprint, gettext, gst_all_1, liblastfm +{ stdenv, mkDerivation, fetchFromGitHub, fetchpatch, boost, cmake, chromaprint, gettext, gst_all_1, liblastfm +, qtbase, qtx11extras , taglib, fftw, glew, qjson, sqlite, libgpod, libplist, usbmuxd, libmtp , libpulseaudio, gvfs, libcdio, libechonest, libspotify, pcre, projectm, protobuf , qca2, pkgconfig, sparsehash, config, makeWrapper, gst_plugins }: @@ -9,30 +10,17 @@ let withCD = config.clementine.cd or true; withCloud = config.clementine.cloud or true; - version = "1.3.1"; + version = "1.4.0rc1"; src = fetchFromGitHub { owner = "clementine-player"; repo = "Clementine"; rev = version; - sha256 = "0i3jkfs8dbfkh47jq3cnx7pip47naqg7w66vmfszk4d8vj37j62j"; + sha256 = "1rqk0hrsn8f8bjk0j0vq1af0ygy6xx7qi9fw0jjw2cmj6kzckyi2"; }; patches = [ ./clementine-spotify-blob.patch - # Required so as to avoid adding libspotify as a build dependency (as it is - # unfree and thus would prevent us from having a free package). - ./clementine-spotify-blob-remove-from-build.patch - (fetchpatch { - # Fix w/gcc7 - url = "https://github.com/clementine-player/Clementine/pull/5630.patch"; - sha256 = "0px7xp1m4nvrncx8sga1qlxppk562wrk2qqk19iiry84nxg20mk4"; - }) - (fetchpatch { - # Fixes compilation with chromaprint >= 1.4 - url = "https://github.com/clementine-player/Clementine/commit/d3ea0c8482dfd3f6264a30cfceb456076d76e6cd.patch"; - sha256 = "1ifrs5aqdzw16jbnf0z1ilir20chdnr9k5n21r99miq9hzjpbh12"; - }) ]; nativeBuildInputs = [ cmake pkgconfig ]; @@ -54,6 +42,8 @@ let protobuf qca2 qjson + qtbase + qtx11extras sqlite taglib ] @@ -71,7 +61,7 @@ let -e 's,libprotobuf.a,protobuf,g' ''; - free = stdenv.mkDerivation { + free = mkDerivation { pname = "clementine-free"; inherit version; inherit src patches nativeBuildInputs postPatch; @@ -79,7 +69,14 @@ let # gst_plugins needed for setup-hooks buildInputs = buildInputs ++ [ makeWrapper ] ++ gst_plugins; - cmakeFlags = [ "-DUSE_SYSTEM_PROJECTM=ON" ]; + preConfigure = '' + rm -rf ext/{,lib}clementine-spotifyblob + ''; + + cmakeFlags = [ + "-DUSE_SYSTEM_PROJECTM=ON" + "-DSPOTIFY_BLOB=OFF" + ]; enableParallelBuilding = true; @@ -100,15 +97,11 @@ let }; # Unfree Spotify blob for Clementine - unfree = stdenv.mkDerivation { + unfree = mkDerivation { pname = "clementine-blob"; inherit version; # Use the same patches and sources as Clementine - inherit src nativeBuildInputs postPatch; - - patches = [ - ./clementine-spotify-blob.patch - ]; + inherit src nativeBuildInputs patches postPatch; buildInputs = buildInputs ++ [ libspotify makeWrapper ]; # Only build and install the Spotify blob