depot/third_party/nixpkgs/pkgs/by-name/fm/fmtoy/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

67 lines
1.3 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, unstableGitUpdater
, alsa-lib
, libjack2
, pkg-config
, zlib
}:
stdenv.mkDerivation (finalAttrs: {
pname = "fmtoy";
version = "0-unstable-2024-06-07";
src = fetchFromGitHub {
owner = "vampirefrog";
repo = "fmtoy";
rev = "1339600e2f5a4357f7a50f5c6ad49f3c7635adec";
hash = "sha256-1kjUPEklZyue/DYn0jSfmXLjF22C+im6klY+S5KCvhc=";
fetchSubmodules = true;
};
postPatch = ''
substituteInPlace Makefile \
--replace 'pkg-config' "$PKG_CONFIG"
'';
strictDeps = true;
nativeBuildInputs = [
pkg-config
];
buildInputs = [
alsa-lib
libjack2
zlib
];
enableParallelBuilding = true;
buildFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"CXX=${stdenv.cc.targetPrefix}c++"
];
installPhase = ''
runHook preInstall
install -Dm755 fmtoy_jack $out/bin/fmtoy_jack
runHook postInstall
'';
passthru = {
updateScript = unstableGitUpdater { };
};
meta = with lib; {
description = "FM synthesiser based on emulated Yamaha YM chips (OPL, OPM and OPN series)";
homepage = "https://github.com/vampirefrog/fmtoy";
license = licenses.gpl3Only;
mainProgram = "fmtoy_jack";
maintainers = with maintainers; [ OPNA2608 ];
platforms = platforms.linux;
};
})