Unverified Commit 561ed530 authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

spotifyd: 0.3.5-unstable-2024-12-27 -> 0.4.0 (#387652)

parents 623b6129 b0d5f62f
Loading
Loading
Loading
Loading
+34 −37
Original line number Diff line number Diff line
@@ -2,77 +2,74 @@
  lib,
  stdenv,
  config,
  fetchFromGitHub,
  rustPackages,
  pkg-config,
  openssl,
  withALSA ? stdenv.hostPlatform.isLinux,
  alsa-lib,
  withJack ? stdenv.hostPlatform.isLinux,
  cmake,
  dbus,
  fetchFromGitHub,
  libjack2,
  withPulseAudio ? config.pulseaudio or stdenv.hostPlatform.isLinux,
  libpulseaudio,
  withPortAudio ? stdenv.hostPlatform.isDarwin,
  portaudio,
  withMpris ? stdenv.hostPlatform.isLinux,
  withKeyring ? true,
  dbus,
  withPipe ? true,
  nix-update-script,
  openssl,
  pkg-config,
  portaudio,
  rustPlatform,
  testers,
  spotifyd,
  withALSA ? stdenv.hostPlatform.isLinux,
  withJack ? stdenv.hostPlatform.isLinux,
  withMpris ? stdenv.hostPlatform.isLinux,
  withPortAudio ? stdenv.hostPlatform.isDarwin,
  withPulseAudio ? config.pulseaudio or stdenv.hostPlatform.isLinux,
}:

rustPackages.rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "spotifyd";
  version = "0.3.5-unstable-2024-12-27";
  version = "0.4.0";

  src = fetchFromGitHub {
    owner = "Spotifyd";
    repo = "spotifyd";
    rev = "c6e6af449b75225224158aeeef64de485db1139e";
    hash = "sha256-0HDrnEeqynb4vtJBnXyItprJkP+ZOAKIBP68Ht9xr2c=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-YBh5lcHXqYjyo/MjNNxnycY5AXjvlu+2gAzG6gM4Gjc=";
  };

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

  nativeBuildInputs = [ pkg-config ];
  nativeBuildInputs = [
    cmake
    pkg-config
    rustPlatform.bindgenHook
  ];

  buildInputs =
    lib.optionals stdenv.hostPlatform.isLinux [ openssl ]
    # The `dbus_mpris` feature works on other platforms, but only requires `dbus` on Linux
    ++ lib.optional (withMpris && stdenv.hostPlatform.isLinux) dbus
    ++ lib.optional (withALSA || withJack) alsa-lib
    ++ lib.optional withJack libjack2
    ++ lib.optional withPulseAudio libpulseaudio
    ++ lib.optional withPortAudio portaudio
    # The `dbus_keying` feature works on other platforms, but only requires
    # `dbus` on Linux
    ++ lib.optional ((withMpris || withKeyring) && stdenv.hostPlatform.isLinux) dbus;
    ++ lib.optional withPortAudio portaudio;

  # `aws-lc-sys` fails with this enabled
  hardeningDisable = [ "strictoverflow" ];

  buildNoDefaultFeatures = true;
  buildFeatures =
    lib.optional withALSA "alsa_backend"
    ++ lib.optional withJack "rodiojack_backend"
    ++ lib.optional withPulseAudio "pulseaudio_backend"
    ++ lib.optional withPortAudio "portaudio_backend"
    ++ lib.optional withMpris "dbus_mpris"
    ++ lib.optional withPipe "pipe_backend"
    ++ lib.optional withKeyring "dbus_keyring";

  doCheck = false;
    ++ lib.optional withPortAudio "portaudio_backend"
    ++ lib.optional withPulseAudio "pulseaudio_backend";

  passthru = {
    tests.version = testers.testVersion {
      package = spotifyd;
      version = builtins.head (lib.splitString "-" version);
    };
    updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
    tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
    updateScript = nix-update-script { };
  };

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