37 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, unzip, patchelf, dbus, libxcb, xcbutilkeysyms, systemd }:
stdenv.mkDerivation rec {
pname = "charlatan3";
version = "3.2.0";
src = fetchurl {
url = "https://blaukraut.info/downloads/charlatan3_${version}_linux.zip";
sha256 = "sha256-DZA23vYh4rQsPVi8Xq9oc/VFa3YIIqsjZsg2rBuDqfc=";
};
nativeBuildInputs = [ unzip patchelf ];
buildInputs = [ dbus libxcb xcbutilkeysyms systemd ];
unpackPhase = "unzip $src";
installPhase = ''
mkdir -p $out/lib/charlatan3
cp Charlatan3.so $out/lib/charlatan3/Charlatan3.so
# Patch the RPATH to include necessary libraries
patchelf --set-rpath "${
lib.makeLibraryPath buildInputs
}" $out/lib/charlatan3/Charlatan3.so
# Copy presets
mkdir -p $out/share/charlatan3/presets
cp -r presets $out/share/charlatan3/
'';
meta = with lib; {
description = "Charlatan3 CLAP plugin for Reaper";
homepage = "https://blaukraut.info/";
license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ bleetube ];
};
}