nixpkgs/pkgs/by-name/fm/fmtoy/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
1.3 KiB
Nix
Raw Normal View History

2022-03-02 22:16:03 +00:00
{ stdenv
, lib
, fetchFromGitHub
, unstableGitUpdater
, alsa-lib
, libfmvoice
2022-03-02 22:16:03 +00:00
, libjack2
, pkg-config
, zlib
2022-03-02 22:16:03 +00:00
}:
stdenv.mkDerivation (finalAttrs: {
2022-03-02 22:16:03 +00:00
pname = "fmtoy";
version = "0-unstable-2024-04-18";
2022-03-02 22:16:03 +00:00
src = fetchFromGitHub {
owner = "vampirefrog";
repo = "fmtoy";
rev = "aca005c770724f21c8a91dc6a482738871e78c9f";
hash = "sha256-vrd7Eg3Bh8ll2yCfD1rAJpotEe+Zq+JuF4VMhiYsbDw=";
2022-03-02 22:16:03 +00:00
};
postPatch = ''
rmdir libfmvoice
cp --no-preserve=all -r ${libfmvoice.src} libfmvoice
2022-03-02 22:16:03 +00:00
substituteInPlace Makefile \
--replace 'pkg-config' "$PKG_CONFIG"
2022-03-02 22:16:03 +00:00
'';
strictDeps = true;
2022-03-02 22:16:03 +00:00
nativeBuildInputs = [
pkg-config
];
buildInputs = [
alsa-lib
libjack2
zlib
2022-03-02 22:16:03 +00:00
];
enableParallelBuilding = true;
buildFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"CXX=${stdenv.cc.targetPrefix}c++"
];
2022-03-02 22:16:03 +00:00
installPhase = ''
runHook preInstall
install -Dm755 fmtoy_jack $out/bin/fmtoy_jack
2022-03-02 22:16:03 +00:00
runHook postInstall
'';
passthru = {
updateScript = unstableGitUpdater { };
2022-03-02 22:16:03 +00:00
};
meta = with lib; {
description = "FM synthesiser based on emulated Yamaha YM chips (OPL, OPM and OPN series)";
2022-03-02 22:16:03 +00:00
homepage = "https://github.com/vampirefrog/fmtoy";
license = licenses.gpl3Only;
mainProgram = "fmtoy_jack";
2022-03-02 22:16:03 +00:00
maintainers = with maintainers; [ OPNA2608 ];
platforms = platforms.linux;
2022-03-02 22:16:03 +00:00
};
})