nixpkgs/pkgs/applications/audio/cardinal/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

91 lines
1.6 KiB
Nix
Raw Normal View History

2022-02-17 16:56:26 +00:00
{
stdenv
, fetchFromGitHub
, fetchurl
2023-02-16 18:33:24 +00:00
, cmake
, dbus
, 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-02-16 18:33:24 +00:00
version = "22.12";
2022-02-17 16:56:26 +00:00
src = fetchurl {
url =
2022-06-29 20:03:14 +00:00
"https://github.com/DISTRHO/Cardinal/releases/download/${version}/cardinal+deps-${version}.tar.xz";
2023-02-16 18:33:24 +00:00
sha256 = "sha256-fyko5cWjBNNaw8qL9uyyRxW5MFXKmOsBoR5u05AWxWY=";
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
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 ];
platforms = lib.platforms.all;
# never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs
broken = stdenv.isDarwin;
2022-02-17 16:56:26 +00:00
};
}