12 stdenv.mkDerivation rec {
14 version = "unstable-2021-12-24";
16 src = fetchFromGitHub {
17 owner = "vampirefrog";
19 rev = "0de6703b3373eb5bf19fd3deaae889286f330c21";
20 sha256 = "0sr6klkmjd2hd2kyb9y0x986d6lsy8bziizfc6cmhkqcq92fh45c";
25 # Don't hardcode compilers
26 sed -i -e '/CC=/d' -e '/CXX=/d' Makefile
27 '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
28 # Remove Linux-only program & its dependencies
29 sed -i -e '/PROGS/ s/fmtoy_jack//' Makefile
30 substituteInPlace Makefile \
31 --replace '$(shell pkg-config alsa jack --cflags)' ""
36 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
42 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
47 enableParallelBuilding = true;
52 for prog in $(grep 'PROGS=' Makefile | cut -d= -f2-); do
53 install -Dm755 $prog $out/bin/$prog
59 passthru.updateScript = unstableGitUpdater {
60 url = "https://github.com/vampirefrog/fmtoy.git";
64 homepage = "https://github.com/vampirefrog/fmtoy";
65 description = "Tools for FM voices for Yamaha YM chips (OPL, OPM and OPN series)";
66 # Unknown license situation
67 # https://github.com/vampirefrog/fmtoy/issues/1
68 license = licenses.unfree;
69 maintainers = with maintainers; [ OPNA2608 ];
70 platforms = platforms.all;