16 stdenv.mkDerivation rec {
18 version = "unstable-2023-11-16";
20 src = fetchFromGitHub {
23 rev = "627bfc7b67d4d87253517ba71df2d699a8acdd10";
24 fetchSubmodules = true;
25 hash = "sha256-d/QLRlSfCrrcvzIhwEBKB5chK+XqO/R8xJ5VfagDi4U=";
29 # Actually wants pkgconf but that seems abit broken:
30 # https://github.com/NixOS/nixpkgs/pull/147503#issuecomment-1055943897
31 # Removing a pkgconf-specific option makes it work with pkg-config
32 substituteInPlace libvgm.mak \
33 --replace '--with-path=/usr/local/lib/pkgconfig' ""
35 # Use correct pkg-config
36 substituteInPlace {imgui,libvgm}.mak \
37 --replace 'pkg-config' "\''$(PKG_CONFIG)"
39 # Don't force building tests
40 substituteInPlace Makefile \
41 --replace 'all: $(MMLGUI_BIN) test' 'all: $(MMLGUI_BIN)'
43 # Breaking change in libvgm
44 substituteInPlace src/emu_player.cpp \
45 --replace 'Resmpl_SetVals(&resmpl, 0xff' 'Resmpl_SetVals(&resmpl, RSMODE_LINEAR'
57 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
61 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
74 enableParallelBuilding = true;
76 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
81 install -Dm755 {,$out/}bin/mmlgui
82 mkdir -p $out/share/ctrmml
83 mv ctrmml/sample $out/share/ctrmml/
88 passthru.updateScript = unstableGitUpdater {
89 url = "https://github.com/superctr/mmlgui.git";
93 homepage = "https://github.com/superctr/mmlgui";
94 description = "MML (Music Macro Language) editor and compiler GUI, powered by the ctrmml framework";
95 license = licenses.gpl2Only;
96 maintainers = with maintainers; [ OPNA2608 ];
97 platforms = platforms.all;
98 mainProgram = "mmlgui";