2023-10-09 19:29:22 +00:00
|
|
|
{ stdenv
|
2022-03-05 16:20:37 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchurl
|
2023-03-04 12:14:45 +00:00
|
|
|
, cmake
|
|
|
|
, dbus
|
2023-07-15 17:15:38 +00:00
|
|
|
, fftwFloat
|
2023-03-04 12:14:45 +00:00
|
|
|
, file
|
2022-03-05 16:20:37 +00:00
|
|
|
, freetype
|
|
|
|
, jansson
|
|
|
|
, lib
|
|
|
|
, libGL
|
|
|
|
, libX11
|
|
|
|
, libXcursor
|
|
|
|
, libXext
|
|
|
|
, libXrandr
|
|
|
|
, libarchive
|
2023-03-04 12:14:45 +00:00
|
|
|
, libjack2
|
2022-03-05 16:20:37 +00:00
|
|
|
, liblo
|
|
|
|
, libsamplerate
|
2023-03-04 12:14:45 +00:00
|
|
|
, libsndfile
|
|
|
|
, makeWrapper
|
2022-03-05 16:20:37 +00:00
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, speexdsp
|
2023-03-04 12:14:45 +00:00
|
|
|
, libglvnd
|
2022-03-05 16:20:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-03-30 09:31:56 +00:00
|
|
|
pname = "cardinal";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "23.09";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-10-09 19:29:22 +00:00
|
|
|
url = "https://github.com/DISTRHO/Cardinal/releases/download/${version}/cardinal+deps-${version}.tar.xz";
|
|
|
|
hash = "sha256-q42ry47y4tTkUbejv6iN5jXcadXSSTPQ3omhMUevfqU=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
patchShebangs ./dpf/utils/generate-ttl.sh
|
|
|
|
'';
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
dontUseCmakeConfigure = true;
|
2022-03-05 16:20:37 +00:00
|
|
|
enableParallelBuilding = true;
|
2023-03-04 12:14:45 +00:00
|
|
|
strictDeps = true;
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
file
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
|
|
|
python3
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
buildInputs = [
|
2023-03-04 12:14:45 +00:00
|
|
|
dbus
|
2023-07-15 17:15:38 +00:00
|
|
|
fftwFloat
|
2022-03-05 16:20:37 +00:00
|
|
|
freetype
|
|
|
|
jansson
|
|
|
|
libGL
|
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXext
|
|
|
|
libXrandr
|
|
|
|
libarchive
|
|
|
|
liblo
|
|
|
|
libsamplerate
|
2023-03-04 12:14:45 +00:00
|
|
|
libsndfile
|
2022-03-05 16:20:37 +00:00
|
|
|
speexdsp
|
2023-03-04 12:14:45 +00:00
|
|
|
libglvnd
|
2022-03-05 16:20:37 +00:00
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2022-03-05 16:20:37 +00:00
|
|
|
makeFlags = [ "SYSDEPS=true" "PREFIX=$(out)" ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/Cardinal \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libjack2 ]}
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
wrapProgram $out/bin/CardinalMini \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libjack2 ]}
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
# this doesn't work and is mainly just a test tool for the developers anyway.
|
|
|
|
rm -f $out/bin/CardinalNative
|
|
|
|
'';
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
meta = {
|
|
|
|
description = "Plugin wrapper around VCV Rack";
|
|
|
|
homepage = "https://github.com/DISTRHO/cardinal";
|
|
|
|
license = lib.licenses.gpl3;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with lib.maintainers; [ magnetophon PowerUser64 ];
|
2023-07-15 17:15:38 +00:00
|
|
|
mainProgram = "Cardinal";
|
2022-03-05 16:20:37 +00:00
|
|
|
platforms = lib.platforms.all;
|
2022-12-17 10:02:37 +00:00
|
|
|
# never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs
|
|
|
|
broken = stdenv.isDarwin;
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
}
|