@@ -0,0 +1,55 @@
1+{ lib, mkDerivation, fetchFromGitHub, cmake, pkg-config
2+, airspy
3+, librtlsdr
4+, fdk_aac
5+, faad2
6+, fftwFloat
7+, libsndfile
8+, libsamplerate
9+, portaudio
10+, qtmultimedia
11+, qwt
12+} :
13+
14+mkDerivation rec {
15+ pname = "guglielmo";
16+ version = "0.3";
17+
18+ src = fetchFromGitHub {
19+ owner = "marcogrecopriolo";
20+ repo = pname;
21+ rev = "v${version}";
22+ sha256 = "0s1iz9s0k897jayiwl3yr9ylpclw6bzcpmzhxqn0mkd7jhgfl4vx";
23+ };
24+
25+ postInstall = ''
26+ mv $out/linux-bin $out/bin
27+ '';
28+
29+ nativeBuildInputs = [ cmake pkg-config ];
30+ buildInputs = [
31+ airspy
32+ librtlsdr
33+ fdk_aac
34+ faad2
35+ fftwFloat
36+ libsndfile
37+ libsamplerate
38+ portaudio
39+ qtmultimedia
40+ qwt
41+ ];
42+
43+ postFixup = ''
44+ # guglielmo opens SDR libraries at run time
45+ patchelf --add-rpath "${airspy}/lib:${librtlsdr}/lib" $out/bin/.guglielmo-wrapped
46+ '';
47+
48+ meta = with lib; {
49+ description = "Qt based FM / Dab tuner";
50+ homepage = "https://github.com/marcogrecopriolo/guglielmo";
51+ license = licenses.gpl2Only;
52+ maintainers = [ maintainers.markuskowa ];
53+ platforms = platforms.linux;
54+ };
55+}