From a2e747664b7005a36a367c8acde256a3a4dfee65 Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Fri, 29 Nov 2024 00:35:00 +0300 Subject: [PATCH 1/4] strawberry: format with nixfmt --- .../applications/audio/strawberry/default.nix | 172 +++++++++--------- 1 file changed, 91 insertions(+), 81 deletions(-) diff --git a/pkgs/applications/audio/strawberry/default.nix b/pkgs/applications/audio/strawberry/default.nix index 58ac8f60ff1c..3e30c90b755c 100644 --- a/pkgs/applications/audio/strawberry/default.nix +++ b/pkgs/applications/audio/strawberry/default.nix @@ -1,41 +1,42 @@ -{ stdenv -, lib -, fetchFromGitHub -, cmake -, pkg-config -, wrapQtAppsHook -, alsa-lib -, boost -, chromaprint -, fftw -, gnutls -, libcdio -, libebur128 -, libmtp -, libpthreadstubs -, libtasn1 -, libXdmcp -, ninja -, pcre -, protobuf -, sqlite -, taglib -, libgpod -, libidn2 -, libpulseaudio -, libselinux -, libsepol -, p11-kit -, util-linux -, qtbase -, qtx11extras ? null # doesn't exist in qt6 -, qttools -, withGstreamer ? true -, glib-networking -, gst_all_1 -, withVlc ? true -, libvlc -, nix-update-script +{ + alsa-lib, + boost, + chromaprint, + cmake, + fetchFromGitHub, + fftw, + glib-networking, + gnutls, + gst_all_1, + lib, + libXdmcp, + libcdio, + libebur128, + libgpod, + libidn2, + libmtp, + libpthreadstubs, + libpulseaudio, + libselinux, + libsepol, + libtasn1, + libvlc, + ninja, + nix-update-script, + p11-kit, + pcre, + pkg-config, + protobuf, + qtbase, + qttools, + qtx11extras ? null, # doesn't exist in qt6 + sqlite, + stdenv, + taglib, + util-linux, + withGstreamer ? true, + withVlc ? true, + wrapQtAppsHook, }: let @@ -60,50 +61,59 @@ stdenv.mkDerivation rec { --replace pictures/strawberry.png pictures/strawberry-grey.png ''; - buildInputs = [ - alsa-lib - boost - chromaprint - fftw - gnutls - libcdio - libebur128 - libidn2 - libmtp - libpthreadstubs - libtasn1 - libXdmcp - pcre - protobuf - sqlite - taglib - qtbase - qtx11extras - ] ++ optionals stdenv.hostPlatform.isLinux [ - libgpod - libpulseaudio - libselinux - libsepol - p11-kit - ] ++ optionals withGstreamer (with gst_all_1; [ - glib-networking - gstreamer - gst-libav - gst-plugins-base - gst-plugins-good - gst-plugins-bad - gst-plugins-ugly - ]) ++ optionals withVlc [ libvlc ]; + buildInputs = + [ + alsa-lib + boost + chromaprint + fftw + gnutls + libXdmcp + libcdio + libebur128 + libidn2 + libmtp + libpthreadstubs + libtasn1 + pcre + protobuf + qtbase + qtx11extras + sqlite + taglib + ] + ++ optionals stdenv.hostPlatform.isLinux [ + libgpod + libpulseaudio + libselinux + libsepol + p11-kit + ] + ++ optionals withGstreamer ( + with gst_all_1; + [ + glib-networking + gst-libav + gst-plugins-bad + gst-plugins-base + gst-plugins-good + gst-plugins-ugly + gstreamer + ] + ) + ++ optionals withVlc [ libvlc ]; - nativeBuildInputs = [ - cmake - ninja - pkg-config - qttools - wrapQtAppsHook - ] ++ optionals stdenv.hostPlatform.isLinux [ - util-linux - ]; + nativeBuildInputs = + [ + cmake + ninja + pkg-config + qttools + wrapQtAppsHook + ] + ++ optionals stdenv.hostPlatform.isLinux [ + util-linux + ]; postInstall = optionalString withGstreamer '' qtWrapperArgs+=( From e3a9c19e86661ce0d5799b20c91a5156eaf34db8 Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Fri, 29 Nov 2024 00:36:03 +0300 Subject: [PATCH 2/4] strawberry: drop strawberry-qt5 in favor of strawberry-qt6 --- nixos/doc/manual/release-notes/rl-2505.section.md | 3 +++ pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 4 +--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2505.section.md b/nixos/doc/manual/release-notes/rl-2505.section.md index be4351684fdb..f51130a227bd 100644 --- a/nixos/doc/manual/release-notes/rl-2505.section.md +++ b/nixos/doc/manual/release-notes/rl-2505.section.md @@ -27,6 +27,9 @@ - `buildGoPackage` has been removed. Use `buildGoModule` instead. See the [Go section in the nixpkgs manual](https://nixos.org/manual/nixpkgs/unstable/#sec-language-go) for details. +- `strawberry` has been updated to 1.2, which drops support for the VLC backend and Qt 5. The `strawberry-qt5` package + and `withGstreamer`/`withVlc` override options have been removed due to this. + - `timescaledb` requires manual upgrade steps. After you run ALTER EXTENSION, you must run [this SQL script](https://github.com/timescale/timescaledb-extras/blob/master/utils/2.15.X-fix_hypertable_foreign_keys.sql). For more details, see the following pull requests [#6797](https://github.com/timescale/timescaledb/pull/6797). PostgreSQL 13 is no longer supported in TimescaleDB v2.16. diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index e4ff2d475eeb..1189328802e1 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1193,6 +1193,7 @@ mapAliases { steam-small = steam; # Added 2024-09-12 steam-run-native = steam-run; # added 2022-02-21 StormLib = stormlib; # Added 2024-01-21 + strawberry-qt5 = throw "strawberry-qt5 has been replaced by strawberry-qt6"; # Added 2024-11-22 sumneko-lua-language-server = lua-language-server; # Added 2023-02-07 sumokoin = throw "sumokoin has been removed as it was abandoned upstream"; # Added 2024-11-23 swiProlog = lib.warn "swiProlog has been renamed to swi-prolog" swi-prolog; # Added 2024-09-07 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7e806f98b32b..ffa8c6f275b1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3228,11 +3228,9 @@ with pkgs; sonobuoy = callPackage ../applications/networking/cluster/sonobuoy { }; - strawberry-qt5 = libsForQt5.callPackage ../applications/audio/strawberry { }; - strawberry-qt6 = qt6Packages.callPackage ../applications/audio/strawberry { }; - strawberry = strawberry-qt5; + strawberry = strawberry-qt6; schleuder = callPackage ../tools/security/schleuder { }; From 10ce0b2de85389ae66966eb2f947b94c23feb683 Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Fri, 29 Nov 2024 00:45:39 +0300 Subject: [PATCH 3/4] strawberry: 1.1.3 -> 1.2.2 VLC backend and Qt 5 build are no longer supported. protobuf is no longer required. Use packaged kdsingleapplication instead of building it from submodule. --- .../applications/audio/strawberry/default.nix | 40 +++++++------------ 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/pkgs/applications/audio/strawberry/default.nix b/pkgs/applications/audio/strawberry/default.nix index 3e30c90b755c..94072c6ae69a 100644 --- a/pkgs/applications/audio/strawberry/default.nix +++ b/pkgs/applications/audio/strawberry/default.nix @@ -8,6 +8,7 @@ glib-networking, gnutls, gst_all_1, + kdsingleapplication, lib, libXdmcp, libcdio, @@ -20,39 +21,33 @@ libselinux, libsepol, libtasn1, - libvlc, ninja, nix-update-script, p11-kit, pcre, pkg-config, - protobuf, qtbase, qttools, - qtx11extras ? null, # doesn't exist in qt6 sqlite, stdenv, taglib, util-linux, - withGstreamer ? true, - withVlc ? true, wrapQtAppsHook, }: let - inherit (lib) optionals optionalString; + inherit (lib) optionals; in stdenv.mkDerivation rec { pname = "strawberry"; - version = "1.1.3"; + version = "1.2.2"; src = fetchFromGitHub { owner = "jonaski"; repo = pname; rev = version; - hash = "sha256-yca1BJWhSUVamqSKfvEzU3xbzdR+kwfSs0pyS08oUR0="; - fetchSubmodules = true; + hash = "sha256-X752GsP2b7rumQHzw52zI7PeE8tdM9Scgl3nHVcpO/s="; }; # the big strawberry shown in the context menu is *very* much in your face, so use the grey version instead @@ -68,6 +63,7 @@ stdenv.mkDerivation rec { chromaprint fftw gnutls + kdsingleapplication libXdmcp libcdio libebur128 @@ -76,9 +72,7 @@ stdenv.mkDerivation rec { libpthreadstubs libtasn1 pcre - protobuf qtbase - qtx11extras sqlite taglib ] @@ -89,19 +83,15 @@ stdenv.mkDerivation rec { libsepol p11-kit ] - ++ optionals withGstreamer ( - with gst_all_1; - [ - glib-networking - gst-libav - gst-plugins-bad - gst-plugins-base - gst-plugins-good - gst-plugins-ugly - gstreamer - ] - ) - ++ optionals withVlc [ libvlc ]; + ++ (with gst_all_1; [ + glib-networking + gst-libav + gst-plugins-bad + gst-plugins-base + gst-plugins-good + gst-plugins-ugly + gstreamer + ]); nativeBuildInputs = [ @@ -115,7 +105,7 @@ stdenv.mkDerivation rec { util-linux ]; - postInstall = optionalString withGstreamer '' + postInstall = '' qtWrapperArgs+=( --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0" --prefix GIO_EXTRA_MODULES : "${glib-networking.out}/lib/gio/modules" From 6f860d8ef6d6d67ea4d82fb4458b7d50ab037d78 Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Sat, 30 Nov 2024 10:51:50 +0300 Subject: [PATCH 4/4] strawberry: drop PCRE dependency While strawberry seems to bundle PCRE2 on MacOS and Windows, it doesn't seem to use it directly. --- pkgs/applications/audio/strawberry/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/applications/audio/strawberry/default.nix b/pkgs/applications/audio/strawberry/default.nix index 94072c6ae69a..bd85eef99f50 100644 --- a/pkgs/applications/audio/strawberry/default.nix +++ b/pkgs/applications/audio/strawberry/default.nix @@ -24,7 +24,6 @@ ninja, nix-update-script, p11-kit, - pcre, pkg-config, qtbase, qttools, @@ -71,7 +70,6 @@ stdenv.mkDerivation rec { libmtp libpthreadstubs libtasn1 - pcre qtbase sqlite taglib