From 410971fc3597ede8a23e829487847ad35641e69b Mon Sep 17 00:00:00 2001 From: Yuu Yin Date: Mon, 20 Feb 2023 23:23:20 -0300 Subject: [PATCH] zrythm: 1.0.0-alpha.28.1.3 -> 1.0.0-beta.4.5.62 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: zseri Co-authored-by: Alexandros Theodotou Co-authored-by: Sandro Jäckel 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. --- pkgs/applications/audio/zrythm/default.nix | 106 +++++++++++++++------ 1 file changed, 76 insertions(+), 30 deletions(-) diff --git a/pkgs/applications/audio/zrythm/default.nix b/pkgs/applications/audio/zrythm/default.nix index 7b92626d5b33..fbb040709ab5 100644 --- a/pkgs/applications/audio/zrythm/default.nix +++ b/pkgs/applications/audio/zrythm/default.nix @@ -1,34 +1,43 @@ { 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; + src = fetchFromGitHub { + 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" - "-Dcarla=enabled" - "-Dmanpage=true" - # "-Duser_manual=true" # needs sphinx-intl - "-Dlsp_dsp=disabled" "-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 ]; 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;