nixpkgs-suyu/pkgs/applications/audio/munt/default.nix

52 lines
1.3 KiB
Nix
Raw Normal View History

2021-06-12 10:30:50 +02:00
{ lib
, mkDerivation
, stdenv
, fetchFromGitHub
, makeDesktopItem
, cmake
, pkg-config
, qtbase
, glib
, alsa-lib
, withJack ? stdenv.hostPlatform.isUnix, jack
}:
2019-05-04 15:06:44 +02:00
let
2021-06-12 10:30:50 +02:00
mainProgram = "mt32emu-qt";
in
mkDerivation rec {
2019-05-04 15:06:44 +02:00
pname = "munt";
2021-06-12 10:30:50 +02:00
version = "2.5.0";
2019-05-04 15:06:44 +02:00
src = fetchFromGitHub {
owner = pname;
repo = pname;
2021-06-12 10:30:50 +02:00
rev = "munt_${lib.replaceChars [ "." ] [ "_" ] version}";
sha256 = "1lknq2a72gv1ddhzr7f967wpa12lh805jj4gjacdnamgrc1h22yn";
2019-05-04 15:06:44 +02:00
};
dontFixCmake = true;
2021-06-12 10:30:50 +02:00
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ qtbase glib ]
++ lib.optional stdenv.hostPlatform.isLinux alsa-lib
++ lib.optional withJack jack;
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir $out/Applications
mv $out/bin/${mainProgram}.app $out/Applications/
wrapQtApp $out/Applications/${mainProgram}.app/Contents/MacOS/${mainProgram}
ln -s $out/{Applications/${mainProgram}.app/Contents/MacOS,bin}/${mainProgram}
'';
2019-05-04 15:06:44 +02:00
meta = with lib; {
2021-06-12 10:30:50 +02:00
inherit mainProgram;
2019-05-04 15:06:44 +02:00
description = "Multi-platform software synthesiser emulating Roland MT-32, CM-32L, CM-64 and LAPC-I devices";
homepage = "http://munt.sourceforge.net/";
license = with licenses; [ lgpl21 gpl3 ];
2021-06-12 10:30:50 +02:00
platforms = platforms.all;
maintainers = with maintainers; [ OPNA2608 ];
2019-05-04 15:06:44 +02:00
};
}