nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "libmt32emu";
10 version = "2.7.2";
11
12 src = fetchFromGitHub {
13 owner = "munt";
14 repo = "munt";
15 rev = "${pname}_${lib.replaceStrings [ "." ] [ "_" ] version}";
16 sha256 = "sha256-wXIvdGoup/AOQggkeXvtbi3pXhyKUKWmyt/ZbGzufds=";
17 };
18
19 outputs = [
20 "out"
21 "dev"
22 ];
23
24 nativeBuildInputs = [
25 cmake
26 ];
27
28 dontFixCmake = true;
29
30 cmakeFlags = [
31 "-Dmunt_WITH_MT32EMU_SMF2WAV=OFF"
32 "-Dmunt_WITH_MT32EMU_QT=OFF"
33 ];
34
35 postFixup = ''
36 substituteInPlace "$dev"/lib/pkgconfig/mt32emu.pc \
37 --replace '=''${exec_prefix}//' '=/' \
38 --replace "$dev/$dev/" "$dev/"
39 '';
40
41 meta = with lib; {
42 homepage = "https://munt.sourceforge.net/";
43 description = "Library to emulate Roland MT-32, CM-32L, CM-64 and LAPC-I devices";
44 license = with licenses; [ lgpl21Plus ];
45 maintainers = with maintainers; [ OPNA2608 ];
46 platforms = platforms.unix; # Not tested on ReactOS yet :)
47 };
48}