feat(packages): new lmms package
Also replaces the lmms package in shared/home-manager that we pull from nixpkgs and uses this instead
This commit is contained in:
parent
4b056829fc
commit
203ae22384
5 changed files with 177 additions and 2 deletions
|
@ -73,6 +73,7 @@
|
|||
formatter."${system}" = pkgs.nixfmt-rfc-style;
|
||||
|
||||
packages."${system}" = {
|
||||
lmms = pkgs.callPackage ./packages/lmms/package.nix { };
|
||||
miraclecast = pkgs.callPackage ./packages/miraclecast.nix { };
|
||||
wb32dfu-udev-rules = pkgs.callPackage ./packages/wb32dfu-udev-rules { };
|
||||
};
|
||||
|
|
|
@ -26,7 +26,20 @@ programs have no documentation and some an unhelpful help command too.
|
|||
Currently the **package is available in [nixpkgs]** __however it currently fails to compile__, so you have to rely on my
|
||||
configuration of this package or wait for [nixpkgs#387762](https://github.com/NixOS/nixpkgs/pull/387762) to be merged.
|
||||
|
||||
## [lmms]
|
||||
|
||||
This is a free and open source DAW that is cross platform to Linux, Mac and Windows.
|
||||
|
||||
I maintain here a package since the [PR hasn't been merged](https://github.com/NixOS/nixpkgs/pull/377643) with a newer
|
||||
version. It has not been updated for 5y, and unfortuantely, there hasn't been any releases of [lmms] since then, so an
|
||||
unstable version was due to happen in [nixpkgs].
|
||||
|
||||
The version in [nixpkgs] also doesn't comes with [wine](https://www.winehq.org/) packaged alongside it, limiting your
|
||||
options for instrument plugins drastically.
|
||||
|
||||
|
||||
<!-- REFERENCES -->
|
||||
[nixpkgs]: https://github.com/NixOS/nixpkgs/
|
||||
[nixos]: https://nixos.org
|
||||
[lmms]: https://lmms.io/
|
||||
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
From 55c86d9ba9275a58299b31a6a5eb382a20662a44 Mon Sep 17 00:00:00 2001
|
||||
From: "Alexandre Cavalheiro S. Tiago da Silva" <contact@thewizard.link>
|
||||
Date: Wed, 16 Apr 2025 13:36:00 -0300
|
||||
Subject: [PATCH] chore: allow injection of wine path for nix
|
||||
|
||||
Signed-off-by: Alexandre Cavalheiro S. Tiago da Silva <contact@thewizard.link>
|
||||
---
|
||||
cmake/modules/FindWine.cmake | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/cmake/modules/FindWine.cmake b/cmake/modules/FindWine.cmake
|
||||
index ea8d90cd2..6b87c61ae 100644
|
||||
--- a/cmake/modules/FindWine.cmake
|
||||
+++ b/cmake/modules/FindWine.cmake
|
||||
@@ -13,6 +13,13 @@
|
||||
# WINE_64_FLAGS - 64-bit linker flags
|
||||
#
|
||||
|
||||
+set(WINE_INCLUDE_DIR @WINE_LOCATION@/include)
|
||||
+set(WINE_BUILD @WINE_LOCATION@/bin/winebuild)
|
||||
+set(WINE_CXX @WINE_LOCATION@/bin/wineg++)
|
||||
+set(WINE_GCC @WINE_LOCATION@/bin/winegcc)
|
||||
+set(WINE_32_LIBRARY_DIRS @WINE_LOCATION@/lib/wine/i386-unix)
|
||||
+set(WINE_64_LIBRARY_DIRS @WINE_LOCATION@/lib/wine/x86_64-windows)
|
||||
+
|
||||
MACRO(_findwine_find_flags output expression result)
|
||||
STRING(REPLACE " " ";" WINEBUILD_FLAGS "${output}")
|
||||
FOREACH(FLAG ${WINEBUILD_FLAGS})
|
||||
@@ -32,6 +39,7 @@ ENDMACRO()
|
||||
|
||||
# Prefer newest wine first
|
||||
list(APPEND WINE_LOCATIONS
|
||||
+ @WINE_LOCATION@
|
||||
/opt/wine-staging
|
||||
/opt/wine-devel
|
||||
/opt/wine-stable
|
||||
--
|
||||
2.48.1
|
||||
|
117
packages/lmms/package.nix
Normal file
117
packages/lmms/package.nix
Normal file
|
@ -0,0 +1,117 @@
|
|||
{
|
||||
SDL2,
|
||||
alsa-lib,
|
||||
carla,
|
||||
cmake,
|
||||
fetchFromGitHub,
|
||||
fftwFloat,
|
||||
fltk,
|
||||
fluidsynth,
|
||||
glibc_multi,
|
||||
lame,
|
||||
lib,
|
||||
libgig,
|
||||
libjack2,
|
||||
libogg,
|
||||
libpulseaudio,
|
||||
libsForQt5,
|
||||
libsamplerate,
|
||||
libsndfile,
|
||||
libsoundio,
|
||||
libvorbis,
|
||||
lilv,
|
||||
lv2,
|
||||
perl540,
|
||||
perl540Packages,
|
||||
pkg-config,
|
||||
portaudio,
|
||||
qt5,
|
||||
sndio,
|
||||
stdenv,
|
||||
substitute,
|
||||
suil,
|
||||
wineWowPackages,
|
||||
withOptionals ? false,
|
||||
}:
|
||||
|
||||
let
|
||||
winePackage = if lib.isDerivation wineWowPackages then wineWowPackages else wineWowPackages.minimal;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "lmms";
|
||||
version = "0-unstable-2025-04-16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "LMMS";
|
||||
repo = "lmms";
|
||||
rev = "64053342d8cae2d38c49cfb6c5b24fe4234ffdef";
|
||||
sha256 = "sha256-X2Dkydmq7EOhhUIwdZoRAfM3zNXgZLgrIHU8ijX8+dU=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
libsForQt5.qt5.qttools
|
||||
pkg-config
|
||||
qt5.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
fftwFloat
|
||||
libsForQt5.qt5.qtbase
|
||||
libsForQt5.qt5.qtx11extras
|
||||
libsamplerate
|
||||
libsndfile
|
||||
]
|
||||
++ lib.optionals withOptionals [
|
||||
SDL2
|
||||
alsa-lib
|
||||
carla
|
||||
fltk
|
||||
fluidsynth
|
||||
glibc_multi
|
||||
lame
|
||||
libgig
|
||||
libjack2
|
||||
libogg
|
||||
libpulseaudio
|
||||
libsoundio
|
||||
libvorbis
|
||||
lilv
|
||||
lv2
|
||||
perl540
|
||||
perl540Packages.ListMoreUtils
|
||||
perl540Packages.XMLParser
|
||||
portaudio
|
||||
sndio
|
||||
suil
|
||||
winePackage
|
||||
];
|
||||
|
||||
patches = lib.optionals withOptionals [
|
||||
(substitute {
|
||||
src = ./0001-chore-allow-injection-of-wine-path-for-nix.patch;
|
||||
substitutions = [
|
||||
"--replace-fail"
|
||||
"@WINE_LOCATION@"
|
||||
winePackage
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = lib.optionals withOptionals [
|
||||
"-DWANT_WEAKJACK=OFF"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "DAW similar to FL Studio (music production software)";
|
||||
mainProgram = "lmms";
|
||||
homepage = "https://lmms.io";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
];
|
||||
maintainers = with maintainers; [ wizardlink ];
|
||||
};
|
||||
}
|
|
@ -1,4 +1,9 @@
|
|||
{ pkgs, clipboard-sync, ... }:
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
clipboard-sync,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# Let Home Manager install and manage itself.
|
||||
|
@ -97,7 +102,7 @@
|
|||
aseprite
|
||||
blender
|
||||
krita
|
||||
lmms
|
||||
self.packages.${system}.lmms
|
||||
orca-slicer
|
||||
shotcut
|
||||
vcv-rack
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue