From 7828cfd939a4521ad8a6019ee0476d41d921bf14 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 25 Jun 2024 20:39:30 -0400 Subject: [PATCH 1/5] spot: migrate to by-name --- .../audio/spot/default.nix => by-name/sp/spot/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/audio/spot/default.nix => by-name/sp/spot/package.nix} (100%) diff --git a/pkgs/applications/audio/spot/default.nix b/pkgs/by-name/sp/spot/package.nix similarity index 100% rename from pkgs/applications/audio/spot/default.nix rename to pkgs/by-name/sp/spot/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b24e0955a7c5..c6504895a46e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31522,8 +31522,6 @@ with pkgs; spectrwm = callPackage ../applications/window-managers/spectrwm { }; - spot = callPackage ../applications/audio/spot { }; - spotify-cli-linux = callPackage ../applications/audio/spotify-cli-linux { }; spotifyd = callPackage ../applications/audio/spotifyd { From dcd96f460247de8ef79797b11c0f009a27638f70 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 25 Jun 2024 20:39:47 -0400 Subject: [PATCH 2/5] spot: format with nixfmt --- pkgs/by-name/sp/spot/package.nix | 45 ++++++++++++++++---------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/sp/spot/package.nix b/pkgs/by-name/sp/spot/package.nix index 183aae58d167..ddf9a1673caf 100644 --- a/pkgs/by-name/sp/spot/package.nix +++ b/pkgs/by-name/sp/spot/package.nix @@ -1,25 +1,26 @@ -{ lib -, stdenv -, fetchFromGitHub -, nix-update-script -, meson -, ninja -, gettext -, desktop-file-utils -, cargo -, rustPlatform -, rustc -, pkg-config -, glib -, libadwaita -, libhandy -, gtk4 -, openssl -, alsa-lib -, libpulseaudio -, wrapGAppsHook4 -, blueprint-compiler -, gst_all_1 +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + meson, + ninja, + gettext, + desktop-file-utils, + cargo, + rustPlatform, + rustc, + pkg-config, + glib, + libadwaita, + libhandy, + gtk4, + openssl, + alsa-lib, + libpulseaudio, + wrapGAppsHook4, + blueprint-compiler, + gst_all_1, }: stdenv.mkDerivation rec { From 4a67d03c1d72d576d78efb5e00127ecd02d82765 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 25 Jun 2024 20:40:00 -0400 Subject: [PATCH 3/5] spot: adopt --- pkgs/by-name/sp/spot/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/sp/spot/package.nix b/pkgs/by-name/sp/spot/package.nix index ddf9a1673caf..77cabcc19634 100644 --- a/pkgs/by-name/sp/spot/package.nix +++ b/pkgs/by-name/sp/spot/package.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { mainProgram = "spot"; homepage = "https://github.com/xou816/spot"; license = licenses.mit; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ getchoo ]; platforms = platforms.linux; }; } From 1ca3d78e13b9c88790c7eae9516c0f3c0f9ff000 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 25 Jun 2024 20:41:36 -0400 Subject: [PATCH 4/5] spot: refactor https://github.com/NixOS/nixpkgs/issues/208242 --- pkgs/by-name/sp/spot/package.nix | 61 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/pkgs/by-name/sp/spot/package.nix b/pkgs/by-name/sp/spot/package.nix index 77cabcc19634..2dcf3c090ef4 100644 --- a/pkgs/by-name/sp/spot/package.nix +++ b/pkgs/by-name/sp/spot/package.nix @@ -2,25 +2,25 @@ lib, stdenv, fetchFromGitHub, - nix-update-script, + rustPlatform, + cargo, + rustc, + alsa-lib, + blueprint-compiler, + desktop-file-utils, + gettext, + glib, + gst_all_1, + gtk4, + libadwaita, + libpulseaudio, + libhandy, meson, ninja, - gettext, - desktop-file-utils, - cargo, - rustPlatform, - rustc, - pkg-config, - glib, - libadwaita, - libhandy, - gtk4, + nix-update-script, openssl, - alsa-lib, - libpulseaudio, + pkg-config, wrapGAppsHook4, - blueprint-compiler, - gst_all_1, }: stdenv.mkDerivation rec { @@ -41,30 +41,30 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ + cargo + rustc + blueprint-compiler + desktop-file-utils gettext + gtk4 # for gtk-update-icon-cache + glib # for glib-compile-schemas meson ninja pkg-config - gtk4 # for gtk-update-icon-cache - glib # for glib-compile-schemas - desktop-file-utils - cargo rustPlatform.cargoSetupHook - rustc wrapGAppsHook4 - blueprint-compiler ]; buildInputs = [ + alsa-lib glib + gst_all_1.gst-plugins-base + gst_all_1.gstreamer gtk4 libadwaita libhandy - openssl - alsa-lib libpulseaudio - gst_all_1.gst-plugins-base - gst_all_1.gstreamer + openssl ]; # https://github.com/xou816/spot/issues/313 @@ -74,12 +74,13 @@ stdenv.mkDerivation rec { updateScript = nix-update-script { }; }; - meta = with lib; { + meta = { description = "Native Spotify client for the GNOME desktop"; - mainProgram = "spot"; homepage = "https://github.com/xou816/spot"; - license = licenses.mit; - maintainers = with maintainers; [ getchoo ]; - platforms = platforms.linux; + changelog = "https://github.com/xou816/spot/releases/tag/${src.rev}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ getchoo ]; + mainProgram = "spot"; + platforms = lib.platforms.linux; }; } From 1d9b7ecaed4af5318711eebcdf4d8c17e65784b4 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 25 Jun 2024 20:46:09 -0400 Subject: [PATCH 5/5] spot: add `appstream-glib` to nativeBuildInputs this is required while building to validate appstream information --- pkgs/by-name/sp/spot/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/sp/spot/package.nix b/pkgs/by-name/sp/spot/package.nix index 2dcf3c090ef4..8415da2f07a3 100644 --- a/pkgs/by-name/sp/spot/package.nix +++ b/pkgs/by-name/sp/spot/package.nix @@ -6,6 +6,7 @@ cargo, rustc, alsa-lib, + appstream-glib, blueprint-compiler, desktop-file-utils, gettext, @@ -43,6 +44,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cargo rustc + appstream-glib blueprint-compiler desktop-file-utils gettext