Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zrythm: 1.0.0-beta.4.9.1 -> 1.0.0-rc.1 #306959

Merged
merged 2 commits into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 40 additions & 63 deletions pkgs/applications/audio/zrythm/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchFromSourcehut
, fetchpatch
, SDL2
, fetchzip
, alsa-lib
, appstream
, appstream-glib
, bash-completion
, boost
, breeze-icons
Expand All @@ -16,7 +13,6 @@
, curl
, dbus
, dconf
, faust2lv2
, fftw
, fftwFloat
, flex
Expand All @@ -27,159 +23,140 @@
, guile
, help2man
, jq
, json-glib
, kissfft
, libadwaita
, libaudec
, libbacktrace
, libcyaml
, libepoxy
, libgtop
, libjack2
, libpanel
, libpulseaudio
, libsamplerate
, libsass
, libsndfile
, libsoundio
, libxml2
, libyaml
, lilv
, lv2
, meson
, ninja
, pandoc
, pcre
, pcre2
, pkg-config
, python3
, reproc
, rtaudio
, rtaudio_6
, rtmidi
, rubberband
, sassc
, serd
Astavie marked this conversation as resolved.
Show resolved Hide resolved
, sord
, sox
, soxr
, sratom
, texi2html
, vamp-plugin-sdk
, wrapGAppsHook4
, writeScript
, xdg-utils
, xxHash
, yyjson
, zix
, zstd
}:

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 {
# Error: Dependency carla-host-plugin found: NO found 2.5.6 but need: '>=2.6.0'
# So we need Carla unstable
carla-unstable = carla.overrideAttrs (oldAttrs: {
pname = "carla";
version = "unstable-2023-05-12";
version = "unstable-2024-04-26";

src = fetchFromGitHub {
owner = "falkTX";
repo = pname;
rev = "0175570f1d41285f39efe0ee32234458e0ed941c";
hash = "sha256-yfVzZV8G4AUDM8+yS9finzobpOb1PUEPgBWFhEY4nFQ=";
repo = "carla";
rev = "948991d7b5104280c03960925908e589c77b169a";
hash = "sha256-uGAuKheoMfP9hZXsw29ec+58dJM8wMuowe95QutzKBY=";
};
});
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "zrythm";
version = "1.0.0-beta.4.9.1";
version = "1.0.0-rc.1";

src = fetchFromSourcehut {
owner = "~alextee";
repo = pname;
rev = "v${version}";
hash = "sha256-U3IUqNbHu20uyWfkTsLOOlUZjcUL4QdHilB3srSsebw=";
src = fetchzip {
url = "https://www.zrythm.org/releases/${finalAttrs.pname}-${finalAttrs.version}.tar.xz";
sha256 = "sha256-Ljbw7bjGI6js4OP9KEXCkhC9AMbInSz0nn+pROm4vXw=";
};

passthru.updateScript = writeScript "update-zrythm" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts
version="$(curl -s https://www.zrythm.org/releases/ | grep -o -m 1 'href="zrythm-[^"]*\.tar\.xz"' | head -1 | sed 's/href="zrythm-\(.*\)\.tar\.xz"/\1/')"
update-source-version zrythm "$version"
'';

nativeBuildInputs = [
chromaprint
cmake
flex
guile
help2man
jq
libaudec
libxml2
lilv
meson
ninja
pandoc
pkg-config
python3
python3.pkgs.sphinx
sassc
serd
sord
sratom
texi2html
wrapGAppsHook4
];

buildInputs = [
SDL2
alsa-lib
appstream
appstream-glib
bash-completion
boost
breeze-icons
carla-unstable
chromaprint
curl
dbus
dconf
faust2lv2
fftw
fftwFloat
flex
glib
graphviz
gtk4
gtksourceview5
guile
json-glib
kissfft
libadwaita
libbacktrace
libcyaml
libepoxy
libgtop
libjack2
libpanel
libpulseaudio
libsamplerate
libsass
libsndfile
libsoundio
libyaml
lilv
lv2
pcre
pcre2
reproc
rtaudio
rtaudio_6
rtmidi
rubberband
serd
sord
sox
sratom
soxr
vamp-plugin-sdk
xdg-utils
xxHash
yyjson
zix
zstd
];

patches = [
# Fix gcc-13 build failure
(fetchpatch {
name = "gcc-13.patch";
url = "https://gitlab.zrythm.org/zrythm/zrythm/-/commit/cbc2b3715b939718479631841f2d9703fb28e6da.diff";
hash = "sha256-2ZTSaCtSO3yynJVFe5B1AEjWhjRa5YyA26ergAfdL5Y=";
})
];

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

Expand All @@ -197,7 +174,6 @@ stdenv.mkDerivation rec {
"-Dmanpage=true"
"-Drtaudio=enabled"
"-Drtmidi=enabled"
"-Dsdl=enabled"
# "-Duser_manual=true" # needs sphinx-intl
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this comment was interesting, so I decided to look into it.

git blame shows that it's over 3 years old! Since then, python312Packages.sphinx-intl has been added to nixpkgs. I don't know how important this is to people, but given that we have this package now I think this could be enabled. Not sure how important this is to people.

Thoughts?

cc @tshaynik

Copy link
Contributor

@alex-tee alex-tee Apr 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what the nix packager way to do is, but, for reference, the python requirements to build the user manual are in requirements.txt. This is how you can build the user manual in HTML format in English:

python3 -m venv venv
source ./venv/bin/activate
# Note: sphinx and friends need to be in the PATH before configuring meson so that user manual-related ninja targets are created
python3 -m pip install -r requirements.txt
# setup meson (meson setup builddir ...)
ninja -C builddir html-manual-en

Then the built manual will be available in the builddir under doc/user.

];

Expand All @@ -220,16 +196,17 @@ stdenv.mkDerivation rec {

preFixup = ''
gappsWrapperArgs+=(
--prefix GSETTINGS_SCHEMA_DIR : "$out/share/gsettings-schemas/${pname}-${version}/glib-2.0/schemas/"
--prefix GSETTINGS_SCHEMA_DIR : "$out/share/gsettings-schemas/${finalAttrs.pname}-${finalAttrs.version}/glib-2.0/schemas/"
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${breeze-icons}/share"
)
'';

meta = with lib; {
homepage = "https://www.zrythm.org";
description = "Automated and intuitive digital audio workstation";
maintainers = with maintainers; [ tshaynik magnetophon yuu ];
platforms = platforms.linux;
maintainers = with maintainers; [ tshaynik magnetophon yuu astavie PowerUser64 ];
platforms = platforms.unix;
broken = stdenv.isDarwin;
license = licenses.agpl3Plus;
};
}
})
Loading