nixos-config/packages/the-usual-suspects/nodal-red/package.nix

37 lines
932 B
Nix

{ stdenv, pkgs, fetchurl, lib, unzip, autoPatchelfHook, makeWrapper, ... }:
stdenv.mkDerivation rec {
pname = "nodal-red";
version = "latest";
src = fetchurl {
url = "https://dsp56300.com/builds/nodalred2x/beta/DSP56300Emu-1.4.4-Linux_x86_64-NodalRed2x-CLAP.zip";
sha256 = "sha256-5xxb3okVd45wbzIcgv5XXobECVIhqLBJT31GxR8OIT8=";
};
nativeBuildInputs = [ makeWrapper unzip autoPatchelfHook ];
buildInputs = with pkgs; [
freetype
fontconfig
alsa-lib
pipewire
stdenv.cc.cc.lib
];
unpackPhase = ''
unzip $src
'';
installPhase = ''
mkdir -p $out/lib/clap
cp -r usr/local/lib/clap/NodalRed2x.clap $out/lib/clap/
'';
postFixup = ''
patchelf --set-rpath "${lib.makeLibraryPath buildInputs}" $out/lib/clap/NodalRed2x.clap
'';
meta = with lib; {
homepage = "https://dsp56300.wordpress.com/";
description = "NodalRed";
platforms = platforms.linux;
};
}