{ stdenv, pkgs, fetchurl, lib, unzip, autoPatchelfHook, makeWrapper, ... }: stdenv.mkDerivation rec { pname = "xenia"; version = "latest"; src = fetchurl { url = "https://futurenoize.com/dsp56300/builds/xenia/beta/DSP56300Emu-1.4.1-Linux_x86_64-Xenia-CLAP.zip"; sha256 = "sha256-E+nSzawztU6L8Cxp3o59TG+oUJkvdZNcn8fqopbj7Ac="; }; nativeBuildInputs = [ makeWrapper unzip autoPatchelfHook ]; buildInputs = with pkgs; [ freetype fontconfig alsa-lib pipewire mesa freeglut pkg-config stdenv.cc.cc.lib xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXinerama xorg.libXcomposite ]; unpackPhase = '' unzip $src ''; installPhase = '' mkdir -p $out/lib/clap cp -r usr/local/lib/clap/Xenia.clap $out/lib/clap/ ''; postFixup = '' patchelf --set-rpath "${lib.makeLibraryPath buildInputs}" $out/lib/clap/Xenia.clap ''; meta = with lib; { homepage = "https://dsp56300.wordpress.com/xenia/"; description = "Xenia"; platforms = platforms.linux; }; }