Skip to content

Commit 561ed53

Browse files
spotifyd: 0.3.5-unstable-2024-12-27 -> 0.4.0 (#387652)
2 parents 623b612 + b0d5f62 commit 561ed53

File tree

1 file changed

+34
-37
lines changed

1 file changed

+34
-37
lines changed

pkgs/by-name/sp/spotifyd/package.nix

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,77 +2,74 @@
22
lib,
33
stdenv,
44
config,
5-
fetchFromGitHub,
6-
rustPackages,
7-
pkg-config,
8-
openssl,
9-
withALSA ? stdenv.hostPlatform.isLinux,
105
alsa-lib,
11-
withJack ? stdenv.hostPlatform.isLinux,
6+
cmake,
7+
dbus,
8+
fetchFromGitHub,
129
libjack2,
13-
withPulseAudio ? config.pulseaudio or stdenv.hostPlatform.isLinux,
1410
libpulseaudio,
15-
withPortAudio ? stdenv.hostPlatform.isDarwin,
16-
portaudio,
17-
withMpris ? stdenv.hostPlatform.isLinux,
18-
withKeyring ? true,
19-
dbus,
20-
withPipe ? true,
2111
nix-update-script,
12+
openssl,
13+
pkg-config,
14+
portaudio,
15+
rustPlatform,
2216
testers,
23-
spotifyd,
17+
withALSA ? stdenv.hostPlatform.isLinux,
18+
withJack ? stdenv.hostPlatform.isLinux,
19+
withMpris ? stdenv.hostPlatform.isLinux,
20+
withPortAudio ? stdenv.hostPlatform.isDarwin,
21+
withPulseAudio ? config.pulseaudio or stdenv.hostPlatform.isLinux,
2422
}:
2523

26-
rustPackages.rustPlatform.buildRustPackage rec {
24+
rustPlatform.buildRustPackage (finalAttrs: {
2725
pname = "spotifyd";
28-
version = "0.3.5-unstable-2024-12-27";
26+
version = "0.4.0";
2927

3028
src = fetchFromGitHub {
3129
owner = "Spotifyd";
3230
repo = "spotifyd";
33-
rev = "c6e6af449b75225224158aeeef64de485db1139e";
34-
hash = "sha256-0HDrnEeqynb4vtJBnXyItprJkP+ZOAKIBP68Ht9xr2c=";
31+
tag = "v${finalAttrs.version}";
32+
hash = "sha256-YBh5lcHXqYjyo/MjNNxnycY5AXjvlu+2gAzG6gM4Gjc=";
3533
};
3634

3735
useFetchCargoVendor = true;
38-
cargoHash = "sha256-12yil8Xg3xHeOe/oq9O+Cvkgrx1KhmlQ11d9QHCxtsk=";
36+
cargoHash = "sha256-waZ9XNYZ/scyMsNT7bZYqN4Ch4GbuQtwxAYaWTjNZwg=";
3937

40-
nativeBuildInputs = [ pkg-config ];
38+
nativeBuildInputs = [
39+
cmake
40+
pkg-config
41+
rustPlatform.bindgenHook
42+
];
4143

4244
buildInputs =
4345
lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
46+
# The `dbus_mpris` feature works on other platforms, but only requires `dbus` on Linux
47+
++ lib.optional (withMpris && stdenv.hostPlatform.isLinux) dbus
4448
++ lib.optional (withALSA || withJack) alsa-lib
4549
++ lib.optional withJack libjack2
4650
++ lib.optional withPulseAudio libpulseaudio
47-
++ lib.optional withPortAudio portaudio
48-
# The `dbus_keying` feature works on other platforms, but only requires
49-
# `dbus` on Linux
50-
++ lib.optional ((withMpris || withKeyring) && stdenv.hostPlatform.isLinux) dbus;
51+
++ lib.optional withPortAudio portaudio;
52+
53+
# `aws-lc-sys` fails with this enabled
54+
hardeningDisable = [ "strictoverflow" ];
5155

5256
buildNoDefaultFeatures = true;
5357
buildFeatures =
5458
lib.optional withALSA "alsa_backend"
5559
++ lib.optional withJack "rodiojack_backend"
56-
++ lib.optional withPulseAudio "pulseaudio_backend"
57-
++ lib.optional withPortAudio "portaudio_backend"
5860
++ lib.optional withMpris "dbus_mpris"
59-
++ lib.optional withPipe "pipe_backend"
60-
++ lib.optional withKeyring "dbus_keyring";
61-
62-
doCheck = false;
61+
++ lib.optional withPortAudio "portaudio_backend"
62+
++ lib.optional withPulseAudio "pulseaudio_backend";
6363

6464
passthru = {
65-
tests.version = testers.testVersion {
66-
package = spotifyd;
67-
version = builtins.head (lib.splitString "-" version);
68-
};
69-
updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
65+
tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
66+
updateScript = nix-update-script { };
7067
};
7168

7269
meta = {
7370
description = "Open source Spotify client running as a UNIX daemon";
7471
homepage = "https://spotifyd.rs/";
75-
changelog = "https://github.com/Spotifyd/spotifyd/blob/${src.rev}/CHANGELOG.md";
72+
changelog = "https://github.com/Spotifyd/spotifyd/releases/tag/${toString finalAttrs.src.tag}";
7673
license = lib.licenses.gpl3Plus;
7774
maintainers = with lib.maintainers; [
7875
anderslundstedt
@@ -82,4 +79,4 @@ rustPackages.rustPlatform.buildRustPackage rec {
8279
platforms = lib.platforms.unix;
8380
mainProgram = "spotifyd";
8481
};
85-
}
82+
})

0 commit comments

Comments
 (0)