2021-05-28 09:39:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nix-update-script
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, gettext
|
|
|
|
, python3
|
|
|
|
, desktop-file-utils
|
2023-05-24 13:37:59 +00:00
|
|
|
, cargo
|
2021-05-28 09:39:13 +00:00
|
|
|
, rustPlatform
|
2023-05-24 13:37:59 +00:00
|
|
|
, rustc
|
2021-05-28 09:39:13 +00:00
|
|
|
, pkg-config
|
|
|
|
, glib
|
2021-10-01 09:20:50 +00:00
|
|
|
, libadwaita
|
2021-05-28 09:39:13 +00:00
|
|
|
, libhandy
|
2021-10-01 09:20:50 +00:00
|
|
|
, gtk4
|
2021-05-28 09:39:13 +00:00
|
|
|
, openssl
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib
|
2021-05-28 09:39:13 +00:00
|
|
|
, libpulseaudio
|
2022-10-21 18:38:19 +00:00
|
|
|
, wrapGAppsHook4
|
2021-05-28 09:39:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "spot";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "0.4.0";
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xou816";
|
|
|
|
repo = "spot";
|
|
|
|
rev = version;
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-K6wGWhAUUGsbE4O+z0TmJcJyGarvHgZteY527jfAa90=";
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-eM2XLumn4dr2YtyUzBZJADlqdexc1iOaNJUudMlfSUc=";
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gettext
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
python3 # for meson postinstall script
|
2021-10-01 09:20:50 +00:00
|
|
|
gtk4 # for gtk-update-icon-cache
|
2021-05-28 09:39:13 +00:00
|
|
|
glib # for glib-compile-schemas
|
|
|
|
desktop-file-utils
|
2023-05-24 13:37:59 +00:00
|
|
|
cargo
|
2021-05-28 09:39:13 +00:00
|
|
|
rustPlatform.cargoSetupHook
|
2023-05-24 13:37:59 +00:00
|
|
|
rustc
|
2022-10-21 18:38:19 +00:00
|
|
|
wrapGAppsHook4
|
2021-05-28 09:39:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
2021-10-01 09:20:50 +00:00
|
|
|
gtk4
|
|
|
|
libadwaita
|
2021-05-28 09:39:13 +00:00
|
|
|
libhandy
|
|
|
|
openssl
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2021-05-28 09:39:13 +00:00
|
|
|
libpulseaudio
|
|
|
|
];
|
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
# https://github.com/xou816/spot/issues/313
|
|
|
|
mesonBuildType = "release";
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
chmod +x build-aux/cargo.sh
|
|
|
|
patchShebangs build-aux/cargo.sh build-aux/meson/postinstall.py
|
2022-10-21 18:38:19 +00:00
|
|
|
substituteInPlace build-aux/meson/postinstall.py \
|
|
|
|
--replace gtk-update-icon-cache gtk4-update-icon-cache
|
2021-05-28 09:39:13 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Native Spotify client for the GNOME desktop";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "spot";
|
2021-05-28 09:39:13 +00:00
|
|
|
homepage = "https://github.com/xou816/spot";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-08-21 13:32:41 +00:00
|
|
|
platforms = platforms.linux;
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
}
|