helm: fix build (#350450)

This commit is contained in:
Aleksana 2024-10-23 19:16:18 +08:00 committed by GitHub
commit 0e21e86880
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 52 additions and 32 deletions

View File

@ -1,54 +1,73 @@
{ lib, stdenv {
, fetchFromGitHub lib,
, fetchpatch stdenv,
, xorg fetchFromGitHub,
, freetype fetchpatch,
, alsa-lib xorg,
, curl freetype,
, libjack2 alsa-lib,
, lv2 curl,
, pkg-config libjack2,
, libGLU lv2,
, libGL pkg-config,
libGLU,
libGL,
}: }:
stdenv.mkDerivation { stdenv.mkDerivation (finalAttrs: {
version = "0.9.0";
pname = "helm"; pname = "helm";
version = "0.9.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mtytel"; owner = "mtytel";
repo = "helm"; repo = "helm";
rev = "927d2ed27f71a735c3ff2a1226ce3129d1544e7e"; rev = "refs/tags/v${finalAttrs.version}";
sha256 = "17ys2vvhncx9i3ydg3xwgz1d3gqv4yr5mqi7vr0i0ca6nad6x3d4"; hash = "sha256-pI1umrJGMRBB3ifiWrInG7/Rwn+8j9f8iKkzC/cW2p8=";
}; };
buildInputs = [ buildInputs = [
xorg.libX11 xorg.libXcomposite xorg.libXcursor xorg.libXext xorg.libX11
xorg.libXinerama xorg.libXrender xorg.libXrandr xorg.libXcomposite
freetype alsa-lib curl libjack2 libGLU libGL lv2 xorg.libXcursor
xorg.libXext
xorg.libXinerama
xorg.libXrender
xorg.libXrandr
freetype
alsa-lib
curl
libjack2
libGLU
libGL
lv2
]; ];
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
CXXFLAGS = "-DHAVE_LROUND"; CXXFLAGS = [
"-DHAVE_LROUND"
"-fpermissive"
];
enableParallelBuilding = true; enableParallelBuilding = true;
makeFlags = [ "DESTDIR=$(out)" ]; makeFlags = [ "DESTDIR=${placeholder "out"}" ];
patches = [ patches = [
# gcc9 compatibility https://github.com/mtytel/helm/pull/233 # gcc9 compatibility https://github.com/mtytel/helm/pull/233
(fetchpatch { (fetchpatch {
url = "https://github.com/mtytel/helm/commit/cb611a80bd5a36d31bfc31212ebbf79aa86c6f08.patch"; url = "https://github.com/mtytel/helm/commit/cb611a80bd5a36d31bfc31212ebbf79aa86c6f08.patch";
sha256 = "1i2289srcfz17c3zzab6f51aznzdj62kk53l4afr32bkjh9s4ixk"; hash = "sha256-s0eiE5RziZGdInSUOYWR7duvQnFmqf8HO+E7lnVCQsQ=";
}) })
]; ];
prePatch = '' postPatch = ''
sed -i 's|usr/||g' Makefile substituteInPlace Makefile \
sed -i "s|/usr/share/|$out/share/|" src/common/load_save.cpp --replace-fail "usr/" ""
substituteInPlace src/common/load_save.cpp \
--replace-fail "/usr/share/" "$out/share/"
''; '';
meta = with lib; { meta = {
homepage = "http://tytel.org/helm"; homepage = "https://tytel.org/helm";
description = "Free, cross-platform, polyphonic synthesizer"; description = "Free, cross-platform, polyphonic synthesizer";
longDescription = '' longDescription = ''
A free, cross-platform, polyphonic synthesizer. A free, cross-platform, polyphonic synthesizer.
@ -68,8 +87,11 @@
Effects: Formant filter, stutter, delay Effects: Formant filter, stutter, delay
''; '';
license = lib.licenses.gpl3Plus; license = lib.licenses.gpl3Plus;
maintainers = [ maintainers.magnetophon ]; maintainers = with lib.maintainers; [
platforms = platforms.linux; magnetophon
bot-wxt1221
];
platforms = lib.platforms.linux;
mainProgram = "helm"; mainProgram = "helm";
}; };
} })

View File

@ -37088,8 +37088,6 @@ with pkgs;
hck = callPackage ../tools/text/hck { }; hck = callPackage ../tools/text/hck { };
helm = callPackage ../applications/audio/helm { };
helmfile = callPackage ../applications/networking/cluster/helmfile { }; helmfile = callPackage ../applications/networking/cluster/helmfile { };
helmfile-wrapped = callPackage ../applications/networking/cluster/helmfile { helmfile-wrapped = callPackage ../applications/networking/cluster/helmfile {