git.iko.soy/typeable/nixpkgs
on master help sign in
librespot: init at 0.1.1
commit6580c59352f8c2cffcd64c5a78f5f3d0d920648f authorBenno Fünfstück <benno.fuenfstueck@gmail.com> dateThu 18 Jun 2020, 14:27 (6 years ago) parent5a345d6
2 files changed+55
pkgs/applications/audio/librespot/default.nix+49 pkgs/top-level/all-packages.nix+6
pkgs/applications/audio/librespot/default.nixnew file+49
@@ -0,0 +1,49 @@
1+{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl
2+, withRodio ? true
3+, withALSA ? true, alsaLib ? null
4+, withPulseAudio ? false, libpulseaudio ? null
5+, withPortAudio ? false, portaudio ? null
6+}:
7+
8+rustPlatform.buildRustPackage rec {
9+ pname = "librespot";
10+ version = "0.1.1";
11+
12+ src = fetchFromGitHub {
13+ owner = "librespot-org";
14+ repo = "librespot";
15+ rev = "v${version}";
16+ sha256 = "1sdbjv8w2mfpv82rx5iy4s532l1767vmlrg9d8khnvh8vrm2lshy";
17+ };
18+
19+ cargoSha256 = "0zi50imjvalwl6pxl35qrmbg74j5xdfaws8v69am4g9agbfjvlms";
20+
21+ cargoBuildFlags = with stdenv.lib; [
22+ "--no-default-features"
23+ "--features"
24+ (concatStringsSep "," (filter (x: x != "") [
25+ (optionalString withRodio "rodio-backend")
26+ (optionalString withALSA "alsa-backend")
27+ (optionalString withPulseAudio "pulseaudio-backend")
28+ (optionalString withPortAudio "portaudio-backend")
29+
30+ ]))
31+ ];
32+
33+ nativeBuildInputs = [ pkgconfig ];
34+
35+ buildInputs = [ openssl ]
36+ ++ stdenv.lib.optional withALSA alsaLib
37+ ++ stdenv.lib.optional withPulseAudio libpulseaudio
38+ ++ stdenv.lib.optional withPortAudio portaudio;
39+
40+ doCheck = false;
41+
42+ meta = with stdenv.lib; {
43+ description = "Open Source Spotify client library and playback daemon";
44+ homepage = "https://github.com/librespot-org/librespot";
45+ license = with licenses; [ mit ];
46+ maintainers = with maintainers; [ bennofs ];
47+ platforms = platforms.unix;
48+ };
49+}
pkgs/top-level/all-packages.nix+6
@@ -19931,6 +19931,12 @@ in
1993119931
1993219932 libquvi = callPackage ../applications/video/quvi/library.nix { };
1993319933
19934+ librespot = callPackage ../applications/audio/librespot {
19935+ withALSA = stdenv.isLinux;
19936+ withPulseAudio = config.pulseaudio or stdenv.isLinux;
19937+ withPortAudio = stdenv.isDarwin;
19938+ };
19939+
1993419940 linssid = libsForQt5.callPackage ../applications/networking/linssid { };
1993519941
1993619942 lollypop = callPackage ../applications/audio/lollypop { };