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