![Manuel Frischknecht](/assets/img/avatar_default.png)
`grandorgue` failed to build because GCC 13 stopped transitively including some headers like `cstdint` in a lot of situations, leading to many references to types like `uint8_t` in old C++ code breaking unless the respective include statements were included directly in the referring code. This build issue is already fixed upstream, and updating the package to the current release (3.14.0) fixes the build.
75 lines
1.9 KiB
Nix
75 lines
1.9 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, pkg-config
|
|
, fftwFloat
|
|
, alsa-lib
|
|
, zlib
|
|
, wavpack
|
|
, wxGTK32
|
|
, udev
|
|
, jackaudioSupport ? false
|
|
, libjack2
|
|
, imagemagick
|
|
, libicns
|
|
, yaml-cpp
|
|
, makeWrapper
|
|
, Cocoa
|
|
, includeDemo ? true
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "grandorgue";
|
|
version = "3.14.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "GrandOrgue";
|
|
repo = pname;
|
|
rev = version;
|
|
fetchSubmodules = true;
|
|
hash = "sha256-kPz11V2yNmBe80egNLYxh/m2B1nDca3C5sGbEnrkqnw=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace resources/CMakeLists.txt \
|
|
--replace \
|
|
"iconutil -c icns \''${GENERATED_ICONS_DIR}" \
|
|
"png2icns \''${GENERATED_ICONS_DIR}/../GrandOrgue.icns \''${GENERATED_ICONS_DIR}/*{16,32,128,256,512,1024}.png" \
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake pkg-config imagemagick libicns makeWrapper ];
|
|
|
|
buildInputs = [ fftwFloat zlib wavpack wxGTK32 yaml-cpp ]
|
|
++ lib.optionals stdenv.isLinux [ alsa-lib udev ]
|
|
++ lib.optionals stdenv.isDarwin [ Cocoa ]
|
|
++ lib.optional jackaudioSupport libjack2;
|
|
|
|
cmakeFlags = lib.optionals (!jackaudioSupport) [
|
|
"-DRTAUDIO_USE_JACK=OFF"
|
|
"-DRTMIDI_USE_JACK=OFF"
|
|
"-DGO_USE_JACK=OFF"
|
|
"-DINSTALL_DEPEND=OFF"
|
|
] ++ lib.optional (!includeDemo) "-DINSTALL_DEMO=OFF";
|
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DTARGET_OS_IPHONE=0";
|
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
|
mkdir -p $out/{Applications,bin,lib}
|
|
mv $out/GrandOrgue.app $out/Applications/
|
|
for lib in $out/Applications/GrandOrgue.app/Contents/MacOS/lib*; do
|
|
ln -s $lib $out/lib/
|
|
done
|
|
makeWrapper $out/{Applications/GrandOrgue.app/Contents/MacOS,bin}/GrandOrgue
|
|
'';
|
|
|
|
meta = {
|
|
description = "Virtual Pipe Organ Software";
|
|
homepage = "https://github.com/GrandOrgue/grandorgue";
|
|
license = lib.licenses.gpl2Plus;
|
|
platforms = lib.platforms.unix;
|
|
maintainers = [ lib.maintainers.puzzlewolf ];
|
|
mainProgram = "GrandOrgue";
|
|
};
|
|
}
|