2021-12-06 16:07:01 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2023-03-15 16:39:30 +00:00
|
|
|
, fetchFromSourcehut
|
2024-02-29 20:09:43 +00:00
|
|
|
, fetchpatch
|
2021-12-06 16:07:01 +00:00
|
|
|
, SDL2
|
|
|
|
, alsa-lib
|
2023-03-15 16:39:30 +00:00
|
|
|
, appstream
|
|
|
|
, appstream-glib
|
2021-12-06 16:07:01 +00:00
|
|
|
, bash-completion
|
2023-03-15 16:39:30 +00:00
|
|
|
, boost
|
2021-12-06 16:07:01 +00:00
|
|
|
, breeze-icons
|
|
|
|
, carla
|
|
|
|
, chromaprint
|
|
|
|
, cmake
|
|
|
|
, curl
|
2023-03-15 16:39:30 +00:00
|
|
|
, dbus
|
2021-12-06 16:07:01 +00:00
|
|
|
, dconf
|
2023-03-15 16:39:30 +00:00
|
|
|
, faust2lv2
|
2021-12-06 16:07:01 +00:00
|
|
|
, fftw
|
|
|
|
, fftwFloat
|
|
|
|
, flex
|
|
|
|
, glib
|
2023-03-15 16:39:30 +00:00
|
|
|
, graphviz
|
2022-03-05 16:20:37 +00:00
|
|
|
, gtk4
|
|
|
|
, gtksourceview5
|
2021-12-06 16:07:01 +00:00
|
|
|
, guile
|
|
|
|
, help2man
|
|
|
|
, jq
|
2023-03-15 16:39:30 +00:00
|
|
|
, json-glib
|
2023-03-24 00:07:29 +00:00
|
|
|
, kissfft
|
2023-03-15 16:39:30 +00:00
|
|
|
, libadwaita
|
|
|
|
, libaudec
|
2021-12-06 16:07:01 +00:00
|
|
|
, libbacktrace
|
|
|
|
, libcyaml
|
2023-03-15 16:39:30 +00:00
|
|
|
, libepoxy
|
2021-12-06 16:07:01 +00:00
|
|
|
, libgtop
|
|
|
|
, libjack2
|
2023-03-15 16:39:30 +00:00
|
|
|
, libpanel
|
2021-12-06 16:07:01 +00:00
|
|
|
, libpulseaudio
|
|
|
|
, libsamplerate
|
2023-03-15 16:39:30 +00:00
|
|
|
, libsass
|
2021-12-06 16:07:01 +00:00
|
|
|
, libsndfile
|
|
|
|
, libsoundio
|
|
|
|
, libxml2
|
|
|
|
, libyaml
|
|
|
|
, lilv
|
|
|
|
, lv2
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pandoc
|
|
|
|
, pcre
|
|
|
|
, pcre2
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, reproc
|
|
|
|
, rtaudio
|
|
|
|
, rtmidi
|
|
|
|
, rubberband
|
2023-03-15 16:39:30 +00:00
|
|
|
, sassc
|
2021-12-06 16:07:01 +00:00
|
|
|
, serd
|
|
|
|
, sord
|
2023-03-15 16:39:30 +00:00
|
|
|
, sox
|
2021-12-06 16:07:01 +00:00
|
|
|
, sratom
|
|
|
|
, texi2html
|
2023-03-15 16:39:30 +00:00
|
|
|
, vamp-plugin-sdk
|
2024-04-21 15:54:59 +00:00
|
|
|
, wrapGAppsHook4
|
2021-12-06 16:07:01 +00:00
|
|
|
, xdg-utils
|
|
|
|
, xxHash
|
2023-03-15 16:39:30 +00:00
|
|
|
, zix
|
2021-12-06 16:07:01 +00:00
|
|
|
, zstd
|
|
|
|
}:
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
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";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "unstable-2023-05-12";
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "falkTX";
|
|
|
|
repo = pname;
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "0175570f1d41285f39efe0ee32234458e0ed941c";
|
|
|
|
hash = "sha256-yfVzZV8G4AUDM8+yS9finzobpOb1PUEPgBWFhEY4nFQ=";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
});
|
2023-07-15 17:15:38 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "zrythm";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.0.0-beta.4.9.1";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~alextee";
|
2021-12-06 16:07:01 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-U3IUqNbHu20uyWfkTsLOOlUZjcUL4QdHilB3srSsebw=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
cmake
|
2021-12-06 16:07:01 +00:00
|
|
|
help2man
|
|
|
|
jq
|
|
|
|
libaudec
|
|
|
|
libxml2
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pandoc
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
python3.pkgs.sphinx
|
2023-03-15 16:39:30 +00:00
|
|
|
sassc
|
2021-12-06 16:07:01 +00:00
|
|
|
texi2html
|
2024-04-21 15:54:59 +00:00
|
|
|
wrapGAppsHook4
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
alsa-lib
|
2023-03-15 16:39:30 +00:00
|
|
|
appstream
|
|
|
|
appstream-glib
|
2021-12-06 16:07:01 +00:00
|
|
|
bash-completion
|
2023-03-15 16:39:30 +00:00
|
|
|
boost
|
|
|
|
breeze-icons
|
|
|
|
carla-unstable
|
2021-12-06 16:07:01 +00:00
|
|
|
chromaprint
|
|
|
|
curl
|
2023-03-15 16:39:30 +00:00
|
|
|
dbus
|
2021-12-06 16:07:01 +00:00
|
|
|
dconf
|
2023-03-15 16:39:30 +00:00
|
|
|
faust2lv2
|
2021-12-06 16:07:01 +00:00
|
|
|
fftw
|
|
|
|
fftwFloat
|
|
|
|
flex
|
|
|
|
glib
|
2023-03-15 16:39:30 +00:00
|
|
|
graphviz
|
2022-03-05 16:20:37 +00:00
|
|
|
gtk4
|
|
|
|
gtksourceview5
|
2021-12-06 16:07:01 +00:00
|
|
|
guile
|
|
|
|
json-glib
|
2023-03-24 00:07:29 +00:00
|
|
|
kissfft
|
2023-03-15 16:39:30 +00:00
|
|
|
libadwaita
|
2021-12-06 16:07:01 +00:00
|
|
|
libbacktrace
|
|
|
|
libcyaml
|
2023-03-15 16:39:30 +00:00
|
|
|
libepoxy
|
2021-12-06 16:07:01 +00:00
|
|
|
libgtop
|
|
|
|
libjack2
|
2023-03-15 16:39:30 +00:00
|
|
|
libpanel
|
2021-12-06 16:07:01 +00:00
|
|
|
libpulseaudio
|
|
|
|
libsamplerate
|
2023-03-15 16:39:30 +00:00
|
|
|
libsass
|
2021-12-06 16:07:01 +00:00
|
|
|
libsndfile
|
|
|
|
libsoundio
|
|
|
|
libyaml
|
|
|
|
lilv
|
|
|
|
lv2
|
|
|
|
pcre
|
|
|
|
pcre2
|
|
|
|
reproc
|
|
|
|
rtaudio
|
|
|
|
rtmidi
|
|
|
|
rubberband
|
|
|
|
serd
|
|
|
|
sord
|
2023-03-15 16:39:30 +00:00
|
|
|
sox
|
2021-12-06 16:07:01 +00:00
|
|
|
sratom
|
|
|
|
vamp-plugin-sdk
|
|
|
|
xdg-utils
|
|
|
|
xxHash
|
2023-03-15 16:39:30 +00:00
|
|
|
zix
|
2021-12-06 16:07:01 +00:00
|
|
|
zstd
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
patches = [
|
|
|
|
# Fix gcc-13 build failure
|
|
|
|
(fetchpatch {
|
|
|
|
name = "gcc-13.patch";
|
|
|
|
url = "https://gitlab.zrythm.org/zrythm/zrythm/-/commit/cbc2b3715b939718479631841f2d9703fb28e6da.diff";
|
|
|
|
hash = "sha256-2ZTSaCtSO3yynJVFe5B1AEjWhjRa5YyA26ergAfdL5Y=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
# Zrythm uses meson to build, but requires cmake for dependency detection.
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
mesonFlags = [
|
2023-03-15 16:39:30 +00:00
|
|
|
"-Db_lto=false"
|
2022-01-03 16:56:52 +00:00
|
|
|
"-Dcarla=enabled"
|
2023-03-15 16:39:30 +00:00
|
|
|
"-Dcarla_binaries_dir=${carla-unstable}/lib/carla"
|
|
|
|
"-Ddebug=true"
|
|
|
|
"-Dfftw3_threads_separate=false"
|
|
|
|
"-Dfftw3_threads_separate_type=library"
|
|
|
|
"-Dfftw3f_separate=false"
|
|
|
|
"-Dlsp_dsp=disabled"
|
2021-12-06 16:07:01 +00:00
|
|
|
"-Dmanpage=true"
|
2023-03-15 16:39:30 +00:00
|
|
|
"-Drtaudio=enabled"
|
|
|
|
"-Drtmidi=enabled"
|
|
|
|
"-Dsdl=enabled"
|
2021-12-06 16:07:01 +00:00
|
|
|
# "-Duser_manual=true" # needs sphinx-intl
|
|
|
|
];
|
|
|
|
|
|
|
|
NIX_LDFLAGS = ''
|
|
|
|
-lfftw3_threads -lfftw3f_threads
|
|
|
|
'';
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
GUILE_AUTO_COMPILE = 0;
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
dontStrip = true;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
2023-03-15 16:39:30 +00:00
|
|
|
substituteInPlace meson.build \
|
|
|
|
--replace "'/usr/lib', '/usr/local/lib', '/opt/homebrew/lib'" "'${fftw}/lib'"
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix GSETTINGS_SCHEMA_DIR : "$out/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas/"
|
2023-03-15 16:39:30 +00:00
|
|
|
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${breeze-icons}/share"
|
|
|
|
)
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.zrythm.org";
|
2023-03-15 16:39:30 +00:00
|
|
|
description = "Automated and intuitive digital audio workstation";
|
2023-03-24 00:07:29 +00:00
|
|
|
maintainers = with maintainers; [ tshaynik magnetophon yuu ];
|
2021-12-06 16:07:01 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
};
|
|
|
|
}
|