nixpkgs/pkgs/applications/audio/spot/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

86 lines
1.7 KiB
Nix
Raw Normal View History

2021-05-11 15:46:29 +00:00
{ lib
, stdenv
, fetchFromGitHub
, nix-update-script
, meson
, ninja
, gettext
, python3
, desktop-file-utils
, rustPlatform
, pkg-config
, glib
2021-09-28 12:17:04 +00:00
, libadwaita
2021-05-11 15:46:29 +00:00
, libhandy
2021-09-28 12:17:04 +00:00
, gtk4
2021-05-11 15:46:29 +00:00
, openssl
, alsa-lib
2021-05-11 15:46:29 +00:00
, libpulseaudio
2022-10-09 17:53:38 +00:00
, wrapGAppsHook4
2021-05-11 15:46:29 +00:00
}:
stdenv.mkDerivation rec {
pname = "spot";
2022-04-21 19:26:43 +00:00
version = "0.3.3";
2021-05-11 15:46:29 +00:00
src = fetchFromGitHub {
owner = "xou816";
repo = "spot";
rev = version;
2022-04-21 19:26:43 +00:00
hash = "sha256-0iuLZq9FSxaOchxx6LzGwpY8qnOq2APl/qkBYzEV2uw=";
2021-05-11 15:46:29 +00:00
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
2022-04-21 19:26:43 +00:00
hash = "sha256-g46BkrTv6tdrGe/p245O4cBoPjbvyRP7U6hH1Hp4ja0=";
2021-05-11 15:46:29 +00:00
};
nativeBuildInputs = [
gettext
meson
ninja
pkg-config
python3 # for meson postinstall script
2021-09-28 12:17:04 +00:00
gtk4 # for gtk-update-icon-cache
2021-05-11 15:46:29 +00:00
glib # for glib-compile-schemas
desktop-file-utils
rustPlatform.rust.cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
2022-10-09 17:53:38 +00:00
wrapGAppsHook4
2021-05-11 15:46:29 +00:00
];
buildInputs = [
glib
2021-09-28 12:17:04 +00:00
gtk4
libadwaita
2021-05-11 15:46:29 +00:00
libhandy
openssl
alsa-lib
2021-05-11 15:46:29 +00:00
libpulseaudio
];
# https://github.com/xou816/spot/issues/313
mesonBuildType = "release";
2021-05-11 15:46:29 +00:00
postPatch = ''
chmod +x build-aux/cargo.sh
patchShebangs build-aux/cargo.sh build-aux/meson/postinstall.py
2022-10-09 17:53:38 +00:00
substituteInPlace build-aux/meson/postinstall.py \
--replace gtk-update-icon-cache gtk4-update-icon-cache
2021-05-11 15:46:29 +00:00
'';
passthru = {
updateScript = nix-update-script { };
2021-05-11 15:46:29 +00:00
};
meta = with lib; {
description = "Native Spotify client for the GNOME desktop";
homepage = "https://github.com/xou816/spot";
license = licenses.mit;
2022-10-26 18:54:55 +00:00
maintainers = with maintainers; [ tomfitzhenry ];
platforms = platforms.linux;
2021-05-11 15:46:29 +00:00
};
}