nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 73 lines 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 libsForQt5, 6 fftw, 7 itstool, 8 alsaSupport ? true, 9 alsa-lib ? null, 10 jackSupport ? false, 11 libjack2 ? null, 12 portaudioSupport ? false, 13 portaudio ? null, 14}: 15 16assert alsaSupport -> alsa-lib != null; 17assert jackSupport -> libjack2 != null; 18assert portaudioSupport -> portaudio != null; 19 20stdenv.mkDerivation (finalAttrs: { 21 pname = "fmit"; 22 version = "1.2.14"; 23 24 src = fetchFromGitHub { 25 owner = "gillesdegottex"; 26 repo = "fmit"; 27 rev = "v${finalAttrs.version}"; 28 sha256 = "1q062pfwz2vr9hbfn29fv54ip3jqfd9r99nhpr8w7mn1csy38azx"; 29 }; 30 31 nativeBuildInputs = [ 32 libsForQt5.qmake 33 itstool 34 libsForQt5.wrapQtAppsHook 35 ]; 36 buildInputs = [ 37 fftw 38 libsForQt5.qtbase 39 libsForQt5.qtmultimedia 40 ] 41 ++ lib.optionals alsaSupport [ alsa-lib ] 42 ++ lib.optionals jackSupport [ libjack2 ] 43 ++ lib.optionals portaudioSupport [ portaudio ]; 44 45 postPatch = '' 46 substituteInPlace fmit.pro --replace '$$FMITVERSIONGITPRO' '${finalAttrs.version}' 47 ''; 48 49 qmakeFlags = [ 50 "PREFIXSHORTCUT=${placeholder "out"}" 51 ] 52 ++ lib.optionals alsaSupport [ 53 "CONFIG+=acs_alsa" 54 ] 55 ++ lib.optionals jackSupport [ 56 "CONFIG+=acs_jack" 57 ] 58 ++ lib.optionals portaudioSupport [ 59 "CONFIG+=acs_portaudio" 60 ]; 61 62 meta = { 63 description = "Free Musical Instrument Tuner"; 64 longDescription = '' 65 FMIT is a graphical utility for tuning musical instruments, with error 66 and volume history, and advanced features. 67 ''; 68 homepage = "http://gillesdegottex.github.io/fmit/"; 69 license = lib.licenses.gpl3Plus; 70 maintainers = [ ]; 71 platforms = lib.platforms.linux; 72 }; 73})