Unverified Commit 410971fc authored by Yuu Yin's avatar Yuu Yin
Browse files

zrythm: 1.0.0-alpha.28.1.3 -> 1.0.0-beta.4.5.62



Co-authored-by: default avatarzseri <zseri.devel@ytrizja.de>
Co-authored-by: default avatarAlexandros Theodotou <alex@zrythm.org>
Co-authored-by: default avatarSandro Jäckel <sandro.jaeckel@gmail.com>

Zrythm 1.0.0-beta.4.5.62 needs
https://github.com/falkTX/Carla/tree/main/source/includes/clap, which is only
available on unstable.
parent c0680473
Loading
Loading
Loading
Loading
+74 −28
Original line number Diff line number Diff line
{ stdenv
, lib
, fetchFromGitHub
, fetchFromSourcehut
, SDL2
, alsa-lib
, libaudec
, appstream
, appstream-glib
, bash-completion
, boost
, breeze-icons
, carla
, chromaprint
, cmake
, curl
, dbus
, dconf
, libepoxy
, faust2lv2
, fftw
, fftwFloat
, flex
, glib
, graphviz
, gtk4
, gtksourceview5
, guile
, graphviz
, help2man
, json-glib
, jq
, json-glib
, libadwaita
, libaudec
, libbacktrace
, libcyaml
, libepoxy
, libgtop
, libjack2
, libpanel
, libpulseaudio
, libsamplerate
, libsass
, libsndfile
, libsoundio
, libxml2
@@ -46,31 +55,48 @@
, rtaudio
, rtmidi
, rubberband
, sassc
, serd
, sord
, sox
, sratom
, texi2html
, vamp-plugin-sdk
, wrapGAppsHook
, xdg-utils
, xxHash
, vamp-plugin-sdk
, zix
, zstd
, libadwaita
, sassc
}:

stdenv.mkDerivation rec {
  pname = "zrythm";
  version = "1.0.0-alpha.28.1.3";
let
  # As of zrythm-1.0.0-beta.4.5.62, Zrythm needs clap
  # https://github.com/falktx/carla/tree/main/source/includes/clap, which is
  # only available on Carla unstable as of 2023-02-24.
  carla-unstable = carla.overrideAttrs (oldAttrs: rec {
    pname = "carla";
    version = "unstable-2023-02-24";

    src = fetchFromGitHub {
    owner = pname;
      owner = "falkTX";
      repo = pname;
      rev = "33a142f447925f55d00532933a1f28e9745c13eb";
      hash = "sha256-hQj0HlcOYfwsxG05pq/qcuKcOwDMV1ED+YdxBToBzvk=";
    };
  });
in stdenv.mkDerivation rec {
  pname = "zrythm";
  version = "1.0.0-beta.4.5.62";

  src = fetchFromSourcehut {
    owner = "~alextee";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-ERE7I6E3+RmmpnZEtcJL/1v9a37IwFauVsbJvI9gsRQ=";
    hash = "sha256-K93Y4Adh9TqoetSn7nrbbruIri1MKYoSGzoRBGHwbPA=";
  };

  nativeBuildInputs = [
    cmake
    help2man
    jq
    libaudec
@@ -81,36 +107,44 @@ stdenv.mkDerivation rec {
    pkg-config
    python3
    python3.pkgs.sphinx
    sassc
    texi2html
    wrapGAppsHook
    cmake
  ];

  buildInputs = [
    SDL2
    alsa-lib
    appstream
    appstream-glib
    bash-completion
    carla
    boost
    breeze-icons
    carla-unstable
    chromaprint
    curl
    dbus
    dconf
    libepoxy
    faust2lv2
    fftw
    fftwFloat
    flex
    breeze-icons
    glib
    graphviz
    gtk4
    gtksourceview5
    graphviz
    guile
    json-glib
    libadwaita
    libbacktrace
    libcyaml
    libepoxy
    libgtop
    libjack2
    libpanel
    libpulseaudio
    libsamplerate
    libsass
    libsndfile
    libsoundio
    libyaml
@@ -124,34 +158,46 @@ stdenv.mkDerivation rec {
    rubberband
    serd
    sord
    sox
    sratom
    vamp-plugin-sdk
    xdg-utils
    xxHash
    zix
    zstd
    libadwaita
    sassc
  ];

  # Zrythm uses meson to build, but requires cmake for dependency detection.
  dontUseCmakeConfigure = true;

  mesonFlags = [
    "-Drtmidi=enabled"
    "-Drtaudio=enabled"
    "-Dsdl=enabled"
    "-Db_lto=false"
    "-Dcarla=enabled"
    "-Dcarla_binaries_dir=${carla-unstable}/lib/carla"
    "-Ddebug=true"
    "-Dfftw3_threads_separate=false"
    "-Dfftw3_threads_separate_type=library"
    "-Dfftw3f_separate=false"
    "-Dlsp_dsp=disabled"
    "-Dmanpage=true"
    "-Drtaudio=enabled"
    "-Drtmidi=enabled"
    "-Dsdl=enabled"
    # "-Duser_manual=true" # needs sphinx-intl
    "-Dlsp_dsp=disabled"
    "-Db_lto=false"
    "-Ddebug=true"
  ];

  NIX_LDFLAGS = ''
    -lfftw3_threads -lfftw3f_threads
  '';

  GUILE_AUTO_COMPILE = 0;

  dontStrip = true;

  postPatch = ''
    substituteInPlace meson.build \
      --replace "'/usr/lib', '/usr/local/lib', '/opt/homebrew/lib'" "'${fftw}/lib'"

    chmod +x scripts/meson-post-install.sh
    patchShebangs ext/sh-manpage-completions/run.sh scripts/generic_guile_wrap.sh \
      scripts/meson-post-install.sh tools/check_have_unlimited_memlock.sh
@@ -160,13 +206,13 @@ stdenv.mkDerivation rec {
  preFixup = ''
    gappsWrapperArgs+=(
      --prefix GSETTINGS_SCHEMA_DIR : "$out/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas/"
      --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
      --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${breeze-icons}/share"
    )
  '';

  meta = with lib; {
    homepage = "https://www.zrythm.org";
    description = "Highly automated and intuitive digital audio workstation";
    description = "Automated and intuitive digital audio workstation";
    maintainers = with maintainers; [ tshaynik magnetophon ];
    platforms = platforms.linux;
    license = licenses.agpl3Plus;