nixpkgs/pkgs/applications/audio/spot/default.nix
Tom Fitzhenry cb470d61c3 remove tomfitzhenry@ as maintainer for some packages
Motivation: Over the foreseeable future I'll have less time to do
maintenance, so I'm reducing the set of packages I maintain to just
those that I use.
2023-07-23 12:39:57 +10:00

88 lines
1.6 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, nix-update-script
, meson
, ninja
, gettext
, python3
, desktop-file-utils
, cargo
, rustPlatform
, rustc
, pkg-config
, glib
, libadwaita
, libhandy
, gtk4
, openssl
, alsa-lib
, libpulseaudio
, wrapGAppsHook4
}:
stdenv.mkDerivation rec {
pname = "spot";
version = "0.4.0";
src = fetchFromGitHub {
owner = "xou816";
repo = "spot";
rev = version;
hash = "sha256-K6wGWhAUUGsbE4O+z0TmJcJyGarvHgZteY527jfAa90=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-eM2XLumn4dr2YtyUzBZJADlqdexc1iOaNJUudMlfSUc=";
};
nativeBuildInputs = [
gettext
meson
ninja
pkg-config
python3 # for meson postinstall script
gtk4 # for gtk-update-icon-cache
glib # for glib-compile-schemas
desktop-file-utils
cargo
rustPlatform.cargoSetupHook
rustc
wrapGAppsHook4
];
buildInputs = [
glib
gtk4
libadwaita
libhandy
openssl
alsa-lib
libpulseaudio
];
# https://github.com/xou816/spot/issues/313
mesonBuildType = "release";
postPatch = ''
chmod +x build-aux/cargo.sh
patchShebangs build-aux/cargo.sh build-aux/meson/postinstall.py
substituteInPlace build-aux/meson/postinstall.py \
--replace gtk-update-icon-cache gtk4-update-icon-cache
'';
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Native Spotify client for the GNOME desktop";
homepage = "https://github.com/xou816/spot";
license = licenses.mit;
maintainers = with maintainers; [ ];
platforms = platforms.linux;
};
}