3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/audio/grandorgue/default.nix

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

58 lines
1.9 KiB
Nix
Raw Normal View History

2022-10-15 18:09:35 +01:00
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, fftwFloat, alsa-lib
, zlib, wavpack, wxGTK32, udev, jackaudioSupport ? false, libjack2
, imagemagick, libicns, makeWrapper, Cocoa
2020-01-03 23:25:29 +00:00
, includeDemo ? true }:
stdenv.mkDerivation rec {
pname = "grandorgue";
2023-03-02 20:13:19 +00:00
version = "3.10.1-1";
2022-10-15 18:09:35 +01:00
src = fetchFromGitHub {
owner = "GrandOrgue";
repo = pname;
rev = version;
fetchSubmodules = true;
2023-03-02 20:13:19 +00:00
sha256 = "sha256-QuOHeEgDOXvNFMfMoq0GOnmHKyMG1S8y1lgO9heMk3I=";
2020-01-03 23:25:29 +00:00
};
2022-10-15 18:09:35 +01:00
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 ];
2020-01-03 23:25:29 +00:00
2022-10-15 18:09:35 +01:00
buildInputs = [ fftwFloat zlib wavpack wxGTK32 ]
++ lib.optionals stdenv.isLinux [ alsa-lib udev ]
++ lib.optionals stdenv.isDarwin [ Cocoa ]
2020-01-03 23:25:29 +00:00
++ lib.optional jackaudioSupport libjack2;
cmakeFlags = lib.optionals (!jackaudioSupport) [
2020-01-03 23:25:29 +00:00
"-DRTAUDIO_USE_JACK=OFF"
"-DRTMIDI_USE_JACK=OFF"
2022-10-15 18:09:35 +01:00
"-DGO_USE_JACK=OFF"
"-DINSTALL_DEPEND=OFF"
2020-01-03 23:25:29 +00:00
] ++ lib.optional (!includeDemo) "-DINSTALL_DEMO=OFF";
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DTARGET_OS_IPHONE=0";
2022-10-15 18:09:35 +01:00
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
'';
2020-01-03 23:25:29 +00:00
meta = {
description = "Virtual Pipe Organ Software";
homepage = "https://github.com/GrandOrgue/grandorgue";
license = lib.licenses.gpl2Plus;
2022-10-15 18:09:35 +01:00
platforms = lib.platforms.unix;
2021-01-15 13:21:58 +00:00
maintainers = [ lib.maintainers.puzzlewolf ];
2020-01-03 23:25:29 +00:00
};
}