1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 pkg-config,
7 which,
8 cmake,
9 fftwSinglePrec,
10 libsamplerate,
11 qtbase,
12}:
13
14stdenv.mkDerivation {
15 pname = "liblastfm-unstable";
16 version = "2019-08-23";
17
18 src = fetchFromGitHub {
19 owner = "lastfm";
20 repo = "liblastfm";
21 rev = "2ce2bfe1879227af8ffafddb82b218faff813db9";
22 sha256 = "1crih9xxf3rb109aqw12bjqv47z28lvlk2dpvyym5shf82nz6yd0";
23 };
24
25 patches = [
26 (fetchpatch {
27 url = "https://github.com/lastfm/liblastfm/commit/9c5d072b55f2863310e40291677e6397e9cbc3c2.patch";
28 name = "0001-Remove-deprecated-staging-server-and-fix-test-for-QT5-at-Ubuntu-19.10.patch";
29 sha256 = "04r14prydxshjgfws3pjajjmp2msszhjjs1mjh8s66yg29vq620l";
30 })
31 ];
32
33 nativeBuildInputs = [
34 pkg-config
35 which
36 cmake
37 ];
38 buildInputs = [
39 fftwSinglePrec
40 libsamplerate
41 qtbase
42 ];
43
44 env.NIX_CFLAGS_COMPILE = lib.optionalString (
45 stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11"
46 ) "-std=c++11";
47
48 dontWrapQtApps = true;
49
50 meta = with lib; {
51 homepage = "https://github.com/lastfm/liblastfm";
52 description = "Official LastFM library";
53 platforms = platforms.unix;
54 maintainers = [ ];
55 license = licenses.gpl3;
56 };
57}