nixpkgs/pkgs/by-name/sf/sfizz/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

68 lines
1.6 KiB
Nix

{ lib, stdenv, fetchFromGitHub, libjack2, libsndfile, xorg, freetype
, libxkbcommon, cairo, glib, zenity, flac, libogg, libvorbis, libopus, cmake
, pango, pkg-config, catch2
}:
stdenv.mkDerivation rec {
pname = "sfizz";
version = "1.2.1";
src = fetchFromGitHub {
owner = "sfztools";
repo = pname;
rev = version;
hash = "sha256-/G9tvJ4AcBSTmo44xDDKf6et1nSn/FV5m27ztDu10kI=";
fetchSubmodules = true;
};
buildInputs = [
libjack2
libsndfile
flac
libogg
libvorbis
libopus
xorg.libX11
xorg.libxcb
xorg.libXau
xorg.libXdmcp
xorg.xcbutil
xorg.xcbutilcursor
xorg.xcbutilrenderutil
xorg.xcbutilkeysyms
xorg.xcbutilimage
libxkbcommon
cairo
glib
zenity
freetype
pango
];
nativeBuildInputs = [ cmake pkg-config ];
# Fix missing include
patches = [./gcc13.patch];
postPatch = ''
cp ${catch2}/include/catch2/catch.hpp tests/catch2/catch.hpp
substituteInPlace plugins/editor/external/vstgui4/vstgui/lib/platform/linux/x11fileselector.cpp \
--replace 'zenitypath = "zenity"' 'zenitypath = "${zenity}/bin/zenity"'
substituteInPlace plugins/editor/src/editor/NativeHelpers.cpp \
--replace '/usr/bin/zenity' '${zenity}/bin/zenity'
'';
cmakeFlags = [ "-DSFIZZ_TESTS=ON" ];
doCheck = true;
meta = with lib; {
homepage = "https://github.com/sfztools/sfizz";
description = "SFZ jack client and LV2 plugin";
license = licenses.bsd2;
maintainers = [ maintainers.magnetophon ];
platforms = platforms.all;
badPlatforms = platforms.darwin;
};
}