nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 libjack2,
6 libsndfile,
7 xorg,
8 freetype,
9 libxkbcommon,
10 cairo,
11 glib,
12 zenity,
13 flac,
14 libogg,
15 libvorbis,
16 libopus,
17 cmake,
18 pango,
19 pkg-config,
20 catch2,
21}:
22
23stdenv.mkDerivation rec {
24 pname = "sfizz";
25 version = "1.2.1";
26
27 src = fetchFromGitHub {
28 owner = "sfztools";
29 repo = "sfizz";
30 rev = version;
31 hash = "sha256-/G9tvJ4AcBSTmo44xDDKf6et1nSn/FV5m27ztDu10kI=";
32 fetchSubmodules = true;
33 };
34
35 buildInputs = [
36 libjack2
37 libsndfile
38 flac
39 libogg
40 libvorbis
41 libopus
42 xorg.libX11
43 xorg.libxcb
44 xorg.libXau
45 xorg.libXdmcp
46 xorg.xcbutil
47 xorg.xcbutilcursor
48 xorg.xcbutilrenderutil
49 xorg.xcbutilkeysyms
50 xorg.xcbutilimage
51 libxkbcommon
52 cairo
53 glib
54 zenity
55 freetype
56 pango
57 ];
58 nativeBuildInputs = [
59 cmake
60 pkg-config
61 ];
62
63 # Fix missing include
64 patches = [ ./gcc13.patch ];
65
66 postPatch = ''
67 cp ${catch2}/include/catch2/catch.hpp tests/catch2/catch.hpp
68
69 substituteInPlace plugins/editor/external/vstgui4/vstgui/lib/platform/linux/x11fileselector.cpp \
70 --replace 'zenitypath = "zenity"' 'zenitypath = "${zenity}/bin/zenity"'
71 substituteInPlace plugins/editor/src/editor/NativeHelpers.cpp \
72 --replace '/usr/bin/zenity' '${zenity}/bin/zenity'
73 '';
74
75 cmakeFlags = [ "-DSFIZZ_TESTS=ON" ];
76
77 doCheck = true;
78
79 meta = with lib; {
80 homepage = "https://github.com/sfztools/sfizz";
81 description = "SFZ jack client and LV2 plugin";
82 license = licenses.bsd2;
83 maintainers = [ maintainers.magnetophon ];
84 platforms = platforms.all;
85 badPlatforms = platforms.darwin;
86 };
87}