nixpkgs/pkgs/applications/audio/grandorgue/default.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

86 lines
1.8 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.15.4-1";
src = fetchFromGitHub {
owner = "GrandOrgue";
repo = "grandorgue";
rev = version;
fetchSubmodules = true;
hash = "sha256-9H7YpTtv9Y36Nc0WCyRy/ohpOQ3WVUd9gMahnGhANRc=";
};
patches = [ ./darwin-fixes.patch ];
nativeBuildInputs = [
cmake
pkg-config
imagemagick
libicns
makeWrapper
];
buildInputs =
[
fftwFloat
zlib
wavpack
wxGTK32
yaml-cpp
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
udev
]
++ lib.optionals stdenv.hostPlatform.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";
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/{Applications,bin,lib}
mv $out/GrandOrgue.app $out/Applications/
for lib in $out/Applications/GrandOrgue.app/Contents/Frameworks/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";
};
}