Unverified Commit b2c8125b authored by Guillaume Girol's avatar Guillaume Girol Committed by GitHub
Browse files

Merge pull request #216673 from magnetophon/Cardinal

Cardinal: 22.11 -> 22.12
parents 8bf05eb7 1d9a8291
Loading
Loading
Loading
Loading
+29 −7
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@
  stdenv
, fetchFromGitHub
, fetchurl
, cmake
, dbus
, file
, freetype
, jansson
, lib
@@ -11,32 +14,44 @@
, libXext
, libXrandr
, libarchive
, libjack2
, liblo
, libsamplerate
, mesa
, libsndfile
, makeWrapper
, pkg-config
, python3
, speexdsp
, libglvnd
}:

stdenv.mkDerivation rec {
  pname = "cardinal";
  version = "22.11";
  version = "22.12";

  src = fetchurl {
    url =
      "https://github.com/DISTRHO/Cardinal/releases/download/${version}/cardinal+deps-${version}.tar.xz";
    sha256 = "sha256-xYQi209whY5/lN+6Fp7PTp7JSzL6RS6VL+Exst7RrS0=";
    sha256 = "sha256-fyko5cWjBNNaw8qL9uyyRxW5MFXKmOsBoR5u05AWxWY=";
  };

  prePatch = ''
    patchShebangs ./dpf/utils/generate-ttl.sh
  '';

  dontUseCmakeConfigure = true;
  enableParallelBuilding = true;
  strictDeps = true;

  nativeBuildInputs = [ pkg-config ];
  nativeBuildInputs = [
    cmake
    file
    pkg-config
    makeWrapper
    python3
  ];
  buildInputs = [
    dbus
    freetype
    jansson
    libGL
@@ -44,18 +59,25 @@ stdenv.mkDerivation rec {
    libXcursor
    libXext
    libXrandr
    libXrandr
    libarchive
    liblo
    libsamplerate
    mesa
    python3
    libsndfile
    speexdsp
    libglvnd
  ];

  hardeningDisable = [ "format" ];
  makeFlags = [ "SYSDEPS=true" "PREFIX=$(out)" ];

  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
  '';

  meta = {
    description = "Plugin wrapper around VCV Rack";
    homepage = "https://github.com/DISTRHO/cardinal";