Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 64 lines 1.1 kB view raw
1{ 2 lib, 3 mkDerivation, 4 fetchFromGitHub, 5 cmake, 6 pkg-config, 7 airspy, 8 rtl-sdr, 9 fdk_aac, 10 faad2, 11 fftwFloat, 12 libsndfile, 13 libsamplerate, 14 portaudio, 15 qtmultimedia, 16 qwt, 17}: 18 19mkDerivation rec { 20 pname = "guglielmo"; 21 version = "0.5"; 22 23 src = fetchFromGitHub { 24 owner = "marcogrecopriolo"; 25 repo = pname; 26 rev = "v${version}"; 27 sha256 = "sha256-W+KTwtxbTDrtONmkw95gXT28n3k9KS364WOzLLJdGLM="; 28 }; 29 30 postInstall = '' 31 mv $out/linux-bin $out/bin 32 ''; 33 34 nativeBuildInputs = [ 35 cmake 36 pkg-config 37 ]; 38 buildInputs = [ 39 airspy 40 rtl-sdr 41 fdk_aac 42 faad2 43 fftwFloat 44 libsndfile 45 libsamplerate 46 portaudio 47 qtmultimedia 48 qwt 49 ]; 50 51 postFixup = '' 52 # guglielmo opens SDR libraries at run time 53 patchelf --add-rpath "${airspy}/lib:${rtl-sdr}/lib" $out/bin/.guglielmo-wrapped 54 ''; 55 56 meta = with lib; { 57 description = "Qt based FM / Dab tuner"; 58 mainProgram = "guglielmo"; 59 homepage = "https://github.com/marcogrecopriolo/guglielmo"; 60 license = licenses.gpl2Only; 61 maintainers = [ maintainers.markuskowa ]; 62 platforms = platforms.linux; 63 }; 64}