From 101da0d59a96ac2edff5fc8be8869d4ae1bfa30f Mon Sep 17 00:00:00 2001 From: Rampoina Date: Sat, 25 Mar 2023 18:02:55 +0100 Subject: [PATCH 1/3] lmms: Add support for Carla Add Carla as an optional dependency and the needed patch --- pkgs/applications/audio/lmms/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/audio/lmms/default.nix b/pkgs/applications/audio/lmms/default.nix index 22d9b3fed976a..481514833ab28 100644 --- a/pkgs/applications/audio/lmms/default.nix +++ b/pkgs/applications/audio/lmms/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, cmake, pkg-config, alsa-lib ? null, fftwFloat, fltk13 +{ lib, fetchFromGitHub, cmake, pkg-config, alsa-lib ? null, carla ? null, fftwFloat, fltk13 , fluidsynth ? null, lame ? null, libgig ? null, libjack2 ? null, libpulseaudio ? null , libsamplerate, libsoundio ? null, libsndfile, libvorbis ? null, portaudio ? null , qtbase, qtx11extras, qttools, SDL ? null, mkDerivation }: @@ -18,6 +18,7 @@ mkDerivation rec { nativeBuildInputs = [ cmake qttools pkg-config ]; buildInputs = [ + carla alsa-lib fftwFloat fltk13 @@ -36,6 +37,10 @@ mkDerivation rec { SDL # TODO: switch to SDL2 in the next version ]; + patchPhase = '' + sed -i "s/CARLA_EXPORT/CARLA_API_EXPORT/g" -i plugins/carlabase/carla.h; + ''; + cmakeFlags = [ "-DWANT_QT5=ON" ]; meta = with lib; { From 23a868dd5e2ea4997f3b2d7d2e9731e7a2732064 Mon Sep 17 00:00:00 2001 From: Rampoina Date: Fri, 31 Mar 2023 14:04:16 +0200 Subject: [PATCH 2/3] Use patch from Arch Linux instead of sed --- pkgs/applications/audio/lmms/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/audio/lmms/default.nix b/pkgs/applications/audio/lmms/default.nix index 481514833ab28..f3e2ca26291e2 100644 --- a/pkgs/applications/audio/lmms/default.nix +++ b/pkgs/applications/audio/lmms/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchFromGitHub, cmake, pkg-config, alsa-lib ? null, carla ? null, fftwFloat, fltk13 +{ lib, fetchFromGitHub, fetchpatch, cmake, pkg-config, alsa-lib ? null, carla ? null, fftwFloat, fltk13 , fluidsynth ? null, lame ? null, libgig ? null, libjack2 ? null, libpulseaudio ? null , libsamplerate, libsoundio ? null, libsndfile, libvorbis ? null, portaudio ? null , qtbase, qtx11extras, qttools, SDL ? null, mkDerivation }: @@ -37,9 +37,12 @@ mkDerivation rec { SDL # TODO: switch to SDL2 in the next version ]; - patchPhase = '' - sed -i "s/CARLA_EXPORT/CARLA_API_EXPORT/g" -i plugins/carlabase/carla.h; - ''; + patches = [ + (fetchpatch { + url = "https://raw.githubusercontent.com/archlinux/svntogit-community/packages/lmms/trunk/lmms-carla-export.patch"; + sha256 = "sha256-wlSewo93DYBN2PvrcV58dC9kpoo9Y587eCeya5OX+j4="; + }) + ]; cmakeFlags = [ "-DWANT_QT5=ON" ]; From abbd22e2b6d44f6315ebb7b3dae3551d2cb8f230 Mon Sep 17 00:00:00 2001 From: Rampoina Date: Sat, 1 Apr 2023 13:07:52 +0200 Subject: [PATCH 3/3] Change the link to the patch to a stable link --- pkgs/applications/audio/lmms/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/audio/lmms/default.nix b/pkgs/applications/audio/lmms/default.nix index f3e2ca26291e2..01b84780607bb 100644 --- a/pkgs/applications/audio/lmms/default.nix +++ b/pkgs/applications/audio/lmms/default.nix @@ -39,7 +39,7 @@ mkDerivation rec { patches = [ (fetchpatch { - url = "https://raw.githubusercontent.com/archlinux/svntogit-community/packages/lmms/trunk/lmms-carla-export.patch"; + url = "https://raw.githubusercontent.com/archlinux/svntogit-community/cf64acc45e3264c6923885867e2dbf8b7586a36b/trunk/lmms-carla-export.patch"; sha256 = "sha256-wlSewo93DYBN2PvrcV58dC9kpoo9Y587eCeya5OX+j4="; }) ];