Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
72 lines
1.7 KiB
Nix
72 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
writeTextFile,
|
|
cmake,
|
|
alsa-lib,
|
|
freepats,
|
|
}:
|
|
|
|
let
|
|
defaultCfgPath = "${placeholder "out"}/etc/wildmidi/wildmidi.cfg";
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "wildmidi";
|
|
version = "0.4.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Mindwerks";
|
|
repo = "wildmidi";
|
|
rev = "${pname}-${version}";
|
|
sha256 = "sha256-syjs8y75M2ul7whiZxnWMSskRJd0ixFqnep7qsTbiDE=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = lib.optionals stdenv.buildPlatform.isLinux [
|
|
alsa-lib
|
|
stdenv.cc.libc # couldn't find libm
|
|
];
|
|
|
|
preConfigure = ''
|
|
# https://github.com/Mindwerks/wildmidi/issues/236
|
|
substituteInPlace src/wildmidi.pc.in \
|
|
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
|
--replace '$'{exec_prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
"-DWILDMIDI_CFG=${defaultCfgPath}"
|
|
];
|
|
|
|
postInstall =
|
|
let
|
|
defaultCfg = writeTextFile {
|
|
name = "wildmidi.cfg";
|
|
text = ''
|
|
dir ${freepats}
|
|
source ${freepats}/freepats.cfg
|
|
'';
|
|
};
|
|
in
|
|
''
|
|
mkdir -p "$(dirname ${defaultCfgPath})"
|
|
ln -s ${defaultCfg} ${defaultCfgPath}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Software MIDI player and library";
|
|
mainProgram = "wildmidi";
|
|
longDescription = ''
|
|
WildMIDI is a simple software midi player which has a core softsynth
|
|
library that can be use with other applications.
|
|
'';
|
|
homepage = "https://wildmidi.sourceforge.net/";
|
|
# The library is LGPLv3, the wildmidi executable is GPLv3
|
|
license = licenses.lgpl3;
|
|
platforms = platforms.unix;
|
|
maintainers = [ maintainers.bjornfor ];
|
|
};
|
|
}
|