summary refs log tree commit diff
path: root/pkgs/applications/audio/spotifyd
diff options
context:
space:
mode:
authorAnders Lundstedt <git@anderslundstedt.se>2019-07-20 19:38:53 +0200
committerAnders Lundstedt <git@anderslundstedt.se>2019-07-21 00:58:19 +0200
commite6dd87c438ede050a78b7eeb1539be1af03f4479 (patch)
tree97df35adcceb589682762d9fa1e1e3cc14416073 /pkgs/applications/audio/spotifyd
parentb930e1cf20f5d120822476aaa95d8da67d7ccfee (diff)
downloadnixpkgs-e6dd87c438ede050a78b7eeb1539be1af03f4479.tar
nixpkgs-e6dd87c438ede050a78b7eeb1539be1af03f4479.tar.gz
nixpkgs-e6dd87c438ede050a78b7eeb1539be1af03f4479.tar.bz2
nixpkgs-e6dd87c438ede050a78b7eeb1539be1af03f4479.tar.lz
nixpkgs-e6dd87c438ede050a78b7eeb1539be1af03f4479.tar.xz
nixpkgs-e6dd87c438ede050a78b7eeb1539be1af03f4479.tar.zst
nixpkgs-e6dd87c438ede050a78b7eeb1539be1af03f4479.zip
spotifyd: init at 0.2.11
Diffstat (limited to 'pkgs/applications/audio/spotifyd')
-rw-r--r--pkgs/applications/audio/spotifyd/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/applications/audio/spotifyd/default.nix b/pkgs/applications/audio/spotifyd/default.nix
new file mode 100644
index 00000000000..5f064cf4e88
--- /dev/null
+++ b/pkgs/applications/audio/spotifyd/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl
+, withALSA ? true, alsaLib ? null
+, withPulseAudio ? false, libpulseaudio ? null
+, withPortAudio ? false, portaudio ? null
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "spotifyd";
+  version = "0.2.11";
+
+  src = fetchFromGitHub {
+    owner = "Spotifyd";
+    repo = "spotifyd";
+    rev = "${version}";
+    sha256 = "1iybk9xrrvhrcl2xl5r2xhyn1ydhrgwnnb8ldhsw5c16b32z03q1";
+  };
+
+  cargoSha256 = "0879p1h32259schmy8j3xnwpw3sw80f8mrj8s6b5aihi3yyzz521";
+
+  cargoBuildFlags = [
+    "--no-default-features"
+    "--features"
+    "${stdenv.lib.optionalString withALSA "alsa_backend,"}${stdenv.lib.optionalString withPulseAudio "pulseaudio_backend,"}${stdenv.lib.optionalString withPortAudio "portaudio_backend,"}"
+  ];
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [ openssl ]
+    ++ stdenv.lib.optional withALSA alsaLib
+    ++ stdenv.lib.optional withPulseAudio libpulseaudio
+    ++ stdenv.lib.optional withPortAudio portaudio;
+
+  meta = with stdenv.lib; {
+    description = "An open source Spotify client running as a UNIX daemon";
+    homepage = "https://github.com/Spotifyd/spotifyd";
+    license = with licenses; [ gpl3 ];
+    maintainers = [ maintainers.anderslundstedt ];
+    platforms = platforms.unix;
+  };
+}