After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev 78e9caf153f5a339bf1d4c000ff6f0a503a369c8
result/bin/apply-formatting $NIXPKGS_PATH
112 lines
2.3 KiB
Nix
112 lines
2.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
pkg-config,
|
|
fmt,
|
|
liblo,
|
|
alsa-lib,
|
|
freetype,
|
|
libX11,
|
|
libXrandr,
|
|
libXinerama,
|
|
libXext,
|
|
libXcursor,
|
|
|
|
# Enabling JACK requires a JACK server at runtime, no fallback mechanism
|
|
withJack ? false,
|
|
jack,
|
|
|
|
type ? "ADL",
|
|
}:
|
|
|
|
assert lib.assertOneOf "type" type [
|
|
"ADL"
|
|
"OPN"
|
|
];
|
|
let
|
|
chip =
|
|
{
|
|
ADL = "OPL3";
|
|
OPN = "OPN2";
|
|
}
|
|
.${type};
|
|
mainProgram = "${type}plug";
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "${lib.strings.toLower type}plug";
|
|
version = "unstable-2021-12-17";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jpcima";
|
|
repo = "ADLplug";
|
|
rev = "a488abedf1783c61cb4f0caa689f1b01bf9aa17d";
|
|
fetchSubmodules = true;
|
|
sha256 = "1a5zw0rglqgc5wq1n0s5bxx7y59dsg6qy02236fakl34bvbk60yz";
|
|
};
|
|
|
|
cmakeFlags = [
|
|
"-DADLplug_CHIP=${chip}"
|
|
"-DADLplug_USE_SYSTEM_FMT=ON"
|
|
"-DADLplug_Jack=${if withJack then "ON" else "OFF"}"
|
|
];
|
|
|
|
NIX_LDFLAGS = toString (
|
|
lib.optionals stdenv.hostPlatform.isDarwin [
|
|
# Framework that JUCE needs which don't get linked properly
|
|
"-framework CoreAudioKit"
|
|
"-framework QuartzCore"
|
|
"-framework AudioToolbox"
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
# JUCE dlopen's these at runtime
|
|
"-lX11"
|
|
"-lXext"
|
|
"-lXcursor"
|
|
"-lXinerama"
|
|
"-lXrandr"
|
|
]
|
|
);
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs =
|
|
[
|
|
fmt
|
|
liblo
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
alsa-lib
|
|
freetype
|
|
libX11
|
|
libXrandr
|
|
libXinerama
|
|
libXext
|
|
libXcursor
|
|
]
|
|
++ lib.optional withJack jack;
|
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
mkdir -p $out/{Applications,Library/Audio/Plug-Ins/{VST,Components}}
|
|
|
|
mv $out/bin/${mainProgram}.app $out/Applications/
|
|
ln -s $out/{Applications/${mainProgram}.app/Contents/MacOS,bin}/${mainProgram}
|
|
|
|
mv vst2/${mainProgram}.vst $out/Library/Audio/Plug-Ins/VST/
|
|
mv au/${mainProgram}.component $out/Library/Audio/Plug-Ins/Components/
|
|
'';
|
|
|
|
meta = with lib; {
|
|
inherit mainProgram;
|
|
description = "${chip} FM Chip Synthesizer";
|
|
homepage = src.meta.homepage;
|
|
license = licenses.boost;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
|
};
|
|
}
|