Merge pull request #329041 from kira-bruneau/zynaddsubfx

zynaddsubfx: hardcode system installed banks & presets
This commit is contained in:
Peder Bergebakken Sundt 2024-07-27 19:07:39 +02:00 committed by GitHub
commit c79442c70e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,7 @@
, stdenv
, fetchFromGitHub
, callPackage
, fetchpatch
# Required build tools
, cmake
@ -69,9 +70,16 @@ in stdenv.mkDerivation rec {
outputs = [ "out" "doc" ];
patches = [
# Hardcode system installed banks & presets
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/zynaddsubfx/zynaddsubfx/pull/295.patch";
hash = "sha256-UN62i9/JBs7uWTmHDKk3lkAxUXsVmIs6+6avOcL1NBg=";
})
];
postPatch = ''
patchShebangs rtosc/test/test-port-checker.rb src/Tests/check-ports.rb
substituteInPlace src/Misc/Config.cpp --replace /usr $out
'';
nativeBuildInputs = [ cmake makeWrapper pkg-config ];
@ -87,7 +95,11 @@ in stdenv.mkDerivation rec {
++ lib.optionals (guiModule == "ntk") [ ntk cairo libXpm ]
++ lib.optionals (guiModule == "zest") [ libGL libX11 ];
cmakeFlags = [ "-DGuiModule=${guiModule}" ]
cmakeFlags =
[
"-DGuiModule=${guiModule}"
"-DZYN_DATADIR=${placeholder "out"}/share/zynaddsubfx"
]
# OSS library is included in glibc.
# Must explicitly disable if support is not wanted.
++ lib.optional (!ossSupport) "-DOssEnable=OFF"