btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / sf / sfizz / package.nix
bloba76654fdd9098eca26c340b0638b6a8ce76feb20
1 { lib, stdenv, fetchFromGitHub, libjack2, libsndfile, xorg, freetype
2 , libxkbcommon, cairo, glib, zenity, flac, libogg, libvorbis, libopus, cmake
3 , pango, pkg-config, catch2
4 }:
6 stdenv.mkDerivation rec {
7   pname = "sfizz";
8   version = "1.2.1";
10   src = fetchFromGitHub {
11     owner = "sfztools";
12     repo = pname;
13     rev = version;
14     hash = "sha256-/G9tvJ4AcBSTmo44xDDKf6et1nSn/FV5m27ztDu10kI=";
15     fetchSubmodules = true;
16   };
18   buildInputs = [
19     libjack2
20     libsndfile
21     flac
22     libogg
23     libvorbis
24     libopus
25     xorg.libX11
26     xorg.libxcb
27     xorg.libXau
28     xorg.libXdmcp
29     xorg.xcbutil
30     xorg.xcbutilcursor
31     xorg.xcbutilrenderutil
32     xorg.xcbutilkeysyms
33     xorg.xcbutilimage
34     libxkbcommon
35     cairo
36     glib
37     zenity
38     freetype
39     pango
40   ];
41   nativeBuildInputs = [ cmake pkg-config ];
43   # Fix missing include
44   patches = [./gcc13.patch];
46   postPatch = ''
47     cp ${catch2}/include/catch2/catch.hpp tests/catch2/catch.hpp
49     substituteInPlace plugins/editor/external/vstgui4/vstgui/lib/platform/linux/x11fileselector.cpp \
50       --replace 'zenitypath = "zenity"' 'zenitypath = "${zenity}/bin/zenity"'
51     substituteInPlace plugins/editor/src/editor/NativeHelpers.cpp \
52       --replace '/usr/bin/zenity' '${zenity}/bin/zenity'
53   '';
55   cmakeFlags = [ "-DSFIZZ_TESTS=ON" ];
57   doCheck = true;
59   meta = with lib; {
60     homepage = "https://github.com/sfztools/sfizz";
61     description = "SFZ jack client and LV2 plugin";
62     license = licenses.bsd2;
63     maintainers = [ maintainers.magnetophon ];
64     platforms = platforms.all;
65     badPlatforms = platforms.darwin;
66   };