uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
36
pkgs/tools/audio/abcm2ps/default.nix
Normal file
36
pkgs/tools/audio/abcm2ps/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, docutils
|
||||
, pkg-config
|
||||
, freetype
|
||||
, pango
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abcm2ps";
|
||||
version = "8.14.13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "leesavide";
|
||||
repo = "abcm2ps";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-31cEBtVn7GlNIsPkRiW0DyKA/giLeJ86EUZr8zjYy3s=";
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
"--INSTALL=install"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ docutils pkg-config ];
|
||||
|
||||
buildInputs = [ freetype pango ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://moinejf.free.fr/";
|
||||
license = licenses.lgpl3Plus;
|
||||
description = "A command line program which converts ABC to music sheet in PostScript or SVG format";
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.dotlambda ];
|
||||
};
|
||||
}
|
||||
20
pkgs/tools/audio/abcmidi/default.nix
Normal file
20
pkgs/tools/audio/abcmidi/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, stdenv, fetchzip }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abcMIDI";
|
||||
version = "2022.05.20";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://ifdo.ca/~seymour/runabc/${pname}-${version}.zip";
|
||||
hash = "sha256-mTIpy5HHKQxpqN5mHnDvmq6lA0++etj93WCcX1i046I=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://abc.sourceforge.net/abcMIDI/";
|
||||
downloadPage = "https://ifdo.ca/~seymour/runabc/top.html";
|
||||
license = licenses.gpl2Plus;
|
||||
description = "Utilities for converting between abc and MIDI";
|
||||
platforms = platforms.unix;
|
||||
maintainers = [ maintainers.dotlambda ];
|
||||
};
|
||||
}
|
||||
31
pkgs/tools/audio/accuraterip-checksum/default.nix
Normal file
31
pkgs/tools/audio/accuraterip-checksum/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, libsndfile }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "accuraterip-checksum";
|
||||
version = "1.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "leo-bogert";
|
||||
repo = "accuraterip-checksum";
|
||||
rev = "version${version}";
|
||||
sha256 = "1a6biy78jb094rifazn4a2g1dlhryg5q8p8gwj0a60ipl0vfb9bj";
|
||||
};
|
||||
|
||||
buildInputs = [ libsndfile ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D -m755 accuraterip-checksum "$out/bin/accuraterip-checksum"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Program for computing the AccurateRip checksum of singletrack WAV files";
|
||||
homepage = "https://github.com/leo-bogert/accuraterip-checksum";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
41
pkgs/tools/audio/acousticbrainz-client/default.nix
Normal file
41
pkgs/tools/audio/acousticbrainz-client/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib, fetchFromGitHub, python3Packages, essentia-extractor }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "acousticbrainz-client";
|
||||
version = "0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MTG";
|
||||
repo = "acousticbrainz-client";
|
||||
rev = version;
|
||||
sha256 = "1g1nxh58939vysfxplrgdz366dlqnic05pkzbqh75m79brg4yrv1";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ essentia-extractor python3Packages.requests ];
|
||||
|
||||
postPatch = ''
|
||||
# The installer needs the streaming_extractor_music binary in the source directoy,
|
||||
# so we provide a symlink to it.
|
||||
ln -s ${essentia-extractor}/bin/streaming_extractor_music streaming_extractor_music
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# The installer includes a copy of the streaming_extractor_music binary (not a symlink),
|
||||
# which we don't need, because the wrapper adds essentia-extractor/binary to PATH.
|
||||
rm $out/bin/streaming_extractor_music
|
||||
'';
|
||||
|
||||
# Tests seem to be broken, but the tool works
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "abz" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A client to upload data to an AcousticBrainz server";
|
||||
license = licenses.gpl3Plus;
|
||||
homepage = "https://github.com/MTG/acousticbrainz-client";
|
||||
# essentia-extractor is only available for those platforms
|
||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
38
pkgs/tools/audio/acoustid-fingerprinter/default.nix
Normal file
38
pkgs/tools/audio/acoustid-fingerprinter/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, cmake, pkg-config, qt4, taglib, chromaprint, ffmpeg }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "acoustid-fingerprinter";
|
||||
version = "0.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://bitbucket.org/acoustid/acoustid-fingerprinter/downloads/"
|
||||
+ "${pname}-${version}.tar.gz";
|
||||
sha256 = "0ckglwy95qgqvl2l6yd8ilwpd6qs7yzmj8g7lnxb50d12115s5n0";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ qt4 taglib chromaprint ffmpeg ];
|
||||
|
||||
cmakeFlags = [ "-DTAGLIB_MIN_VERSION=${lib.getVersion taglib}" ];
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "fix-build-with-libav-10.patch";
|
||||
url = "https://bitbucket.org/acoustid/acoustid-fingerprinter/commits/2c778334a9fc2f0ccf9b1d7635c116bce6509748/raw";
|
||||
sha256 = "1smyp3x5n6jwxpgw60xsijq2fn6g1gl759h1lm5agaxhcyyqn0i0";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "fix-build-failure-on-gcc-6.patch";
|
||||
url = "https://bitbucket.org/acoustid/acoustid-fingerprinter/commits/632e87969c3a5562a5d4842b03613267ba6236b2/raw";
|
||||
sha256 = "15hm9knrpqn3yqrwyjz4zh2aypwbcycd0c5svrsy1fb2h2rh05jk";
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://acoustid.org/fingerprinter";
|
||||
description = "Audio fingerprinting tool using chromaprint";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ ehmry ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
21
pkgs/tools/audio/alsaequal/caps_9.x.patch
Normal file
21
pkgs/tools/audio/alsaequal/caps_9.x.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
--- ./ctl_equal.c
|
||||
+++ ./ctl_equal.c
|
||||
@@ -167,7 +167,7 @@
|
||||
snd_ctl_equal_t *equal;
|
||||
const char *controls = ".alsaequal.bin";
|
||||
const char *library = "/usr/lib/ladspa/caps.so";
|
||||
- const char *module = "Eq";
|
||||
+ const char *module = "Eq10";
|
||||
long channels = 2;
|
||||
const char *sufix = " Playback Volume";
|
||||
int err, i, index;
|
||||
--- ./pcm_equal.c
|
||||
+++ ./pcm_equal.c
|
||||
@@ -151,7 +151,7 @@
|
||||
snd_config_t *sconf = NULL;
|
||||
const char *controls = ".alsaequal.bin";
|
||||
const char *library = "/usr/lib/ladspa/caps.so";
|
||||
- const char *module = "Eq";
|
||||
+ const char *module = "Eq10";
|
||||
long channels = 2;
|
||||
int err;
|
||||
43
pkgs/tools/audio/alsaequal/default.nix
Normal file
43
pkgs/tools/audio/alsaequal/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, stdenv, fetchurl
|
||||
, alsa-lib, caps
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "alsaequal";
|
||||
version = "0.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://thedigitalmachine.net/tools/alsaequal-${version}.tar.bz2";
|
||||
sha256 = "1w3g9q5z3nrn3mwdhaq6zsg0jila8d102dgwgrhj9vfx58apsvli";
|
||||
};
|
||||
|
||||
buildInputs = [ alsa-lib ];
|
||||
|
||||
makeFlags = [ "DESTDIR=$(out)" ];
|
||||
|
||||
# Borrowed from Arch Linux's AUR
|
||||
patches = [
|
||||
# Adds executable permissions to resulting libraries
|
||||
# and changes their destination directory from "usr/lib/alsa-lib" to "lib/alsa-lib" to better align with nixpkgs filesystem hierarchy.
|
||||
./makefile.patch
|
||||
# Fixes control port check, which resulted in false error.
|
||||
./false_error.patch
|
||||
# Fixes name change of an "Eq" to "Eq10" method in version 9 of caps library.
|
||||
./caps_9.x.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's#/usr/lib/ladspa/caps\.so#${caps}/lib/ladspa/caps\.so#g' ctl_equal.c pcm_equal.c
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p "$out/lib/alsa-lib"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Real-time adjustable equalizer plugin for ALSA";
|
||||
homepage = "https://thedigitalmachine.net/alsaequal.html";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ ymeister ];
|
||||
};
|
||||
}
|
||||
13
pkgs/tools/audio/alsaequal/false_error.patch
Normal file
13
pkgs/tools/audio/alsaequal/false_error.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
--- ./ctl_equal.c
|
||||
+++ ./ctl_equal.c
|
||||
@@ -263,8 +263,8 @@
|
||||
for(i = 0; i < equal->num_input_controls; i++) {
|
||||
if(equal->control_data->control[i].type == LADSPA_CNTRL_INPUT) {
|
||||
index = equal->control_data->control[i].index;
|
||||
- if(equal->klass->PortDescriptors[index] !=
|
||||
- (LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) {
|
||||
+ if(equal->klass->PortDescriptors[index] &
|
||||
+ (LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL) == 0) {
|
||||
SNDERR("Problem with control file %s, %d.", controls, index);
|
||||
return -1;
|
||||
}
|
||||
13
pkgs/tools/audio/alsaequal/makefile.patch
Normal file
13
pkgs/tools/audio/alsaequal/makefile.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
--- ./Makefile
|
||||
+++ ./Makefile
|
||||
@@ -45,8 +45,8 @@
|
||||
|
||||
install: all
|
||||
@echo Installing...
|
||||
- $(Q)install -m 644 $(SND_PCM_BIN) ${DESTDIR}/usr/lib/alsa-lib/
|
||||
- $(Q)install -m 644 $(SND_CTL_BIN) ${DESTDIR}/usr/lib/alsa-lib/
|
||||
+ $(Q)install -m 755 $(SND_PCM_BIN) ${DESTDIR}/lib/alsa-lib/
|
||||
+ $(Q)install -m 755 $(SND_CTL_BIN) ${DESTDIR}/lib/alsa-lib/
|
||||
|
||||
uninstall:
|
||||
@echo Un-installing...
|
||||
37
pkgs/tools/audio/audiowaveform/default.nix
Normal file
37
pkgs/tools/audio/audiowaveform/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, gtest, boost, gd, libsndfile, libmad, libid3tag }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "audiowaveform";
|
||||
version = "1.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bbc";
|
||||
repo = "audiowaveform";
|
||||
rev = version;
|
||||
sha256 = "sha256-ZkkGRohcydi2C1S7J0+yGWsqK7ivxQmFuq1NGNiPPNY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake gtest ];
|
||||
|
||||
buildInputs = [ boost gd libsndfile libmad libid3tag ];
|
||||
|
||||
preConfigure = ''
|
||||
ln -s ${gtest.src} googletest
|
||||
'';
|
||||
|
||||
# One test is failing, see PR #101947
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "C++ program to generate waveform data and render waveform images from audio files";
|
||||
longDescription = ''
|
||||
audiowaveform is a C++ command-line application that generates waveform data from either MP3, WAV, FLAC, or Ogg Vorbis format audio files.
|
||||
Waveform data can be used to produce a visual rendering of the audio, similar in appearance to audio editing applications.
|
||||
'';
|
||||
homepage = "https://github.com/bbc/audiowaveform";
|
||||
changelog = "https://github.com/bbc/audiowaveform/blob/${version}/ChangeLog";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ edbentley ];
|
||||
};
|
||||
}
|
||||
95
pkgs/tools/audio/beets/builtin-plugins.nix
Normal file
95
pkgs/tools/audio/beets/builtin-plugins.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{ stdenv
|
||||
, aacgain
|
||||
, essentia-extractor
|
||||
, ffmpeg
|
||||
, flac
|
||||
, imagemagick
|
||||
, keyfinder-cli
|
||||
, lib
|
||||
, mp3gain
|
||||
, mp3val
|
||||
, python3Packages
|
||||
, ...
|
||||
}: {
|
||||
absubmit = {
|
||||
enable = lib.elem stdenv.hostPlatform.system essentia-extractor.meta.platforms;
|
||||
wrapperBins = [ essentia-extractor ];
|
||||
};
|
||||
acousticbrainz.propagatedBuildInputs = [ python3Packages.requests ];
|
||||
albumtypes = { };
|
||||
aura.propagatedBuildInputs = with python3Packages; [ flask pillow ];
|
||||
badfiles.wrapperBins = [ mp3val flac ];
|
||||
bareasc = { };
|
||||
beatport.propagatedBuildInputs = [ python3Packages.requests-oauthlib ];
|
||||
bench = { };
|
||||
bpd = { };
|
||||
bpm = { };
|
||||
bpsync = { };
|
||||
bucket = { };
|
||||
chroma.propagatedBuildInputs = [ python3Packages.pyacoustid ];
|
||||
convert.wrapperBins = [ ffmpeg ];
|
||||
deezer.propagatedBuildInputs = [ python3Packages.requests ];
|
||||
discogs.propagatedBuildInputs = with python3Packages; [ discogs-client requests ];
|
||||
duplicates = { };
|
||||
edit = { };
|
||||
embedart = {
|
||||
propagatedBuildInputs = with python3Packages; [ pillow ];
|
||||
wrapperBins = [ imagemagick ];
|
||||
};
|
||||
embyupdate.propagatedBuildInputs = [ python3Packages.requests ];
|
||||
export = { };
|
||||
fetchart = {
|
||||
propagatedBuildInputs = with python3Packages; [ requests pillow ];
|
||||
wrapperBins = [ imagemagick ];
|
||||
};
|
||||
filefilter = { };
|
||||
fish = { };
|
||||
freedesktop = { };
|
||||
fromfilename = { };
|
||||
ftintitle = { };
|
||||
fuzzy = { };
|
||||
gmusic = { };
|
||||
hook = { };
|
||||
ihate = { };
|
||||
importadded = { };
|
||||
importfeeds = { };
|
||||
info = { };
|
||||
inline = { };
|
||||
ipfs = { };
|
||||
keyfinder.wrapperBins = [ keyfinder-cli ];
|
||||
kodiupdate.propagatedBuildInputs = [ python3Packages.requests ];
|
||||
lastgenre.propagatedBuildInputs = [ python3Packages.pylast ];
|
||||
lastimport.propagatedBuildInputs = [ python3Packages.pylast ];
|
||||
loadext.propagatedBuildInputs = [ python3Packages.requests ];
|
||||
lyrics.propagatedBuildInputs = [ python3Packages.beautifulsoup4 ];
|
||||
mbcollection = { };
|
||||
mbsubmit = { };
|
||||
mbsync = { };
|
||||
metasync = { };
|
||||
missing = { };
|
||||
mpdstats.propagatedBuildInputs = [ python3Packages.mpd2 ];
|
||||
mpdupdate.propagatedBuildInputs = [ python3Packages.mpd2 ];
|
||||
parentwork = { };
|
||||
permissions = { };
|
||||
play = { };
|
||||
playlist.propagatedBuildInputs = [ python3Packages.requests ];
|
||||
plexupdate = { };
|
||||
random = { };
|
||||
replaygain.wrapperBins = [ aacgain ffmpeg mp3gain ];
|
||||
rewrite = { };
|
||||
scrub = { };
|
||||
smartplaylist = { };
|
||||
sonosupdate.propagatedBuildInputs = [ python3Packages.soco ];
|
||||
spotify = { };
|
||||
subsonicplaylist.propagatedBuildInputs = [ python3Packages.requests ];
|
||||
subsonicupdate.propagatedBuildInputs = [ python3Packages.requests ];
|
||||
the = { };
|
||||
thumbnails = {
|
||||
propagatedBuildInputs = with python3Packages; [ pillow pyxdg ];
|
||||
wrapperBins = [ imagemagick ];
|
||||
};
|
||||
types.testPaths = [ "test/test_types_plugin.py" ];
|
||||
unimported = { };
|
||||
web.propagatedBuildInputs = [ python3Packages.flask ];
|
||||
zero = { };
|
||||
}
|
||||
147
pkgs/tools/audio/beets/common.nix
Normal file
147
pkgs/tools/audio/beets/common.nix
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
{ stdenv
|
||||
, bashInteractive
|
||||
, diffPlugins
|
||||
, glibcLocales
|
||||
, gobject-introspection
|
||||
, gst_all_1
|
||||
, lib
|
||||
, python3Packages
|
||||
, runtimeShell
|
||||
, writeScript
|
||||
|
||||
# plugin deps
|
||||
, aacgain
|
||||
, essentia-extractor
|
||||
, ffmpeg
|
||||
, flac
|
||||
, imagemagick
|
||||
, keyfinder-cli
|
||||
, mp3gain
|
||||
, mp3val
|
||||
|
||||
, src
|
||||
, version
|
||||
, pluginOverrides ? { }
|
||||
, disableAllPlugins ? false
|
||||
}@inputs:
|
||||
let
|
||||
inherit (lib) attrNames attrValues concatMap;
|
||||
|
||||
mkPlugin = { enable ? !disableAllPlugins, builtin ? false, propagatedBuildInputs ? [ ], testPaths ? [ ], wrapperBins ? [ ] }: {
|
||||
inherit enable builtin propagatedBuildInputs testPaths wrapperBins;
|
||||
};
|
||||
|
||||
basePlugins = lib.mapAttrs (_: a: { builtin = true; } // a) (import ./builtin-plugins.nix inputs);
|
||||
allPlugins = lib.mapAttrs (_: mkPlugin) (lib.recursiveUpdate basePlugins pluginOverrides);
|
||||
builtinPlugins = lib.filterAttrs (_: p: p.builtin) allPlugins;
|
||||
enabledPlugins = lib.filterAttrs (_: p: p.enable) allPlugins;
|
||||
disabledPlugins = lib.filterAttrs (_: p: !p.enable) allPlugins;
|
||||
|
||||
pluginWrapperBins = concatMap (p: p.wrapperBins) (attrValues enabledPlugins);
|
||||
in
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "beets";
|
||||
inherit src version;
|
||||
|
||||
patches = [
|
||||
# Bash completion fix for Nix
|
||||
./patches/bash-completion-always-print.patch
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
confuse
|
||||
gobject-introspection
|
||||
gst-python
|
||||
jellyfish
|
||||
mediafile
|
||||
munkres
|
||||
musicbrainzngs
|
||||
mutagen
|
||||
pygobject3
|
||||
pyyaml
|
||||
reflink
|
||||
unidecode
|
||||
] ++ (concatMap (p: p.propagatedBuildInputs) (attrValues enabledPlugins));
|
||||
|
||||
buildInputs = [
|
||||
] ++ (with gst_all_1; [
|
||||
gst-plugins-base
|
||||
gst-plugins-good
|
||||
gst-plugins-ugly
|
||||
]);
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/zsh/site-functions
|
||||
cp extra/_beet $out/share/zsh/site-functions/
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
|
||||
tmphome="$(mktemp -d)"
|
||||
|
||||
EDITOR="${writeScript "beetconfig.sh" ''
|
||||
#!${runtimeShell}
|
||||
cat > "$1" <<CFG
|
||||
plugins: ${lib.concatStringsSep " " (attrNames enabledPlugins)}
|
||||
CFG
|
||||
''}" HOME="$tmphome" "$out/bin/beet" config -e
|
||||
EDITOR=true HOME="$tmphome" "$out/bin/beet" config -e
|
||||
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
makeWrapperArgs = [
|
||||
"--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\""
|
||||
"--set GST_PLUGIN_SYSTEM_PATH_1_0 \"$GST_PLUGIN_SYSTEM_PATH_1_0\""
|
||||
"--prefix PATH : ${lib.makeBinPath pluginWrapperBins}"
|
||||
];
|
||||
|
||||
checkInputs = with python3Packages; [
|
||||
pytest
|
||||
mock
|
||||
rarfile
|
||||
responses
|
||||
] ++ pluginWrapperBins;
|
||||
|
||||
disabledTestPaths = lib.flatten (attrValues (lib.mapAttrs (n: v: v.testPaths ++ [ "test/test_${n}.py" ]) disabledPlugins));
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
# Check for undefined plugins
|
||||
find beetsplug -mindepth 1 \
|
||||
\! -path 'beetsplug/__init__.py' -a \
|
||||
\( -name '*.py' -o -path 'beetsplug/*/__init__.py' \) -print \
|
||||
| sed -n -re 's|^beetsplug/([^/.]+).*|\1|p' \
|
||||
| sort -u > plugins_available
|
||||
${diffPlugins (attrNames builtinPlugins) "plugins_available"}
|
||||
|
||||
export BEETS_TEST_SHELL="${bashInteractive}/bin/bash --norc"
|
||||
export HOME="$(mktemp -d)"
|
||||
|
||||
args=" -m pytest -r fEs"
|
||||
eval "disabledTestPaths=($disabledTestPaths)"
|
||||
for path in ''${disabledTestPaths[@]}; do
|
||||
if [ -e "$path" ]; then
|
||||
args+=" --ignore $path"
|
||||
else
|
||||
echo "Skipping non-existent test path '$path'"
|
||||
fi
|
||||
done
|
||||
|
||||
python $args
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Music tagger and library organizer";
|
||||
homepage = "https://beets.io";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ aszlig doronbehar lovesegfault pjones ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
50
pkgs/tools/audio/beets/default.nix
Normal file
50
pkgs/tools/audio/beets/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
/*
|
||||
** To customize the enabled beets plugins, use the pluginOverrides input to the
|
||||
** derivation.
|
||||
** Examples:
|
||||
**
|
||||
** Disabling a builtin plugin:
|
||||
** beets.override { pluginOverrides = { beatport.enable = false; }; }
|
||||
**
|
||||
** Enabling an external plugin:
|
||||
** beets.override { pluginOverrides = {
|
||||
** alternatives = { enable = true; propagatedBuildInputs = [ beetsPackages.alternatives ]; };
|
||||
** }; }
|
||||
*/
|
||||
lib.makeExtensible (self: {
|
||||
beets = self.beets-stable;
|
||||
|
||||
beets-stable = callPackage ./common.nix rec {
|
||||
version = "1.6.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "beetbox";
|
||||
repo = "beets";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-fT+rCJJQR7bdfAcmeFRaknmh4ZOP4RCx8MXpq7/D8tM=";
|
||||
};
|
||||
};
|
||||
|
||||
beets-minimal = self.beets.override { disableAllPlugins = true; };
|
||||
|
||||
beets-unstable = callPackage ./common.nix {
|
||||
version = "unstable-2022-05-08";
|
||||
src = fetchFromGitHub {
|
||||
owner = "beetbox";
|
||||
repo = "beets";
|
||||
rev = "e06cf7969bfdfa4773049699320471be45d56054";
|
||||
hash = "sha256-yWwxYSzSSmx2UfCn0EBH23hQGZKSRn/c8ryvxLUeHdM=";
|
||||
};
|
||||
pluginOverrides = {
|
||||
# unstable has a new plugin, so we register it here.
|
||||
limit = { builtin = true; };
|
||||
};
|
||||
};
|
||||
|
||||
alternatives = callPackage ./plugins/alternatives.nix { beets = self.beets-minimal; };
|
||||
copyartifacts = callPackage ./plugins/copyartifacts.nix { beets = self.beets-minimal; };
|
||||
extrafiles = callPackage ./plugins/extrafiles.nix { beets = self.beets-minimal; };
|
||||
})
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
diff --git i/beets/ui/commands.py w/beets/ui/commands.py
|
||||
index 3a337401..d08a6763 100755
|
||||
--- i/beets/ui/commands.py
|
||||
+++ w/beets/ui/commands.py
|
||||
@@ -1759,21 +1759,6 @@ default_commands.append(config_cmd)
|
||||
def print_completion(*args):
|
||||
for line in completion_script(default_commands + plugins.commands()):
|
||||
print_(line, end='')
|
||||
- if not any(map(os.path.isfile, BASH_COMPLETION_PATHS)):
|
||||
- log.warning('Warning: Unable to find the bash-completion package. '
|
||||
- 'Command line completion might not work.')
|
||||
-
|
||||
-
|
||||
-BASH_COMPLETION_PATHS = map(syspath, [
|
||||
- '/etc/bash_completion',
|
||||
- '/usr/share/bash-completion/bash_completion',
|
||||
- '/usr/local/share/bash-completion/bash_completion',
|
||||
- # SmartOS
|
||||
- '/opt/local/share/bash-completion/bash_completion',
|
||||
- # Homebrew (before bash-completion2)
|
||||
- '/usr/local/etc/bash_completion',
|
||||
-])
|
||||
-
|
||||
|
||||
def completion_script(commands):
|
||||
"""Yield the full completion shell script as strings.
|
||||
diff --git i/test/test_ui.py w/test/test_ui.py
|
||||
index 9804b0a1..c3b53243 100644
|
||||
--- i/test/test_ui.py
|
||||
+++ w/test/test_ui.py
|
||||
@@ -1229,12 +1229,7 @@ class CompletionTest(_common.TestCase, TestHelper):
|
||||
stdout=subprocess.PIPE, env=env)
|
||||
|
||||
# Load bash_completion library.
|
||||
- for path in commands.BASH_COMPLETION_PATHS:
|
||||
- if os.path.exists(util.syspath(path)):
|
||||
- bash_completion = path
|
||||
- break
|
||||
- else:
|
||||
- self.skipTest('bash-completion script not found')
|
||||
+ self.skipTest('bash-completion script not found')
|
||||
try:
|
||||
with open(util.syspath(bash_completion), 'rb') as f:
|
||||
tester.stdin.writelines(f)
|
||||
32
pkgs/tools/audio/beets/plugins/alternatives.nix
Normal file
32
pkgs/tools/audio/beets/plugins/alternatives.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, fetchFromGitHub, beets, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "beets-alternatives";
|
||||
version = "unstable-2021-02-01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "beets-alternatives";
|
||||
owner = "geigerzaehler";
|
||||
rev = "288299e3aa9a1602717b04c28696fce5ce4259bf";
|
||||
sha256 = "sha256-Xl7AHr33hXQqQDuFbWuj8HrIugeipJFPmvNXpCkU/mI=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "addopts = --cov --cov-report=term --cov-report=html" ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ beets ];
|
||||
|
||||
checkInputs = with python3Packages; [
|
||||
pytestCheckHook
|
||||
mock
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Beets plugin to manage external files";
|
||||
homepage = "https://github.com/geigerzaehler/beets-alternatives";
|
||||
maintainers = with maintainers; [ aszlig lovesegfault ];
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
||||
34
pkgs/tools/audio/beets/plugins/copyartifacts.nix
Normal file
34
pkgs/tools/audio/beets/plugins/copyartifacts.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, fetchFromGitHub, beets, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonApplication {
|
||||
pname = "beets-copyartifacts";
|
||||
version = "unstable-2020-02-15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "beets-copyartifacts";
|
||||
owner = "adammillerio";
|
||||
rev = "85eefaebf893cb673fa98bfde48406ec99fd1e4b";
|
||||
sha256 = "sha256-bkT2BZZ2gdcacgvyrVe2vMrOMV8iMAm8Q5xyrZzyqU0=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i -e '/install_requires/,/\]/{/beets/d}' setup.py
|
||||
sed -i -e '/namespace_packages/d' setup.py
|
||||
printf 'from pkgutil import extend_path\n__path__ = extend_path(__path__, __name__)\n' >beetsplug/__init__.py
|
||||
'';
|
||||
|
||||
pytestFlagsArray = [ "-r fEs" ];
|
||||
|
||||
checkInputs = with python3Packages; [
|
||||
pytestCheckHook
|
||||
beets
|
||||
six
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Beets plugin to move non-music files during the import process";
|
||||
homepage = "https://github.com/sbarakat/beets-copyartifacts";
|
||||
license = lib.licenses.mit;
|
||||
inherit (beets.meta) platforms;
|
||||
};
|
||||
}
|
||||
37
pkgs/tools/audio/beets/plugins/extrafiles.nix
Normal file
37
pkgs/tools/audio/beets/plugins/extrafiles.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, fetchFromGitHub, beets, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonApplication {
|
||||
pname = "beets-extrafiles";
|
||||
version = "unstable-2020-12-13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "beets-extrafiles";
|
||||
owner = "Holzhaus";
|
||||
rev = "a1d6ef9a9682b6bf7af9483541e56a3ff12247b8";
|
||||
sha256 = "sha256-ajuEbieWjTCNjdRZuGUwvStZwjx260jmY0m+ZqNd7ec=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i -e '/install_requires/,/\]/{/beets/d}' setup.py
|
||||
sed -i -e '/namespace_packages/d' setup.py
|
||||
sed -i -e 's/mediafile~=0.6.0/mediafile>=0.6.0/' setup.py
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ mediafile ];
|
||||
|
||||
checkInputs = [
|
||||
python3Packages.pytestCheckHook
|
||||
beets
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
HOME="$(mktemp -d)"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/Holzhaus/beets-extrafiles";
|
||||
description = "A plugin for beets that copies additional files and directories during the import process";
|
||||
license = lib.licenses.mit;
|
||||
inherit (beets.meta) platforms;
|
||||
};
|
||||
}
|
||||
164
pkgs/tools/audio/botamusique/default.nix
Normal file
164
pkgs/tools/audio/botamusique/default.nix
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, python3Packages
|
||||
, ffmpeg
|
||||
, makeWrapper
|
||||
, nixosTests
|
||||
|
||||
# For the update script
|
||||
, coreutils
|
||||
, curl
|
||||
, nix-prefetch-git
|
||||
, jq
|
||||
, nodePackages
|
||||
}:
|
||||
let
|
||||
nodejs = pkgs.nodejs-14_x;
|
||||
nodeEnv = import ../../../development/node-packages/node-env.nix {
|
||||
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
|
||||
inherit pkgs nodejs;
|
||||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
||||
};
|
||||
botamusiqueNodePackages = import ./node-packages.nix {
|
||||
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
|
||||
inherit nodeEnv;
|
||||
};
|
||||
|
||||
srcJson = lib.importJSON ./src.json;
|
||||
src = fetchFromGitHub {
|
||||
owner = "azlux";
|
||||
repo = "botamusique";
|
||||
inherit (srcJson) rev sha256;
|
||||
};
|
||||
|
||||
nodeDependencies = (botamusiqueNodePackages.shell.override (old: {
|
||||
src = src + "/web";
|
||||
})).nodeDependencies;
|
||||
|
||||
# Python needed to instantiate the html templates
|
||||
buildPython = python3Packages.python.withPackages (ps: [ ps.jinja2 ]);
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "botamusique";
|
||||
version = srcJson.version;
|
||||
|
||||
inherit src;
|
||||
|
||||
patches = [
|
||||
# botamusique by default resolves relative state paths by first checking
|
||||
# whether it exists in the working directory, then falls back to using the
|
||||
# installation directory. With Nix however, the installation directory is
|
||||
# not writable, so that won't work. So we change this so that it uses
|
||||
# relative paths unconditionally, whether they exist or not.
|
||||
./unconditional-relative-state-paths.patch
|
||||
|
||||
# We can't update the package at runtime with NixOS, so this patch makes
|
||||
# the !update command mention that
|
||||
./no-runtime-update.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# However, the function that's patched above is also used for
|
||||
# configuration.default.ini, which is in the installation directory
|
||||
# after all. So we need to counter-patch it here so it can find it absolutely
|
||||
substituteInPlace mumbleBot.py \
|
||||
--replace "configuration.default.ini" "$out/share/botamusique/configuration.default.ini"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
nodejs
|
||||
python3Packages.wrapPython
|
||||
];
|
||||
|
||||
pythonPath = with python3Packages; [
|
||||
flask
|
||||
magic
|
||||
mutagen
|
||||
packaging
|
||||
pillow
|
||||
pymumble
|
||||
pyradios
|
||||
requests
|
||||
yt-dlp
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
# Generates artifacts in ./static
|
||||
(
|
||||
cd web
|
||||
ln -s ${nodeDependencies}/lib/node_modules ./node_modules
|
||||
export PATH="${nodeDependencies}/bin:$PATH"
|
||||
|
||||
npm run build
|
||||
)
|
||||
|
||||
# Fills out http templates
|
||||
${buildPython}/bin/python scripts/translate_templates.py --lang-dir lang/ --template-dir templates/
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share $out/bin
|
||||
cp -r . $out/share/botamusique
|
||||
chmod +x $out/share/botamusique/mumbleBot.py
|
||||
wrapPythonProgramsIn $out/share/botamusique "$out $pythonPath"
|
||||
|
||||
# Convenience binary and wrap with ffmpeg dependency
|
||||
makeWrapper $out/share/botamusique/mumbleBot.py $out/bin/botamusique \
|
||||
--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = pkgs.writeShellScript "botamusique-updater" ''
|
||||
export PATH=${lib.makeBinPath [ coreutils curl nix-prefetch-git jq nodePackages.node2nix ]}
|
||||
set -ex
|
||||
|
||||
OWNER=azlux
|
||||
REPO=botamusique
|
||||
VERSION=$(curl https://api.github.com/repos/$OWNER/$REPO/releases/latest | jq -r '.tag_name')
|
||||
|
||||
nix-prefetch-git --rev "$VERSION" --url https://github.com/$OWNER/$REPO | \
|
||||
jq > ${toString ./src.json } \
|
||||
--arg version "$VERSION" \
|
||||
'.version |= $version'
|
||||
path=$(jq '.path' -r < ${toString ./src.json})
|
||||
|
||||
tmp=$(mktemp -d)
|
||||
trap 'rm -rf "$tmp"' exit
|
||||
|
||||
# botamusique doesn't have a version in its package.json
|
||||
# But that's needed for node2nix
|
||||
jq < "$path"/web/package.json > "$tmp/package.json" \
|
||||
--arg version "$VERSION" \
|
||||
'.version |= $version'
|
||||
|
||||
node2nix \
|
||||
--input "$tmp"/package.json \
|
||||
--lock "$path"/web/package-lock.json \
|
||||
--no-copy-node-env \
|
||||
--development \
|
||||
--composition /dev/null \
|
||||
--output ${toString ./node-packages.nix}
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) botamusique;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Bot to play youtube / soundcloud / radio / local music on Mumble";
|
||||
homepage = "https://github.com/azlux/botamusique";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ infinisil ];
|
||||
};
|
||||
}
|
||||
12
pkgs/tools/audio/botamusique/no-runtime-update.patch
Normal file
12
pkgs/tools/audio/botamusique/no-runtime-update.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/util.py b/util.py
|
||||
index bfec1ed..5147757 100644
|
||||
--- a/util.py
|
||||
+++ b/util.py
|
||||
@@ -132,6 +132,7 @@ def check_update(current_version):
|
||||
|
||||
|
||||
def update(current_version):
|
||||
+ return "Can't update Nix installation at runtime"
|
||||
global log
|
||||
|
||||
target = var.config.get('bot', 'target_version')
|
||||
5237
pkgs/tools/audio/botamusique/node-packages.nix
generated
Normal file
5237
pkgs/tools/audio/botamusique/node-packages.nix
generated
Normal file
File diff suppressed because it is too large
Load diff
12
pkgs/tools/audio/botamusique/src.json
Normal file
12
pkgs/tools/audio/botamusique/src.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"url": "https://github.com/azlux/botamusique",
|
||||
"rev": "9b9b4e40ce7b077ebfa3b9be08d32025d1e43bc3",
|
||||
"date": "2021-10-27T02:29:59+02:00",
|
||||
"path": "/nix/store/9gxn2bw0757yrmx0xhhwq642lixyy88x-botamusique",
|
||||
"sha256": "07n6nyi84ddqp2x8xrds7q83yfqapl5qhkcprzjsmvxhv4a3ar8q",
|
||||
"fetchLFS": false,
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false,
|
||||
"version": "7.2.2"
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/util.py b/util.py
|
||||
index bfec1ed..0546772 100644
|
||||
--- a/util.py
|
||||
+++ b/util.py
|
||||
@@ -22,16 +22,7 @@ log = logging.getLogger("bot")
|
||||
|
||||
|
||||
def solve_filepath(path):
|
||||
- if not path:
|
||||
- return ''
|
||||
-
|
||||
- if path[0] == '/':
|
||||
- return path
|
||||
- elif os.path.exists(path):
|
||||
- return path
|
||||
- else:
|
||||
- mydir = os.path.dirname(os.path.realpath(__file__))
|
||||
- return mydir + '/' + path
|
||||
+ return path
|
||||
|
||||
|
||||
def get_recursive_file_list_sorted(path):
|
||||
43
pkgs/tools/audio/bpm-tools/default.nix
Normal file
43
pkgs/tools/audio/bpm-tools/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, gnuplot
|
||||
, sox
|
||||
, flac
|
||||
, id3v2
|
||||
, vorbis-tools
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
let
|
||||
path = lib.makeBinPath [ gnuplot sox flac id3v2 vorbis-tools ];
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bpm-tools";
|
||||
version = "0.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.pogo.org.uk/~mark/bpm-tools/releases/bpm-tools-${version}.tar.gz";
|
||||
sha256 = "151vfbs8h3cibs7kbdps5pqrsxhpjv16y2iyfqbxzsclylgfivrp";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/bpm-tag --prefix PATH : "${path}"
|
||||
wrapProgram $out/bin/bpm-graph --prefix PATH : "${path}"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://www.pogo.org.uk/~mark/bpm-tools/";
|
||||
description = "Automatically calculate BPM (tempo) of music files";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
};
|
||||
}
|
||||
|
||||
37
pkgs/tools/audio/darkice/default.nix
Normal file
37
pkgs/tools/audio/darkice/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config
|
||||
, libjack2, alsa-lib, libpulseaudio
|
||||
, faac, lame, libogg, libopus, libvorbis, libsamplerate
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "darkice";
|
||||
version = "1.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/rafael2k/darkice/releases/download/v${version}/darkice-${version}.tar.gz";
|
||||
sha256 = "05yq7lggxygrkd76yiqby3msrgdn082p0qlvmzzv9xbw8hmyra76";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
libopus libvorbis libogg libpulseaudio alsa-lib libsamplerate libjack2 lame
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-fpermissive";
|
||||
|
||||
configureFlags = [
|
||||
"--with-faac-prefix=${faac}"
|
||||
"--with-lame-prefix=${lame.lib}"
|
||||
];
|
||||
|
||||
patches = [ ./fix-undeclared-memmove.patch ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
homepage = "http://darkice.org/";
|
||||
description = "Live audio streamer";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [ ikervagyok fpletz ];
|
||||
};
|
||||
}
|
||||
13
pkgs/tools/audio/darkice/fix-undeclared-memmove.patch
Normal file
13
pkgs/tools/audio/darkice/fix-undeclared-memmove.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/FaacEncoder.cpp b/src/FaacEncoder.cpp
|
||||
index 1100226..3ab1805 100644
|
||||
--- a/src/FaacEncoder.cpp
|
||||
+++ b/src/FaacEncoder.cpp
|
||||
@@ -36,7 +36,7 @@
|
||||
// compile the whole file only if faac support configured in
|
||||
#ifdef HAVE_FAAC_LIB
|
||||
|
||||
-
|
||||
+#include <string.h>
|
||||
|
||||
#include "Exception.h"
|
||||
#include "Util.h"
|
||||
36
pkgs/tools/audio/dir2opus/default.nix
Normal file
36
pkgs/tools/audio/dir2opus/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, stdenv, fetchFromGitHub, python, mutagen, wrapPython, opusTools, mpg123 }:
|
||||
|
||||
let version = "0.12.2"; in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dir2opus";
|
||||
inherit version;
|
||||
|
||||
pythonPath = [ mutagen ];
|
||||
buildInputs = [ wrapPython ];
|
||||
propagatedBuildInputs = [ opusTools mpg123 ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ehmry";
|
||||
repo = "dir2opus";
|
||||
rev = version;
|
||||
hash = "sha256-ZEsXwqxikWxFOz99wTI3rEK/rEYA+BSWGrCwW4q+FFc=";
|
||||
};
|
||||
|
||||
postPatch = "sed -i -e 's|#!/usr/bin/python|#!${python}/bin/python|' dir2opus";
|
||||
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/bin $out/share/man/man1
|
||||
cp dir2opus $out/bin
|
||||
cp dir2opus.1 $out/share/man/man1
|
||||
'';
|
||||
|
||||
postFixup = "wrapPythonPrograms";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/ehmry/dir2opus";
|
||||
maintainers = [ maintainers.ehmry ];
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
52
pkgs/tools/audio/dsp/default.nix
Normal file
52
pkgs/tools/audio/dsp/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, fftw
|
||||
, zita-convolver
|
||||
, fftwFloat
|
||||
, libsndfile
|
||||
, ffmpeg
|
||||
, alsa-lib
|
||||
, libao
|
||||
, libmad
|
||||
, ladspaH
|
||||
, libtool
|
||||
, libpulseaudio
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dsp";
|
||||
version = "1.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bmc0";
|
||||
repo = "dsp";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-LTgjpzAGi3oL8l5NcJj1ortKFd3vWDfXHr8YyedAxEE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
fftw
|
||||
zita-convolver
|
||||
fftwFloat
|
||||
libsndfile
|
||||
ffmpeg
|
||||
alsa-lib
|
||||
libao
|
||||
libmad
|
||||
ladspaH
|
||||
libtool
|
||||
libpulseaudio
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/bmc0/dsp";
|
||||
description = "An audio processing program with an interactive mode";
|
||||
license = licenses.isc;
|
||||
maintainers = with maintainers; [ aaronjheng ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
39
pkgs/tools/audio/essentia-extractor/default.nix
Normal file
39
pkgs/tools/audio/essentia-extractor/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
let
|
||||
arch_table = {
|
||||
"x86_64-linux" = "linux-x86_64";
|
||||
"i686-linux" = "linux-i686";
|
||||
};
|
||||
|
||||
sha_table = {
|
||||
"x86_64-linux" = "d9902aadac4f442992877945da2a6fe8d6ea6b0de314ca8ac0c28dc5f253f7d8";
|
||||
"i686-linux" = "46deb0a053b4910c4e68737a7b6556ff5360260c8f86652f91a0130445f5c949";
|
||||
};
|
||||
|
||||
throwSystem = throw "Unsupported system: ${stdenv.system}";
|
||||
arch = arch_table.${stdenv.system} or throwSystem;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "essentia-extractor";
|
||||
version = "2.1_beta2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://ftp.acousticbrainz.org/pub/acousticbrainz/essentia-extractor-v${version}-${arch}.tar.gz";
|
||||
sha256 = sha_table.${stdenv.system} or throwSystem;
|
||||
};
|
||||
|
||||
unpackPhase = "unpackFile $src ; export sourceRoot=.";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp streaming_extractor_music $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://acousticbrainz.org/download";
|
||||
description = "AcousticBrainz audio feature extractor";
|
||||
license = licenses.agpl3Plus;
|
||||
maintainers = with maintainers; [ lovesegfault ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
};
|
||||
}
|
||||
33
pkgs/tools/audio/ezstream/default.nix
Normal file
33
pkgs/tools/audio/ezstream/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchurl, libiconv, libshout, taglib, libxml2, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ezstream";
|
||||
version = "0.6.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://ftp.osuosl.org/pub/xiph/releases/ezstream/${pname}-${version}.tar.gz";
|
||||
sha256 = "f86eb8163b470c3acbc182b42406f08313f85187bd9017afb8b79b02f03635c9";
|
||||
};
|
||||
|
||||
buildInputs = [ libiconv libshout taglib libxml2 ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A command line source client for Icecast media streaming servers";
|
||||
longDescription = ''
|
||||
Ezstream is a command line source client for Icecast media
|
||||
streaming servers. It began as the successor of the old "shout"
|
||||
utility, and has since gained a lot of useful features.
|
||||
|
||||
In its basic mode of operation, it streams media files or data
|
||||
from standard input without reencoding and thus requires only
|
||||
very little CPU resources.
|
||||
'';
|
||||
homepage = "https://icecast.org/ezstream/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.barrucadu ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
72
pkgs/tools/audio/fmtoy/default.nix
Normal file
72
pkgs/tools/audio/fmtoy/default.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, unstableGitUpdater
|
||||
, dos2unix
|
||||
, pkg-config
|
||||
, zlib
|
||||
, alsa-lib
|
||||
, libjack2
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fmtoy";
|
||||
version = "unstable-2021-12-24";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vampirefrog";
|
||||
repo = "fmtoy";
|
||||
rev = "0de6703b3373eb5bf19fd3deaae889286f330c21";
|
||||
sha256 = "0sr6klkmjd2hd2kyb9y0x986d6lsy8bziizfc6cmhkqcq92fh45c";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
dos2unix Makefile
|
||||
# Don't hardcode compilers
|
||||
sed -i -e '/CC=/d' -e '/CXX=/d' Makefile
|
||||
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# Remove Linux-only program & its dependencies
|
||||
sed -i -e '/PROGS/ s/fmtoy_jack//' Makefile
|
||||
substituteInPlace Makefile \
|
||||
--replace '$(shell pkg-config alsa jack --cflags)' ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
dos2unix
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
zlib
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
alsa-lib
|
||||
libjack2
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
for prog in $(grep 'PROGS=' Makefile | cut -d= -f2-); do
|
||||
install -Dm755 $prog $out/bin/$prog
|
||||
done
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = unstableGitUpdater {
|
||||
url = "https://github.com/vampirefrog/fmtoy.git";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/vampirefrog/fmtoy";
|
||||
description = "Tools for FM voices for Yamaha YM chips (OPL, OPM and OPN series)";
|
||||
# Unknown license situation
|
||||
# https://github.com/vampirefrog/fmtoy/issues/1
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ OPNA2608 ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
28
pkgs/tools/audio/glyr/default.nix
Normal file
28
pkgs/tools/audio/glyr/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake
|
||||
, curl, glib, sqlite, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.0.10";
|
||||
pname = "glyr";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sahib";
|
||||
repo = "glyr";
|
||||
rev = version;
|
||||
sha256 = "1miwbqzkhg0v3zysrwh60pj9sv6ci4lzq2vq2hhc6pc6hdyh8xyr";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ sqlite glib curl ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A music related metadata searchengine";
|
||||
homepage = "https://github.com/sahib/glyr";
|
||||
license = licenses.lgpl3;
|
||||
maintainers = [ maintainers.sternenseemann ];
|
||||
mainProgram = "glyrc";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
31
pkgs/tools/audio/gvolicon/default.nix
Normal file
31
pkgs/tools/audio/gvolicon/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, makeWrapper, alsa-lib, pkg-config, fetchFromGitHub, gtk3, gnome, gdk-pixbuf, librsvg, wrapGAppsHook }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "gvolicon";
|
||||
version = "unstable-2014-04-28";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Unia";
|
||||
repo = "gvolicon";
|
||||
rev = "0d65a396ba11f519d5785c37fec3e9a816217a07";
|
||||
sha256 = "sha256-lm5OfryV1/1T1RgsVDdp0Jg5rh8AND8M3ighfrznKes=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
makeWrapper alsa-lib gtk3 gdk-pixbuf gnome.adwaita-icon-theme
|
||||
librsvg wrapGAppsHook
|
||||
];
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-D_POSIX_C_SOURCE";
|
||||
|
||||
meta = {
|
||||
description = "A simple and lightweight volume icon that sits in your system tray";
|
||||
homepage = "https://github.com/Unia/gvolicon";
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = [ lib.maintainers.bennofs ];
|
||||
};
|
||||
}
|
||||
63
pkgs/tools/audio/headset-charge-indicator/default.nix
Normal file
63
pkgs/tools/audio/headset-charge-indicator/default.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{ lib, stdenv, fetchFromGitHub, headsetcontrol, wrapGAppsHook, python3, gtk3
|
||||
, gobject-introspection, libayatana-appindicator-gtk3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
# The last versioned release is 1.0.0.0 from 2020, since then there were updates but no versioned release.
|
||||
# This is not marked unstable because upstream encourages installation from source.
|
||||
pname = "headset-charge-indicator";
|
||||
version = "2021-08-15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "centic9";
|
||||
repo = "headset-charge-indicator";
|
||||
rev = "6e20f81a4d6118c7385b831044c468af83103193";
|
||||
sha256 = "sha256-eaAbqeFY+B3CcKJywC3vaRsWZNQENTbALc7L7uW0W6U=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
|
||||
buildInputs = [
|
||||
(python3.withPackages (ps: with ps; [ pygobject3 ]))
|
||||
headsetcontrol
|
||||
gtk3
|
||||
gobject-introspection
|
||||
libayatana-appindicator-gtk3
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp $src/headset-charge-indicator.py $out/bin/headset-charge-indicator.py
|
||||
chmod +x $out/bin/headset-charge-indicator.py
|
||||
|
||||
substituteInPlace \
|
||||
$out/bin/headset-charge-indicator.py \
|
||||
--replace "default='headsetcontrol'" "default='${headsetcontrol}/bin/headsetcontrol'"
|
||||
|
||||
cat << EOF > ${pname}.desktop
|
||||
[Desktop Entry]
|
||||
Name=Wireless headset app-indicator
|
||||
Categories=Application;System
|
||||
Exec=$out/bin/headset-charge-indicator.py
|
||||
Terminal=false
|
||||
Type=Application
|
||||
X-GNOME-AutoRestart=true
|
||||
X-GNOME-Autostart-enabled=true
|
||||
EOF
|
||||
|
||||
mkdir -p $out/share/applications
|
||||
mkdir -p $out/etc/xdg/autostart
|
||||
cp ${pname}.desktop $out/share/applications/${pname}.desktop
|
||||
cp ${pname}.desktop $out/etc/xdg/autostart/${pname}.desktop
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/centic9/headset-charge-indicator";
|
||||
description =
|
||||
"A app-indicator for GNOME desktops for controlling some features of various wireless headsets";
|
||||
longDescription =
|
||||
"A simple app-indicator for GNOME desktops to display the battery charge of some wireless headsets which also allows to control some functions like LEDs, sidetone and others.";
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ zebreus ];
|
||||
license = licenses.bsd2;
|
||||
};
|
||||
}
|
||||
44
pkgs/tools/audio/headsetcontrol/default.nix
Normal file
44
pkgs/tools/audio/headsetcontrol/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, hidapi
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "headsetcontrol";
|
||||
version = "2.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Sapd";
|
||||
repo = "HeadsetControl";
|
||||
rev = version;
|
||||
sha256 = "0a7zimzi71416pmn6z0l1dn1c2x8p702hkd0k6da9rsznff85a88";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
hidapi
|
||||
];
|
||||
|
||||
/*
|
||||
Test depends on having the apropiate headsets connected.
|
||||
*/
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Sidetone and Battery status for Logitech G930, G533, G633, G933 SteelSeries Arctis 7/PRO 2019 and Corsair VOID (Pro)";
|
||||
longDescription = ''
|
||||
A tool to control certain aspects of USB-connected headsets on Linux. Currently,
|
||||
support is provided for adjusting sidetone, getting battery state, controlling
|
||||
LEDs, and setting the inactive time.
|
||||
'';
|
||||
homepage = "https://github.com/Sapd/HeadsetControl";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ leixb ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/audio/isrcsubmit/default.nix
Normal file
24
pkgs/tools/audio/isrcsubmit/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchFromGitHub, python3Packages }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "isrcsubmit";
|
||||
version = "2.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "JonnyJD";
|
||||
repo = "musicbrainz-isrcsubmit";
|
||||
rev = "v${version}";
|
||||
sha256 = "1lqs4jl2xv1zxmf0xsihk9rxzx2awq87g51vd7y3cq1vhj1icxqa";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ musicbrainzngs discid ];
|
||||
|
||||
meta = with lib; {
|
||||
# drutil is required on Darwin, which does not seem to be available in nixpkgs
|
||||
broken = stdenv.isDarwin;
|
||||
description = "Script to submit ISRCs from disc to MusicBrainz";
|
||||
license = licenses.gpl3Plus;
|
||||
homepage = "http://jonnyjd.github.io/musicbrainz-isrcsubmit/";
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
93
pkgs/tools/audio/kaldi/default.nix
Normal file
93
pkgs/tools/audio/kaldi/default.nix
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
{ lib, stdenv
|
||||
, openblas
|
||||
, blas
|
||||
, lapack
|
||||
, openfst
|
||||
, icu
|
||||
, cmake
|
||||
, pkg-config
|
||||
, fetchFromGitHub
|
||||
, git
|
||||
, python3
|
||||
}:
|
||||
|
||||
assert blas.implementation == "openblas" && lapack.implementation == "openblas";
|
||||
let
|
||||
# rev from https://github.com/kaldi-asr/kaldi/blob/master/cmake/third_party/openfst.cmake
|
||||
openfst = fetchFromGitHub {
|
||||
owner = "kkm000";
|
||||
repo = "openfst";
|
||||
rev = "338225416178ac36b8002d70387f5556e44c8d05";
|
||||
sha256 = "sha256-MGEUuw7ex+WcujVdxpO2Bf5sB6Z0edcAeLGqW/Lo1Hs=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "kaldi";
|
||||
version = "2021-12-03";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kaldi-asr";
|
||||
repo = "kaldi";
|
||||
rev = "2b016ab8cb018e031ab3bf01ec36cc2950c7e509";
|
||||
sha256 = "sha256-R8CrY7cwU5XfeGEgeFuZ0ApsEcEmWN/lrZaCjz85tyk=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DKALDI_BUILD_TEST=off"
|
||||
"-DBUILD_SHARED_LIBS=on"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preConfigure = ''
|
||||
mkdir bin
|
||||
cat > bin/git <<'EOF'
|
||||
#!${stdenv.shell}
|
||||
if [[ "$1" == "--version" ]]; then
|
||||
# cmake checks this
|
||||
${git}/bin/git --version
|
||||
elif [[ "$1" == "clone" ]]; then
|
||||
# mock this call:
|
||||
|
||||
# https://github.com/kaldi-asr/kaldi/blob/c9d8b9ad3fef89237ba5517617d977b7d70a7ed5/cmake/third_party/openfst.cmake#L5
|
||||
cp -r ${openfst} ''${@: -1}
|
||||
chmod -R +w ''${@: -1}
|
||||
elif [[ "$1" == "rev-list" ]]; then
|
||||
# fix up this call:
|
||||
# https://github.com/kaldi-asr/kaldi/blob/c9d8b9ad3fef89237ba5517617d977b7d70a7ed5/cmake/VersionHelper.cmake#L8
|
||||
echo 0
|
||||
elif [[ "$1" == "rev-parse" ]]; then
|
||||
echo ${openfst.rev}
|
||||
echo 0
|
||||
fi
|
||||
true
|
||||
EOF
|
||||
chmod +x bin/git
|
||||
export PATH=$(pwd)/bin:$PATH
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
openblas
|
||||
openfst
|
||||
icu
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
python3
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/kaldi
|
||||
cp -r ../egs $out/share/kaldi
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Speech Recognition Toolkit";
|
||||
homepage = "https://kaldi-asr.org";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ mic92 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
108
pkgs/tools/audio/liquidsoap/full.nix
Normal file
108
pkgs/tools/audio/liquidsoap/full.nix
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
{ lib, stdenv, makeWrapper, fetchurl, which, pkg-config
|
||||
, fetchFromGitLab
|
||||
, fetchFromGitHub
|
||||
, ocamlPackages
|
||||
, libao, portaudio, alsa-lib, libpulseaudio, libjack2
|
||||
, libsamplerate, libmad, taglib, lame, libogg
|
||||
, libvorbis, speex, libtheora, libopus, zlib
|
||||
, faad2, flac, ladspaH, ffmpeg, frei0r, dssi
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "liquidsoap";
|
||||
version = "1.4.2";
|
||||
|
||||
ocaml-ffmpeg = fetchurl {
|
||||
url = "https://github.com/savonet/ocaml-ffmpeg/releases/download/v0.4.2/ocaml-ffmpeg-0.4.2.tar.gz";
|
||||
sha256 = "1lx5s1avds9fsh77828ifn71r2g89rxakhs8pp995a675phm9viw";
|
||||
};
|
||||
|
||||
packageFilters = map (p: "-e '/ocaml-${p}/d'" )
|
||||
[ "gstreamer" "shine" "aacplus" "schroedinger"
|
||||
"voaacenc" "soundtouch" "gavl" "lo"
|
||||
];
|
||||
in
|
||||
|
||||
# Liquidsoap 1.4.2 is not compatible with menhir ≥ 20220210
|
||||
# Locally override menhir to an earlier version
|
||||
let
|
||||
menhirLib = ocamlPackages.menhirLib.overrideAttrs (o: rec {
|
||||
version = "20211128";
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.inria.fr";
|
||||
owner = "fpottier";
|
||||
repo = "menhir";
|
||||
rev = version;
|
||||
sha256 = "sha256-L/zfjPZfn9L7qqqqJGk3Ge52rvujOVPiL8jxfH5R60g=";
|
||||
};
|
||||
});
|
||||
|
||||
menhirSdk = ocamlPackages.menhirSdk.override { inherit menhirLib; };
|
||||
|
||||
menhir = ocamlPackages.menhir.override {
|
||||
inherit menhirLib menhirSdk;
|
||||
};
|
||||
|
||||
srt = ocamlPackages.srt.overrideAttrs (old: rec {
|
||||
version = "0.1.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "savonet";
|
||||
repo = "ocaml-srt";
|
||||
rev = "v${version}";
|
||||
sha256 = "0xh89w4j7lljvpy2n08x6m9kw88f82snmzf23kp0gw637sjnrj6f";
|
||||
};
|
||||
});
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${pname}-full-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/savonet/${pname}/releases/download/v${version}/${pname}-${version}-full.tar.gz";
|
||||
sha256 = "0wkwnzj1a0vizv7sr1blwk5gzm2qi0n02ndijnq1i50cwrgxs1a4";
|
||||
};
|
||||
|
||||
# Use ocaml-srt and ocaml-fdkaac from nixpkgs
|
||||
# Use ocaml-ffmpeg at 0.4.2 for compatibility with ffmpeg 4.3
|
||||
prePatch = ''
|
||||
rm -rf ocaml-srt*/ ocaml-fdkaac*/ ocaml-ffmpeg*/
|
||||
tar xzf ${ocaml-ffmpeg}
|
||||
'';
|
||||
|
||||
preConfigure = /* we prefer system-wide libs */ ''
|
||||
sed -i "s|gsed|sed|" Makefile
|
||||
make bootstrap
|
||||
# autoreconf -vi # use system libraries
|
||||
|
||||
sed ${toString packageFilters} PACKAGES.default > PACKAGES
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/liquidsoap --set LIQ_LADSPA_PATH /run/current-system/sw/lib/ladspa
|
||||
'';
|
||||
|
||||
configureFlags = [ "--localstatedir=/var" ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper pkg-config ];
|
||||
buildInputs =
|
||||
[ which ocamlPackages.ocaml ocamlPackages.findlib
|
||||
libao portaudio alsa-lib libpulseaudio libjack2
|
||||
libsamplerate libmad taglib lame libogg
|
||||
libvorbis speex libtheora libopus zlib
|
||||
faad2 flac ladspaH ffmpeg frei0r dssi
|
||||
ocamlPackages.xmlm ocamlPackages.ocaml_pcre
|
||||
ocamlPackages.camomile
|
||||
ocamlPackages.fdkaac
|
||||
srt ocamlPackages.sedlex menhir menhirLib
|
||||
];
|
||||
|
||||
hardeningDisable = [ "format" "fortify" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Swiss-army knife for multimedia streaming";
|
||||
homepage = "https://www.liquidsoap.info/";
|
||||
maintainers = with maintainers; [ ehmry ];
|
||||
license = licenses.gpl2;
|
||||
platforms = ocamlPackages.ocaml.meta.platforms or [];
|
||||
};
|
||||
}
|
||||
53
pkgs/tools/audio/mictray/default.nix
Normal file
53
pkgs/tools/audio/mictray/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ fetchFromGitHub
|
||||
, gtk3
|
||||
, lib
|
||||
, libgee
|
||||
, libnotify
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, pulseaudio
|
||||
, stdenv
|
||||
, vala
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mictray";
|
||||
version = "0.2.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Junker";
|
||||
repo = "mictray";
|
||||
rev = "1f879aeda03fbe87ae5a761f46c042e09912e1c0";
|
||||
sha256 = "0achj6r545c1sigls79c8qdzryz3sgldcyzd3pwak1ymim9i9c74";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
vala
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
libgee
|
||||
libnotify
|
||||
pulseaudio
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Junker/mictray";
|
||||
description = "System tray application for microphone";
|
||||
longDescription = ''
|
||||
MicTray is a Lightweight system tray application which lets you control the microphone state and volume.
|
||||
'';
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.anpryl ];
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/audio/midicsv/default.nix
Normal file
25
pkgs/tools/audio/midicsv/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "midicsv";
|
||||
version = "1.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.fourmilab.ch/webtools/midicsv/midicsv-${version}.tar.gz";
|
||||
sha256 = "1vvhk2nf9ilfw0wchmxy8l13hbw9cnpz079nsx5srsy4nnd78nkw";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace /usr/local $out \
|
||||
--replace gcc "${stdenv.cc.targetPrefix}cc"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Losslessly translate MIDI to CSV and back";
|
||||
homepage = "http://www.fourmilab.ch/webtools/midicsv/";
|
||||
license = licenses.publicDomain;
|
||||
maintainers = with maintainers; [ orivej ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
57
pkgs/tools/audio/midimonster/default.nix
Normal file
57
pkgs/tools/audio/midimonster/default.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, zlib
|
||||
, fetchFromGitHub
|
||||
, gnumake
|
||||
, gcc
|
||||
, pkg-config
|
||||
, lua5_4
|
||||
, openssl
|
||||
, jack1
|
||||
, python3
|
||||
, alsa-lib
|
||||
, ncurses
|
||||
, libevdev
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "midimonster";
|
||||
version = "0.6.0";
|
||||
|
||||
buildInputs = [pkg-config gnumake gcc lua5_4 openssl jack1 python3 alsa-lib ncurses libevdev];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "midimonster";
|
||||
owner = "cbdevnet";
|
||||
rev = "f16f7db86662fcdbf45b6373257c90c824b0b4b0";
|
||||
sha256 = "131zs4j9asq9xl72cbyi463xpkj064ca1s7i77q5jrwqysgy52sp";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
outputs = ["out" "man"];
|
||||
|
||||
buildPhase = ''
|
||||
PLUGINS=$out/lib/midimonster make all
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
PREFIX=$out make install
|
||||
|
||||
mkdir -p "$man/share/man/man1"
|
||||
cp assets/midimonster.1 "$man/share/man/man1"
|
||||
|
||||
mkdir -p "$out/share/icons/hicolor/scalable/apps"
|
||||
cp assets/MIDIMonster.svg "$out/share/icons/hicolor/scalable/apps/"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://midimonster.net";
|
||||
description = "Multi-protocol translation tool";
|
||||
license = licenses.bsd2;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [keldu];
|
||||
};
|
||||
}
|
||||
34
pkgs/tools/audio/mp3cat/default.nix
Normal file
34
pkgs/tools/audio/mp3cat/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mp3cat";
|
||||
version = "0.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tomclegg";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0n6hjg2wgd06m561zc3ib5w2m3pwpf74njv2b2w4sqqh5md2ymfr";
|
||||
};
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
installTargets = [
|
||||
"install_bin"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A command line program which concatenates MP3 files";
|
||||
longDescription = ''
|
||||
A command line program which concatenates MP3 files, mp3cat
|
||||
only outputs MP3 frames with valid headers, even if there is extra garbage
|
||||
in its input stream
|
||||
'';
|
||||
homepage = "https://github.com/tomclegg/mp3cat";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.omnipotententity ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
27
pkgs/tools/audio/mpd-discord-rpc/default.nix
Normal file
27
pkgs/tools/audio/mpd-discord-rpc/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "mpd-discord-rpc";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "JakeStanger";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-CdgR9G598LmxA9lhY6yppP3ZZUhTqgMcWccEhSuCcJQ=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-WhlVWQCUGP+K9md0yp6ZD6mGYMso1fUYKDuXXrC2FeI=";
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "Rust application which displays your currently playing song / album / artist from MPD in Discord using Rich Presence";
|
||||
homepage = "https://github.com/JakeStanger/mpd-discord-rpc";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ kranzes ];
|
||||
};
|
||||
}
|
||||
34
pkgs/tools/audio/mpd-mpris/default.nix
Normal file
34
pkgs/tools/audio/mpd-mpris/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "mpd-mpris";
|
||||
version = "0.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "natsukagami";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-eI7/E5rhNCZfURwGkfa0f+Yie1EU8zR9r+1eAqrlmVY=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-GmdD/4VYp3KeblNGgltFWHdOnK5qsBa2ygIYOBrH+b0=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
subPackages = [ "cmd/${pname}" ];
|
||||
|
||||
postInstall = ''
|
||||
substituteInPlace mpd-mpris.service \
|
||||
--replace /usr/bin $out/bin
|
||||
mkdir -p $out/lib/systemd/user
|
||||
cp mpd-mpris.service $out/lib/systemd/user
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An implementation of the MPRIS protocol for MPD";
|
||||
homepage = "https://github.com/natsukagami/mpd-mpris";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
33
pkgs/tools/audio/mpdas/default.nix
Normal file
33
pkgs/tools/audio/mpdas/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, libmpdclient
|
||||
, curl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mpdas";
|
||||
version = "0.4.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hrkfdn";
|
||||
repo = "mpdas";
|
||||
rev = version;
|
||||
sha256 = "0fcqc4w6iwbi1n3cllcgj0k61zffhqkbr8668myxap21m35x8y1r";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ libmpdclient curl ];
|
||||
|
||||
makeFlags = [ "CONFIG=/etc" "DESTDIR=" "PREFIX=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Music Player Daemon AudioScrobbler";
|
||||
homepage = "https://50hz.ws/mpdas/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.taketwo ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
2
pkgs/tools/audio/mpdcron/Gemfile
Normal file
2
pkgs/tools/audio/mpdcron/Gemfile
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
source "https://rubygems.org"
|
||||
gem "nokogiri"
|
||||
15
pkgs/tools/audio/mpdcron/Gemfile.lock
Normal file
15
pkgs/tools/audio/mpdcron/Gemfile.lock
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
mini_portile2 (2.4.0)
|
||||
nokogiri (1.10.3)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
nokogiri
|
||||
|
||||
BUNDLED WITH
|
||||
2.1.4
|
||||
62
pkgs/tools/audio/mpdcron/default.nix
Normal file
62
pkgs/tools/audio/mpdcron/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoconf
|
||||
, automake
|
||||
, libtool
|
||||
, pkg-config
|
||||
, glib
|
||||
, libdaemon
|
||||
, libmpdclient
|
||||
, curl
|
||||
, sqlite
|
||||
, bundlerEnv
|
||||
, libnotify
|
||||
, pandoc
|
||||
}:
|
||||
|
||||
let
|
||||
gemEnv = bundlerEnv {
|
||||
name = "mpdcron-bundle";
|
||||
gemdir = ./.;
|
||||
};
|
||||
in stdenv.mkDerivation {
|
||||
pname = "mpdcron";
|
||||
version = "20161228";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alip";
|
||||
repo = "mpdcron";
|
||||
rev = "e49e6049b8693d31887c538ddc7b19f5e8ca476b";
|
||||
sha256 = "0vdksf6lcgmizqr5mqp0bbci259k0dj7gpmhx32md41jlmw5skaw";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoconf automake ];
|
||||
buildInputs = [
|
||||
libtool
|
||||
pkg-config
|
||||
glib
|
||||
libdaemon
|
||||
pandoc
|
||||
libmpdclient
|
||||
curl
|
||||
sqlite
|
||||
gemEnv.wrappedRuby
|
||||
libnotify
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
./autogen.sh
|
||||
'';
|
||||
|
||||
configureFlags = [ "--enable-gmodule" "--with-standard-modules=all" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A cron like daemon for mpd";
|
||||
homepage = "http://alip.github.io/mpdcron/";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ lovek323 manveru ];
|
||||
};
|
||||
}
|
||||
# TODO: autoreconfHook this
|
||||
23
pkgs/tools/audio/mpdcron/gemset.nix
Normal file
23
pkgs/tools/audio/mpdcron/gemset.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
mini_portile2 = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.4.0";
|
||||
};
|
||||
nokogiri = {
|
||||
dependencies = ["mini_portile2"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "02bjydih0j515szfv9mls195cvpyidh6ixm7dwbl3s2sbaxxk5s4";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.10.3";
|
||||
};
|
||||
}
|
||||
55
pkgs/tools/audio/mpdris2/default.nix
Normal file
55
pkgs/tools/audio/mpdris2/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib
|
||||
, autoreconfHook
|
||||
, fetchFromGitHub
|
||||
, glib
|
||||
, gobject-introspection
|
||||
, intltool
|
||||
, libnotify
|
||||
, python3
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "mpDris2";
|
||||
version = "0.9.1";
|
||||
format = "other";
|
||||
strictDeps = false; # https://github.com/NixOS/nixpkgs/issues/56943
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "eonpatapon";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-1Y6K3z8afUXeKhZzeiaEF3yqU0Ef7qdAj9vAkRlD2p8=";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
intltoolize -f
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
gobject-introspection
|
||||
intltool
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
libnotify
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
dbus-python
|
||||
mpd2
|
||||
mutagen
|
||||
pygobject3
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "MPRIS 2 support for mpd";
|
||||
homepage = "https://github.com/eonpatapon/mpDris2/";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
61
pkgs/tools/audio/mpris-scrobbler/default.nix
Normal file
61
pkgs/tools/audio/mpris-scrobbler/default.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, nix-update-script
|
||||
, curl
|
||||
, dbus
|
||||
, libevent
|
||||
, m4
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, scdoc
|
||||
, json_c
|
||||
, xdg-utils
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mpris-scrobbler";
|
||||
version = "0.4.95";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mariusor";
|
||||
repo = "mpris-scrobbler";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Cqf0egS4XSDiKLdizNHPdS0Zt3jQxw9e78S7n23CuKI=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/signon.c \
|
||||
--replace "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
m4
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
scdoc
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
curl
|
||||
dbus
|
||||
json_c
|
||||
libevent
|
||||
];
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Minimalistic scrobbler for libre.fm & last.fm";
|
||||
homepage = "https://github.com/mariusor/mpris-scrobbler";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ emantor ];
|
||||
platforms = platforms.unix;
|
||||
broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/mpris-scrobbler.x86_64-darwin
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/audio/nanotts/default.nix
Normal file
35
pkgs/tools/audio/nanotts/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, popt, alsaLib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "nano-tts";
|
||||
version = "unstable-2021-02-22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "nanotts";
|
||||
owner = "gmn";
|
||||
rev = "d8b91f3d9d524c30f6fe8098ea7a0a638c889cf9";
|
||||
sha256 = "sha256-bFu3U50zc90iQeWkqOsCipkueJUZI3cW5342jjYSnGI=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ autoconf automake libtool ];
|
||||
buildInputs = [ popt alsaLib ];
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace "src/main.cpp" --replace "/usr/share/pico/lang" "$out/share/lang"
|
||||
echo "" > update_build_version.sh
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 -t $out/bin nanotts
|
||||
install -Dm644 -t $out/share/lang $src/lang/*
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Speech synthesizer commandline utility that improves pico2wave, included with SVOX PicoTTS";
|
||||
homepage = "https://github.com/gmn/nanotts";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = [ lib.maintainers.strikerlulu ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,200 @@
|
|||
From 11711398a1ec16f4eaeac8523b77165a560b69cc Mon Sep 17 00:00:00 2001
|
||||
From: OPNA2608 <christoph.neidahl@gmail.com>
|
||||
Date: Sun, 13 Jun 2021 13:55:53 +0200
|
||||
Subject: [PATCH] Look for system-installed Rt libs
|
||||
|
||||
---
|
||||
CMakeLists.txt | 159 +++++++++++++++++++++++++++++++------------------
|
||||
1 file changed, 102 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f3e53c3..027c1b1 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -50,15 +50,6 @@ message("!! Optional feature summary:")
|
||||
message("!! RtMidi: ${USE_RTMIDI}")
|
||||
message("!! RtAudio: ${USE_RTAUDIO}")
|
||||
|
||||
-if(USE_RTAUDIO)
|
||||
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
- pkg_check_modules(JACK "jack")
|
||||
- message("!! -- Jack driver: ${JACK_FOUND}")
|
||||
- pkg_check_modules(PULSEAUDIO "libpulse-simple")
|
||||
- message("!! -- Pulseaudio driver: ${PULSEAUDIO_FOUND}")
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
if(ENABLE_PLOTS)
|
||||
message("!! Qwt: ${QWT_LIBRARY}")
|
||||
endif()
|
||||
@@ -250,65 +241,119 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
endif()
|
||||
|
||||
if(USE_RTMIDI)
|
||||
- add_library(RtMidi STATIC "src/midi/external/rtmidi/RtMidi.cpp")
|
||||
- target_include_directories(RtMidi PUBLIC "src/midi/external/rtmidi")
|
||||
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
- target_compile_definitions(RtMidi PUBLIC "__LINUX_ALSA__")
|
||||
- target_link_libraries(RtMidi PUBLIC "asound")
|
||||
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
- target_compile_definitions(RtMidi PUBLIC "__WINDOWS_MM__")
|
||||
- target_link_libraries(RtMidi PUBLIC "winmm")
|
||||
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
- target_compile_definitions(RtMidi PUBLIC "__MACOSX_CORE__")
|
||||
- find_library(COREMIDI_LIBRARY "CoreMIDI")
|
||||
- target_link_libraries(RtMidi PUBLIC "${COREMIDI_LIBRARY}")
|
||||
+ if(PKG_CONFIG_FOUND)
|
||||
+ pkg_check_modules(RTMIDI rtmidi)
|
||||
+ if(RTMIDI_FOUND)
|
||||
+ message("Using system-installed RtMidi found by pkg-config.")
|
||||
+ target_link_libraries(OPL3BankEditor PUBLIC ${RTMIDI_LDFLAGS})
|
||||
+ target_include_directories(OPL3BankEditor PUBLIC ${RTMIDI_INCLUDE_DIRS})
|
||||
+ target_compile_options(OPL3BankEditor PUBLIC ${RTMIDI_CFLAGS})
|
||||
+ endif()
|
||||
endif()
|
||||
+
|
||||
+ if(NOT RTMIDI_FOUND)
|
||||
+ find_library(RTMIDI_LIBRARY "rtmidi")
|
||||
+ find_path(RTMIDI_INCLUDE_DIRS "RtMidi.h")
|
||||
+ message("RtMidi library: ${RTMIDI_LIBRARY}")
|
||||
+ message("RtMidi header directory: ${RTMIDI_INCLUDE_DIRS}")
|
||||
+ if(NOT RTMIDI_LIBRARY-NOTFOUND AND NOT RTMIDI_INCLUDE_DIRS STREQUAL RTMIDI_INCLUDE_DIRS-NOTFOUND)
|
||||
+ message("Using system-installed RtMidi.")
|
||||
+ set(RTMIDI_FOUND TRUE)
|
||||
+ target_link_libraries(OPL3BankEditor PUBLIC ${RTMIDI_LIBRARY})
|
||||
+ target_include_directories(OPL3BankEditor PUBLIC ${RTMIDI_INCLUDE_DIRS})
|
||||
+ endif()
|
||||
+ endif()
|
||||
+
|
||||
+ if(NOT RTMIDI_FOUND)
|
||||
+ message("Using bundled RtMidi.")
|
||||
+ add_library(RtMidi STATIC "src/midi/external/rtmidi/RtMidi.cpp")
|
||||
+ target_include_directories(RtMidi PUBLIC "src/midi/external/rtmidi")
|
||||
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
+ target_compile_definitions(RtMidi PUBLIC "__LINUX_ALSA__")
|
||||
+ target_link_libraries(RtMidi PUBLIC "asound")
|
||||
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
+ target_compile_definitions(RtMidi PUBLIC "__WINDOWS_MM__")
|
||||
+ target_link_libraries(RtMidi PUBLIC "winmm")
|
||||
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
+ target_compile_definitions(RtMidi PUBLIC "__MACOSX_CORE__")
|
||||
+ find_library(COREMIDI_LIBRARY "CoreMIDI")
|
||||
+ target_link_libraries(RtMidi PUBLIC "${COREMIDI_LIBRARY}")
|
||||
+ endif()
|
||||
+ target_link_libraries(OPL3BankEditor PRIVATE RtMidi)
|
||||
+ endif()
|
||||
+
|
||||
target_sources(OPL3BankEditor PRIVATE "src/midi/midi_rtmidi.cpp")
|
||||
target_compile_definitions(OPL3BankEditor PRIVATE "ENABLE_MIDI")
|
||||
- target_link_libraries(OPL3BankEditor PRIVATE RtMidi)
|
||||
endif()
|
||||
|
||||
if(USE_RTAUDIO)
|
||||
- add_library(RtAudio STATIC "src/audio/external/rtaudio/RtAudio.cpp")
|
||||
- target_include_directories(RtAudio PUBLIC "src/audio/external/rtaudio")
|
||||
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
- target_compile_definitions(RtAudio PUBLIC "__LINUX_ALSA__")
|
||||
- target_link_libraries(RtAudio PUBLIC "asound")
|
||||
- if(JACK_FOUND)
|
||||
- target_compile_definitions(RtAudio PUBLIC "__UNIX_JACK__")
|
||||
- target_include_directories(RtAudio PUBLIC ${JACK_INCLUDE_DIRS})
|
||||
- link_directories(${JACK_LIBRARY_DIRS})
|
||||
- target_link_libraries(RtAudio PUBLIC ${JACK_LIBRARIES})
|
||||
+ if(PKG_CONFIG_FOUND)
|
||||
+ pkg_check_modules(RTAUDIO rtaudio)
|
||||
+ if(RTAUDIO_FOUND)
|
||||
+ message("Using system-installed RtAudio found by pkg-config.")
|
||||
+ target_link_libraries(OPL3BankEditor PUBLIC ${RTAUDIO_LDFLAGS})
|
||||
+ target_include_directories(OPL3BankEditor PUBLIC ${RTAUDIO_INCLUDE_DIRS})
|
||||
+ target_compile_options(OPL3BankEditor PUBLIC ${RTAUDIO_CFLAGS})
|
||||
+ endif()
|
||||
+ endif()
|
||||
+
|
||||
+ if(NOT RTAUDIO_FOUND)
|
||||
+ find_library(RTAUDIO_LIBRARY "rtaudio")
|
||||
+ find_path(RTAUDIO_INCLUDE_DIRS "RtAudio.h")
|
||||
+ message("RtAudio library: ${RTAUDIO_LIBRARY}")
|
||||
+ message("RtAudio header directory: ${RTAUDIO_INCLUDE_DIRS}")
|
||||
+ if(NOT RTAUDIO_LIBRARY-NOTFOUND AND NOT RTAUDIO_INCLUDE_DIRS STREQUAL RTAUDIO_INCLUDE_DIRS-NOTFOUND)
|
||||
+ message("Using system-installed RtAudio.")
|
||||
+ set(RTAUDIO_FOUND TRUE)
|
||||
+ target_link_libraries(OPL3BankEditor PUBLIC ${RTAUDIO_LIBRARY})
|
||||
+ target_include_directories(OPL3BankEditor PUBLIC ${RTAUDIO_INCLUDE_DIRS})
|
||||
endif()
|
||||
- if(PULSEAUDIO_FOUND)
|
||||
- target_compile_definitions(RtAudio PUBLIC "__LINUX_PULSE__")
|
||||
- target_include_directories(RtAudio PUBLIC ${PULSEAUDIO_INCLUDE_DIRS})
|
||||
- link_directories(${PULSEAUDIO_LIBRARY_DIRS})
|
||||
- target_link_libraries(RtAudio PUBLIC ${PULSEAUDIO_LIBRARIES})
|
||||
+ endif()
|
||||
+
|
||||
+ if(NOT RTAUDIO_FOUND)
|
||||
+ message("Using bundled RtAudio.")
|
||||
+ add_library(RtAudio STATIC "src/audio/external/rtaudio/RtAudio.cpp")
|
||||
+ target_include_directories(RtAudio PUBLIC "src/audio/external/rtaudio")
|
||||
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__LINUX_ALSA__")
|
||||
+ target_link_libraries(RtAudio PUBLIC "asound")
|
||||
+ if(JACK_FOUND)
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__UNIX_JACK__")
|
||||
+ target_include_directories(RtAudio PUBLIC ${JACK_INCLUDE_DIRS})
|
||||
+ link_directories(${JACK_LIBRARY_DIRS})
|
||||
+ target_link_libraries(RtAudio PUBLIC ${JACK_LIBRARIES})
|
||||
+ endif()
|
||||
+ if(PULSEAUDIO_FOUND)
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__LINUX_PULSE__")
|
||||
+ target_include_directories(RtAudio PUBLIC ${PULSEAUDIO_INCLUDE_DIRS})
|
||||
+ link_directories(${PULSEAUDIO_LIBRARY_DIRS})
|
||||
+ target_link_libraries(RtAudio PUBLIC ${PULSEAUDIO_LIBRARIES})
|
||||
+ endif()
|
||||
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__WINDOWS_DS__")
|
||||
+ target_link_libraries(RtAudio PUBLIC "dsound" "ole32")
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__WINDOWS_WASAPI__")
|
||||
+ target_link_libraries(RtAudio PUBLIC "ksguid")
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__WINDOWS_ASIO__")
|
||||
+ target_include_directories(RtAudio PRIVATE
|
||||
+ "src/audio/external/rtaudio/include")
|
||||
+ target_sources(RtAudio PRIVATE
|
||||
+ "src/audio/external/rtaudio/include/asio.cpp"
|
||||
+ "src/audio/external/rtaudio/include/asiodrivers.cpp"
|
||||
+ "src/audio/external/rtaudio/include/asiolist.cpp"
|
||||
+ "src/audio/external/rtaudio/include/iasiothiscallresolver.cpp")
|
||||
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__MACOSX_CORE__")
|
||||
+ find_library(COREAUDIO_LIBRARY "CoreAudio")
|
||||
+ target_link_libraries(RtAudio PUBLIC "${COREAUDIO_LIBRARY}")
|
||||
+ find_library(COREFOUNDATION_LIBRARY "CoreFoundation")
|
||||
+ target_link_libraries(RtAudio PUBLIC "${COREFOUNDATION_LIBRARY}")
|
||||
endif()
|
||||
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
- target_compile_definitions(RtAudio PUBLIC "__WINDOWS_DS__")
|
||||
- target_link_libraries(RtAudio PUBLIC "dsound" "ole32")
|
||||
- target_compile_definitions(RtAudio PUBLIC "__WINDOWS_WASAPI__")
|
||||
- target_link_libraries(RtAudio PUBLIC "ksguid")
|
||||
- target_compile_definitions(RtAudio PUBLIC "__WINDOWS_ASIO__")
|
||||
- target_include_directories(RtAudio PRIVATE
|
||||
- "src/audio/external/rtaudio/include")
|
||||
- target_sources(RtAudio PRIVATE
|
||||
- "src/audio/external/rtaudio/include/asio.cpp"
|
||||
- "src/audio/external/rtaudio/include/asiodrivers.cpp"
|
||||
- "src/audio/external/rtaudio/include/asiolist.cpp"
|
||||
- "src/audio/external/rtaudio/include/iasiothiscallresolver.cpp")
|
||||
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
- target_compile_definitions(RtAudio PUBLIC "__MACOSX_CORE__")
|
||||
- find_library(COREAUDIO_LIBRARY "CoreAudio")
|
||||
- target_link_libraries(RtAudio PUBLIC "${COREAUDIO_LIBRARY}")
|
||||
- find_library(COREFOUNDATION_LIBRARY "CoreFoundation")
|
||||
- target_link_libraries(RtAudio PUBLIC "${COREFOUNDATION_LIBRARY}")
|
||||
+ target_link_libraries(OPL3BankEditor PRIVATE RtAudio)
|
||||
endif()
|
||||
+
|
||||
target_sources(OPL3BankEditor PRIVATE "src/audio/ao_rtaudio.cpp")
|
||||
target_compile_definitions(OPL3BankEditor PRIVATE "ENABLE_AUDIO_TESTING")
|
||||
- target_link_libraries(OPL3BankEditor PRIVATE RtAudio)
|
||||
endif()
|
||||
|
||||
add_executable(measurer_tool
|
||||
--
|
||||
2.29.3
|
||||
|
||||
|
|
@ -0,0 +1,200 @@
|
|||
From 69c993dacc7dc0cb9d105c3dfa764cd7be5c343e Mon Sep 17 00:00:00 2001
|
||||
From: OPNA2608 <christoph.neidahl@gmail.com>
|
||||
Date: Sun, 13 Jun 2021 14:21:17 +0200
|
||||
Subject: [PATCH] Look for system-installed Rt libs
|
||||
|
||||
---
|
||||
CMakeLists.txt | 159 +++++++++++++++++++++++++++++++------------------
|
||||
1 file changed, 102 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f428dc4..18ba8c3 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -41,15 +41,6 @@ message("!! Optional feature summary:")
|
||||
message("!! RtMidi: ${USE_RTMIDI}")
|
||||
message("!! RtAudio: ${USE_RTAUDIO}")
|
||||
|
||||
-if(USE_RTAUDIO)
|
||||
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
- pkg_check_modules(JACK "jack")
|
||||
- message("!! -- Jack driver: ${JACK_FOUND}")
|
||||
- pkg_check_modules(PULSEAUDIO "libpulse-simple")
|
||||
- message("!! -- Pulseaudio driver: ${PULSEAUDIO_FOUND}")
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
if(ENABLE_PLOTS)
|
||||
message("!! Qwt: ${QWT_LIBRARY}")
|
||||
endif()
|
||||
@@ -198,65 +189,119 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
endif()
|
||||
|
||||
if(USE_RTMIDI)
|
||||
- add_library(RtMidi STATIC "src/midi/external/rtmidi/RtMidi.cpp")
|
||||
- target_include_directories(RtMidi PUBLIC "src/midi/external/rtmidi")
|
||||
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
- target_compile_definitions(RtMidi PUBLIC "__LINUX_ALSA__")
|
||||
- target_link_libraries(RtMidi PUBLIC "asound")
|
||||
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
- target_compile_definitions(RtMidi PUBLIC "__WINDOWS_MM__")
|
||||
- target_link_libraries(RtMidi PUBLIC "winmm")
|
||||
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
- target_compile_definitions(RtMidi PUBLIC "__MACOSX_CORE__")
|
||||
- find_library(COREMIDI_LIBRARY "CoreMIDI")
|
||||
- target_link_libraries(RtMidi PUBLIC "${COREMIDI_LIBRARY}")
|
||||
+ if(PKG_CONFIG_FOUND)
|
||||
+ pkg_check_modules(RTMIDI rtmidi)
|
||||
+ if(RTMIDI_FOUND)
|
||||
+ message("Using system-installed RtMidi found by pkg-config.")
|
||||
+ target_link_libraries(OPN2BankEditor PUBLIC ${RTMIDI_LDFLAGS})
|
||||
+ target_include_directories(OPN2BankEditor PUBLIC ${RTMIDI_INCLUDE_DIRS})
|
||||
+ target_compile_options(OPN2BankEditor PUBLIC ${RTMIDI_CFLAGS})
|
||||
+ endif()
|
||||
+ endif()
|
||||
+
|
||||
+ if(NOT RTMIDI_FOUND)
|
||||
+ find_library(RTMIDI_LIBRARY "rtmidi")
|
||||
+ find_path(RTMIDI_INCLUDE_DIRS "RtMidi.h")
|
||||
+ message("RtMidi library: ${RTMIDI_LIBRARY}")
|
||||
+ message("RtMidi header directory: ${RTMIDI_INCLUDE_DIRS}")
|
||||
+ if(NOT RTMIDI_LIBRARY-NOTFOUND AND NOT RTMIDI_INCLUDE_DIRS STREQUAL RTMIDI_INCLUDE_DIRS-NOTFOUND)
|
||||
+ message("Using system-installed RtMidi.")
|
||||
+ set(RTMIDI_FOUND TRUE)
|
||||
+ target_link_libraries(OPN2BankEditor PUBLIC ${RTMIDI_LIBRARY})
|
||||
+ target_include_directories(OPN2BankEditor PUBLIC ${RTMIDI_INCLUDE_DIRS})
|
||||
+ endif()
|
||||
+ endif()
|
||||
+
|
||||
+ if(NOT RTMIDI_FOUND)
|
||||
+ message("Using bundled RtMidi.")
|
||||
+ add_library(RtMidi STATIC "src/midi/external/rtmidi/RtMidi.cpp")
|
||||
+ target_include_directories(RtMidi PUBLIC "src/midi/external/rtmidi")
|
||||
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
+ target_compile_definitions(RtMidi PUBLIC "__LINUX_ALSA__")
|
||||
+ target_link_libraries(RtMidi PUBLIC "asound")
|
||||
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
+ target_compile_definitions(RtMidi PUBLIC "__WINDOWS_MM__")
|
||||
+ target_link_libraries(RtMidi PUBLIC "winmm")
|
||||
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
+ target_compile_definitions(RtMidi PUBLIC "__MACOSX_CORE__")
|
||||
+ find_library(COREMIDI_LIBRARY "CoreMIDI")
|
||||
+ target_link_libraries(RtMidi PUBLIC "${COREMIDI_LIBRARY}")
|
||||
+ endif()
|
||||
+ target_link_libraries(OPN2BankEditor PRIVATE RtMidi)
|
||||
endif()
|
||||
+
|
||||
target_sources(OPN2BankEditor PRIVATE "src/midi/midi_rtmidi.cpp")
|
||||
target_compile_definitions(OPN2BankEditor PRIVATE "ENABLE_MIDI")
|
||||
- target_link_libraries(OPN2BankEditor PRIVATE RtMidi)
|
||||
endif()
|
||||
|
||||
if(USE_RTAUDIO)
|
||||
- add_library(RtAudio STATIC "src/audio/external/rtaudio/RtAudio.cpp")
|
||||
- target_include_directories(RtAudio PUBLIC "src/audio/external/rtaudio")
|
||||
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
- target_compile_definitions(RtAudio PUBLIC "__LINUX_ALSA__")
|
||||
- target_link_libraries(RtAudio PUBLIC "asound")
|
||||
- if(JACK_FOUND)
|
||||
- target_compile_definitions(RtAudio PUBLIC "__UNIX_JACK__")
|
||||
- target_include_directories(RtAudio PUBLIC ${JACK_INCLUDE_DIRS})
|
||||
- link_directories(${JACK_LIBRARY_DIRS})
|
||||
- target_link_libraries(RtAudio PUBLIC ${JACK_LIBRARIES})
|
||||
+ if(PKG_CONFIG_FOUND)
|
||||
+ pkg_check_modules(RTAUDIO rtaudio)
|
||||
+ if(RTAUDIO_FOUND)
|
||||
+ message("Using system-installed RtAudio found by pkg-config.")
|
||||
+ target_link_libraries(OPN2BankEditor PUBLIC ${RTAUDIO_LDFLAGS})
|
||||
+ target_include_directories(OPN2BankEditor PUBLIC ${RTAUDIO_INCLUDE_DIRS})
|
||||
+ target_compile_options(OPN2BankEditor PUBLIC ${RTAUDIO_CFLAGS})
|
||||
endif()
|
||||
- if(PULSEAUDIO_FOUND)
|
||||
- target_compile_definitions(RtAudio PUBLIC "__LINUX_PULSE__")
|
||||
- target_include_directories(RtAudio PUBLIC ${PULSEAUDIO_INCLUDE_DIRS})
|
||||
- link_directories(${PULSEAUDIO_LIBRARY_DIRS})
|
||||
- target_link_libraries(RtAudio PUBLIC ${PULSEAUDIO_LIBRARIES})
|
||||
+ endif()
|
||||
+
|
||||
+ if(NOT RTAUDIO_FOUND)
|
||||
+ find_library(RTAUDIO_LIBRARY "rtaudio")
|
||||
+ find_path(RTAUDIO_INCLUDE_DIRS "RtAudio.h")
|
||||
+ message("RtAudio library: ${RTAUDIO_LIBRARY}")
|
||||
+ message("RtAudio header directory: ${RTAUDIO_INCLUDE_DIRS}")
|
||||
+ if(NOT RTAUDIO_LIBRARY-NOTFOUND AND NOT RTAUDIO_INCLUDE_DIRS STREQUAL RTAUDIO_INCLUDE_DIRS-NOTFOUND)
|
||||
+ message("Using system-installed RtAudio.")
|
||||
+ set(RTAUDIO_FOUND TRUE)
|
||||
+ target_link_libraries(OPN2BankEditor PUBLIC ${RTAUDIO_LIBRARY})
|
||||
+ target_include_directories(OPN2BankEditor PUBLIC ${RTAUDIO_INCLUDE_DIRS})
|
||||
endif()
|
||||
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
- target_compile_definitions(RtAudio PUBLIC "__WINDOWS_DS__")
|
||||
- target_link_libraries(RtAudio PUBLIC "dsound" "ole32")
|
||||
- target_compile_definitions(RtAudio PUBLIC "__WINDOWS_WASAPI__")
|
||||
- target_link_libraries(RtAudio PUBLIC "ksguid")
|
||||
- target_compile_definitions(RtAudio PUBLIC "__WINDOWS_ASIO__")
|
||||
- target_include_directories(RtAudio PRIVATE
|
||||
- "src/audio/external/rtaudio/include")
|
||||
- target_sources(RtAudio PRIVATE
|
||||
- "src/audio/external/rtaudio/include/asio.cpp"
|
||||
- "src/audio/external/rtaudio/include/asiodrivers.cpp"
|
||||
- "src/audio/external/rtaudio/include/asiolist.cpp"
|
||||
- "src/audio/external/rtaudio/include/iasiothiscallresolver.cpp")
|
||||
- elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
- target_compile_definitions(RtAudio PUBLIC "__MACOSX_CORE__")
|
||||
- find_library(COREAUDIO_LIBRARY "CoreAudio")
|
||||
- target_link_libraries(RtAudio PUBLIC "${COREAUDIO_LIBRARY}")
|
||||
- find_library(COREFOUNDATION_LIBRARY "CoreFoundation")
|
||||
- target_link_libraries(RtAudio PUBLIC "${COREFOUNDATION_LIBRARY}")
|
||||
endif()
|
||||
+
|
||||
+ if(NOT RTAUDIO_FOUND)
|
||||
+ message("Using bundled RtAudio.")
|
||||
+ add_library(RtAudio STATIC "src/audio/external/rtaudio/RtAudio.cpp")
|
||||
+ target_include_directories(RtAudio PUBLIC "src/audio/external/rtaudio")
|
||||
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__LINUX_ALSA__")
|
||||
+ target_link_libraries(RtAudio PUBLIC "asound")
|
||||
+ if(JACK_FOUND)
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__UNIX_JACK__")
|
||||
+ target_include_directories(RtAudio PUBLIC ${JACK_INCLUDE_DIRS})
|
||||
+ link_directories(${JACK_LIBRARY_DIRS})
|
||||
+ target_link_libraries(RtAudio PUBLIC ${JACK_LIBRARIES})
|
||||
+ endif()
|
||||
+ if(PULSEAUDIO_FOUND)
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__LINUX_PULSE__")
|
||||
+ target_include_directories(RtAudio PUBLIC ${PULSEAUDIO_INCLUDE_DIRS})
|
||||
+ link_directories(${PULSEAUDIO_LIBRARY_DIRS})
|
||||
+ target_link_libraries(RtAudio PUBLIC ${PULSEAUDIO_LIBRARIES})
|
||||
+ endif()
|
||||
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__WINDOWS_DS__")
|
||||
+ target_link_libraries(RtAudio PUBLIC "dsound" "ole32")
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__WINDOWS_WASAPI__")
|
||||
+ target_link_libraries(RtAudio PUBLIC "ksguid")
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__WINDOWS_ASIO__")
|
||||
+ target_include_directories(RtAudio PRIVATE
|
||||
+ "src/audio/external/rtaudio/include")
|
||||
+ target_sources(RtAudio PRIVATE
|
||||
+ "src/audio/external/rtaudio/include/asio.cpp"
|
||||
+ "src/audio/external/rtaudio/include/asiodrivers.cpp"
|
||||
+ "src/audio/external/rtaudio/include/asiolist.cpp"
|
||||
+ "src/audio/external/rtaudio/include/iasiothiscallresolver.cpp")
|
||||
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
+ target_compile_definitions(RtAudio PUBLIC "__MACOSX_CORE__")
|
||||
+ find_library(COREAUDIO_LIBRARY "CoreAudio")
|
||||
+ target_link_libraries(RtAudio PUBLIC "${COREAUDIO_LIBRARY}")
|
||||
+ find_library(COREFOUNDATION_LIBRARY "CoreFoundation")
|
||||
+ target_link_libraries(RtAudio PUBLIC "${COREFOUNDATION_LIBRARY}")
|
||||
+ endif()
|
||||
+ target_link_libraries(OPN2BankEditor PRIVATE RtAudio)
|
||||
+ endif()
|
||||
+
|
||||
target_sources(OPN2BankEditor PRIVATE "src/audio/ao_rtaudio.cpp")
|
||||
target_compile_definitions(OPN2BankEditor PRIVATE "ENABLE_AUDIO_TESTING")
|
||||
- target_link_libraries(OPN2BankEditor PRIVATE RtAudio)
|
||||
endif()
|
||||
|
||||
add_executable(measurer_tool
|
||||
--
|
||||
2.29.3
|
||||
|
||||
68
pkgs/tools/audio/opl3bankeditor/common.nix
Normal file
68
pkgs/tools/audio/opl3bankeditor/common.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{ pname, chip, version, sha256, extraPatches ? [] }:
|
||||
|
||||
{ mkDerivation
|
||||
, stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, dos2unix
|
||||
, cmake
|
||||
, pkg-config
|
||||
, qttools
|
||||
, qtbase
|
||||
, qwt6_1
|
||||
, rtaudio
|
||||
, rtmidi
|
||||
}:
|
||||
|
||||
let
|
||||
binname = "${chip} Bank Editor";
|
||||
mainProgram = "${lib.strings.toLower chip}_bank_editor";
|
||||
in
|
||||
mkDerivation rec {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Wohlstand";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
dos2unix CMakeLists.txt
|
||||
'';
|
||||
|
||||
patches = extraPatches;
|
||||
|
||||
nativeBuildInputs = [
|
||||
dos2unix
|
||||
cmake
|
||||
pkg-config
|
||||
qttools
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
qtbase
|
||||
qwt6_1
|
||||
rtaudio
|
||||
rtmidi
|
||||
];
|
||||
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
mkdir $out/{bin,Applications}
|
||||
mv "${binname}.app" $out/Applications/
|
||||
|
||||
install_name_tool -change {,${qwt6_1}/lib/}libqwt.6.dylib "$out/Applications/${binname}.app/Contents/MacOS/${binname}"
|
||||
|
||||
ln -s "$out/Applications/${binname}.app/Contents/MacOS/${binname}" $out/bin/${mainProgram}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
inherit mainProgram;
|
||||
description = "A small cross-platform editor of the ${chip} FM banks of different formats";
|
||||
homepage = src.meta.homepage;
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ OPNA2608 ];
|
||||
};
|
||||
}
|
||||
9
pkgs/tools/audio/opl3bankeditor/default.nix
Normal file
9
pkgs/tools/audio/opl3bankeditor/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import ./common.nix rec {
|
||||
pname = "opl3bankeditor";
|
||||
chip = "OPL3";
|
||||
version = "1.5.1";
|
||||
sha256 = "08krbxlxgmc7i2r2k6d6wgi0m6k8hh3j60xf21kz4kp023w613sa";
|
||||
extraPatches = [
|
||||
./0001-opl3bankeditor-Look-for-system-installed-Rt-libs.patch
|
||||
];
|
||||
}
|
||||
9
pkgs/tools/audio/opl3bankeditor/opn2bankeditor.nix
Normal file
9
pkgs/tools/audio/opl3bankeditor/opn2bankeditor.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import ./common.nix rec {
|
||||
pname = "opn2bankeditor";
|
||||
chip = "OPN2";
|
||||
version = "1.3";
|
||||
sha256 = "0niam6a6y57msbl0xj23g6l7gisv4a670q0k1zqfm34804532a32";
|
||||
extraPatches = [
|
||||
./0001-opn2bankeditor-Look-for-system-installed-Rt-libs.patch
|
||||
];
|
||||
}
|
||||
34
pkgs/tools/audio/pa-applet/default.nix
Normal file
34
pkgs/tools/audio/pa-applet/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, stdenv, fetchFromGitHub, libpulseaudio, pkg-config, gtk3, glibc, autoconf, automake, libnotify, libX11, xf86inputevdev }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "pa-applet";
|
||||
version = "unstable-2012-04-11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fernandotcl";
|
||||
repo = "pa-applet";
|
||||
rev = "005f192df9ba6d2e6491f9aac650be42906b135a";
|
||||
sha256 = "sha256-ihvZFXHgr5YeqMKmVY/GB86segUkQ9BYqJYfE3PTgog=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoconf automake ];
|
||||
buildInputs = [
|
||||
gtk3 libpulseaudio glibc libnotify libX11 xf86inputevdev
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
./autogen.sh
|
||||
'';
|
||||
|
||||
# work around a problem related to gtk3 updates
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
|
||||
|
||||
postInstall = "";
|
||||
|
||||
meta = with lib; {
|
||||
description = "";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ domenkozar ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
42
pkgs/tools/audio/pasystray/default.nix
Normal file
42
pkgs/tools/audio/pasystray/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchpatch, fetchFromGitHub, pkg-config, autoreconfHook, wrapGAppsHook
|
||||
, gnome, avahi, gtk3, libayatana-appindicator-gtk3, libnotify, libpulseaudio
|
||||
, xlibsWrapper, gsettings-desktop-schemas
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pasystray";
|
||||
version = "0.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "christophgysin";
|
||||
repo = "pasystray";
|
||||
rev = "${pname}-${version}";
|
||||
sha256 = "0xx1bm9kimgq11a359ikabdndqg5q54pn1d1dyyjnrj0s41168fk";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/christophgysin/pasystray/issues/90#issuecomment-306190701
|
||||
./fix-wayland.patch
|
||||
|
||||
# https://github.com/christophgysin/pasystray/issues/98
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/p/pasystray/0.7.1-1/debian/patches/0001-Build-against-ayatana-appindicator.patch";
|
||||
sha256 = "0hijphrf52n2zfwdnrmxlp3a7iwznnkb79awvpzplz0ia2lqywpw";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoreconfHook wrapGAppsHook ];
|
||||
buildInputs = [
|
||||
gnome.adwaita-icon-theme
|
||||
avahi gtk3 libayatana-appindicator-gtk3 libnotify libpulseaudio xlibsWrapper
|
||||
gsettings-desktop-schemas
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "PulseAudio system tray";
|
||||
homepage = "https://github.com/christophgysin/pasystray";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ exlevan kamilchm ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
34
pkgs/tools/audio/pasystray/fix-wayland.patch
Normal file
34
pkgs/tools/audio/pasystray/fix-wayland.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
--- a/src/x11-property.c
|
||||
+++ b/src/x11-property.c
|
||||
@@ -43,11 +43,15 @@ static Window window;
|
||||
void x11_property_init()
|
||||
{
|
||||
display = gdk_x11_get_default_xdisplay();
|
||||
+ if (!GDK_IS_X11_DISPLAY(display)) return;
|
||||
+ Screen* scr = ScreenOfDisplay(display, 0);
|
||||
+
|
||||
window = RootWindow(display, 0);
|
||||
}
|
||||
|
||||
void x11_property_set(const char* key, const char* value)
|
||||
{
|
||||
+ if (!GDK_IS_X11_DISPLAY(display)) return;
|
||||
g_debug("[x11-property] setting '%s' to '%s'", key, value);
|
||||
|
||||
Atom atom = XInternAtom(display, key, False);
|
||||
@@ -57,6 +61,7 @@ void x11_property_set(const char* key, c
|
||||
|
||||
void x11_property_del(const char* key)
|
||||
{
|
||||
+ if (!GDK_IS_X11_DISPLAY(display)) return;
|
||||
g_debug("[x11-property] deleting '%s'", key);
|
||||
|
||||
Atom atom = XInternAtom(display, key, False);
|
||||
@@ -65,6 +70,7 @@ void x11_property_del(const char* key)
|
||||
|
||||
char* x11_property_get(const char* key)
|
||||
{
|
||||
+ if (!GDK_IS_X11_DISPLAY(display)) return NULL;
|
||||
Atom property = XInternAtom(display, key, False);
|
||||
Atom actual_type;
|
||||
int actual_format;
|
||||
43
pkgs/tools/audio/patray/default.nix
Normal file
43
pkgs/tools/audio/patray/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib
|
||||
, python3
|
||||
, qt5
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "patray";
|
||||
version = "0.1.1";
|
||||
|
||||
src = python3.pkgs.fetchPypi {
|
||||
inherit version pname;
|
||||
sha256 = "0vaapn2p4257m1d5nbnwnh252b7lhl00560gr9pqh2b7xqm1bh6g";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
sed -i '30i entry_points = { "console_scripts": [ "patray = patray.__main__:main" ] },' setup.py
|
||||
sed -i 's/production.txt/production.in/' setup.py
|
||||
sed -i '/pyside2/d' requirements/production.in
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
pulsectl
|
||||
loguru
|
||||
cock
|
||||
pyside2
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
||||
postFixup = ''
|
||||
wrapQtApp $out/bin/patray
|
||||
'';
|
||||
|
||||
|
||||
|
||||
meta = with lib; {
|
||||
description = "Yet another tray pulseaudio frontend";
|
||||
homepage = "https://github.com/pohmelie/patray";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ domenkozar ];
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/audio/picotts/default.nix
Normal file
26
pkgs/tools/audio/picotts/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, popt }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "picotts";
|
||||
version = "unstable-2018-10-19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "picotts";
|
||||
owner = "naggety";
|
||||
rev = "2f86050dc5da9ab68fc61510b594d8e6975c4d2d";
|
||||
sha256 = "1k2mdv9llkh77jr4qr68yf0zgjqk87np35fgfmnc3rpdp538sccl";
|
||||
};
|
||||
nativeBuildInputs = [ autoconf automake ];
|
||||
buildInputs = [ libtool popt ];
|
||||
sourceRoot = "source/pico";
|
||||
preConfigure = "./autogen.sh";
|
||||
meta = {
|
||||
description = "Text to speech voice sinthesizer from SVox";
|
||||
homepage = "https://github.com/naggety/picotts";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = [ lib.maintainers.canndrew ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
27
pkgs/tools/audio/playerctl/default.nix
Normal file
27
pkgs/tools/audio/playerctl/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, meson, ninja, fetchFromGitHub, glib, pkg-config, gtk-doc, docbook_xsl, gobject-introspection }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "playerctl";
|
||||
version = "2.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "acrisci";
|
||||
repo = "playerctl";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-OiGKUnsKX0ihDRceZoNkcZcEAnz17h2j2QUOSVcxQEY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ meson ninja pkg-config gtk-doc docbook_xsl gobject-introspection ];
|
||||
buildInputs = [ glib ];
|
||||
|
||||
mesonFlags = [ "-Dbash-completions=true" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line utility and library for controlling media players that implement MPRIS";
|
||||
homepage = "https://github.com/acrisci/playerctl";
|
||||
license = licenses.lgpl3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ puffnfresh ];
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
}
|
||||
25
pkgs/tools/audio/pnmixer/default.nix
Normal file
25
pkgs/tools/audio/pnmixer/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, gettext, alsa-lib, gtk3, glib, libnotify, libX11, pcre }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pnmixer";
|
||||
version = "0.7.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nicklan";
|
||||
repo = "pnmixer";
|
||||
rev = "v${version}";
|
||||
sha256 = "0416pa933ddf4b7ph9zxhk5jppkk7ppcq1aqph6xsrfnka4yb148";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config gettext ];
|
||||
|
||||
buildInputs = [ alsa-lib gtk3 glib libnotify libX11 pcre ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/nicklan/pnmixer";
|
||||
description = "ALSA volume mixer for the system tray";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ campadrenalin romildo ];
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/audio/pulsemixer/default.nix
Normal file
35
pkgs/tools/audio/pulsemixer/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchFromGitHub, python3, libpulseaudio }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pulsemixer";
|
||||
version = "1.5.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "GeorgeFilipkin";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1jagx9zmz5pfsld8y2rj2kqg6ww9f6vqiawfy3vhqc49x3xx92p4";
|
||||
};
|
||||
|
||||
inherit libpulseaudio;
|
||||
|
||||
buildInputs = [ python3 ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install pulsemixer $out/bin/
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace "$out/bin/pulsemixer" \
|
||||
--replace "libpulse.so.0" "$libpulseaudio/lib/libpulse.so.0"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cli and curses mixer for pulseaudio";
|
||||
homepage = "https://github.com/GeorgeFilipkin/pulsemixer";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.woffs ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/audio/qastools/default.nix
Normal file
24
pkgs/tools/audio/qastools/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ mkDerivation, lib, fetchFromGitLab, cmake, alsa-lib, udev, qtbase, qtsvg, qttools }:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "qastools";
|
||||
version = "0.23.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "sebholt";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "19hn64hnvryfmrkdg6rqyzahdbqf1s5y3dcca389jj6sdx93b3ip";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ alsa-lib udev qtbase qtsvg qttools ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Collection of desktop applications for ALSA configuration";
|
||||
homepage = "https://gitlab.com/sebholt/qastools";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ orivej ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
41
pkgs/tools/audio/soco-cli/default.nix
Normal file
41
pkgs/tools/audio/soco-cli/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ lib
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "soco-cli";
|
||||
version = "0.4.21";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = python3.pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub rec {
|
||||
owner = "avantrec";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1kz2zx59gjfs01jiyzmps8j6yca06yqn6wkidvdk4s3izdm0rarw";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
fastapi
|
||||
rangehttpserver
|
||||
soco
|
||||
tabulate
|
||||
uvicorn
|
||||
];
|
||||
|
||||
# Tests wants to communicate with hardware
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"soco_cli"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line interface to control Sonos sound systems";
|
||||
homepage = "https://github.com/avantrec/soco-cli";
|
||||
license = with licenses; [ asl20 ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
53
pkgs/tools/audio/spotdl/default.nix
Normal file
53
pkgs/tools/audio/spotdl/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ lib
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
, ffmpeg
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "spotdl";
|
||||
version = "3.9.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "spotDL";
|
||||
repo = "spotify-downloader";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-JoeNVMuEslz7A7G4ZvikimZrG75YrH5Mx3Oamtfy4cM=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
spotipy
|
||||
pytube
|
||||
rich
|
||||
rapidfuzz
|
||||
mutagen
|
||||
ytmusicapi
|
||||
yt-dlp
|
||||
beautifulsoup4
|
||||
requests
|
||||
unidecode
|
||||
setuptools
|
||||
];
|
||||
|
||||
checkInputs = with python3.pkgs; [
|
||||
pytestCheckHook
|
||||
pytest-mock
|
||||
pytest-vcr
|
||||
pyfakefs
|
||||
pytest-subprocess
|
||||
];
|
||||
|
||||
# requires networking
|
||||
doCheck = false;
|
||||
|
||||
makeWrapperArgs = [
|
||||
"--prefix" "PATH" ":" (lib.makeBinPath [ ffmpeg ])
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Download your Spotify playlists and songs along with album art and metadata";
|
||||
homepage = "https://github.com/spotDL/spotify-downloader";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
||||
34
pkgs/tools/audio/stt/default.nix
Normal file
34
pkgs/tools/audio/stt/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ stdenv, lib, fetchurl, autoPatchelfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "stt";
|
||||
version = "0.9.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/coqui-ai/STT/releases/download/v${version}/native_client.tf.Linux.tar.xz";
|
||||
sha256 = "0axwys8vis4f0m7d1i2r3dfqlc8p3yj2nisvc7pdi5qs741xgy8w";
|
||||
};
|
||||
setSourceRoot = "sourceRoot=`pwd`";
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
install -D stt $out/bin/stt
|
||||
install -D coqui-stt.h $out/include/coqui-stt.h
|
||||
install -D libstt.so $out/lib/libstt.so
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/coqui-ai/STT";
|
||||
description = "Deep learning toolkit for Speech-to-Text, battle-tested in research and production";
|
||||
license = licenses.mpl20;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with maintainers; [ rvolosatovs ];
|
||||
};
|
||||
}
|
||||
15
pkgs/tools/audio/trx/add_bctoolbox_ldlib.patch
Normal file
15
pkgs/tools/audio/trx/add_bctoolbox_ldlib.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index ffcd883..c4b4ff7 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -12,8 +12,9 @@ CFLAGS += -MMD -Wall
|
||||
LDLIBS_ASOUND ?= -lasound
|
||||
LDLIBS_OPUS ?= -lopus
|
||||
LDLIBS_ORTP ?= -lortp
|
||||
+LDLIBS_BCTOOLBOX ?= -lbctoolbox
|
||||
|
||||
-LDLIBS += $(LDLIBS_ASOUND) $(LDLIBS_OPUS) $(LDLIBS_ORTP)
|
||||
+LDLIBS += $(LDLIBS_ASOUND) $(LDLIBS_OPUS) $(LDLIBS_ORTP) $(LDLIBS_BCTOOLBOX)
|
||||
|
||||
.PHONY: all install dist clean
|
||||
|
||||
28
pkgs/tools/audio/trx/default.nix
Normal file
28
pkgs/tools/audio/trx/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchurl, alsa-lib, libopus, ortp, bctoolbox }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "trx";
|
||||
version = "0.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.pogo.org.uk/~mark/trx/releases/${pname}-${version}.tar.gz";
|
||||
sha256 = "1jjgca92nifjhcr3n0fmpfr6f5gxlqyal2wmgdlgd7hx834r1if7";
|
||||
};
|
||||
|
||||
# Makefile is currently missing -lbctoolbox so the build fails when linking
|
||||
# the libraries. This patch adds that flag.
|
||||
patches = [
|
||||
./add_bctoolbox_ldlib.patch
|
||||
];
|
||||
|
||||
buildInputs = [ alsa-lib libopus ortp bctoolbox ];
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple toolset for broadcasting live audio using RTP/UDP and Opus";
|
||||
homepage = "http://www.pogo.org.uk/~mark/trx/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.hansjoergschurr ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
173
pkgs/tools/audio/tts/default.nix
Normal file
173
pkgs/tools/audio/tts/default.nix
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
{ lib
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
, espeak-ng
|
||||
}:
|
||||
|
||||
# USAGE:
|
||||
# $ tts-server --list_models
|
||||
# # pick your favorite vocoder/tts model
|
||||
# $ tts-server --model_name tts_models/en/ljspeech/glow-tts --vocoder_name vocoder_models/universal/libri-tts/fullband-melgan
|
||||
#
|
||||
# If you upgrade from an old version you may have to delete old models from ~/.local/share/tts
|
||||
#
|
||||
# For now, for deployment check the systemd unit in the pull request:
|
||||
# https://github.com/NixOS/nixpkgs/pull/103851#issue-521121136
|
||||
|
||||
let
|
||||
python = python3.override {
|
||||
packageOverrides = self: super: {
|
||||
# API breakage with 0.9.0
|
||||
# TypeError: mel() takes 0 positional arguments but 2 positional arguments (and 3 keyword-only arguments) were given
|
||||
librosa = super.librosa.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "0.8.1";
|
||||
src = oldAttrs.src.override {
|
||||
inherit version;
|
||||
sha256 = "c53d05e768ae4a3e553ae21c2e5015293e5efbfd5c12d497f1104cb519cca6b3";
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
in
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
pname = "tts";
|
||||
version = "0.6.2";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "coqui-ai";
|
||||
repo = "TTS";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-n27a1s3Dpe5Hd3JryD4fPAjRcNc0YR1fpop+uhYA6sQ=";
|
||||
};
|
||||
|
||||
postPatch = let
|
||||
relaxedConstraints = [
|
||||
"gruut"
|
||||
"librosa"
|
||||
"mecab-python3"
|
||||
"numba"
|
||||
"numpy"
|
||||
"umap-learn"
|
||||
"unidic-lite"
|
||||
];
|
||||
in ''
|
||||
sed -r -i \
|
||||
${lib.concatStringsSep "\n" (map (package:
|
||||
''-e 's/${package}.*[<>=]+.*/${package}/g' \''
|
||||
) relaxedConstraints)}
|
||||
requirements.txt
|
||||
sed -i '/tensorboardX/d' requirements.txt
|
||||
'';
|
||||
|
||||
nativeBuildInputs = with python.pkgs; [
|
||||
cython
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
anyascii
|
||||
coqpit
|
||||
coqui-trainer
|
||||
flask
|
||||
fsspec
|
||||
gdown
|
||||
gruut
|
||||
inflect
|
||||
jieba
|
||||
librosa
|
||||
matplotlib
|
||||
mecab-python3
|
||||
numba
|
||||
pandas
|
||||
pypinyin
|
||||
pysbd
|
||||
pytorch-bin
|
||||
pyworld
|
||||
scipy
|
||||
soundfile
|
||||
tensorflow
|
||||
torchaudio-bin
|
||||
tqdm
|
||||
umap-learn
|
||||
unidic-lite
|
||||
webrtcvad
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
cp -r TTS/server/templates/ $out/${python.sitePackages}/TTS/server
|
||||
# cython modules are not installed for some reasons
|
||||
(
|
||||
cd TTS/tts/utils/monotonic_align
|
||||
${python.interpreter} setup.py install --prefix=$out
|
||||
)
|
||||
'';
|
||||
|
||||
checkInputs = with python.pkgs; [
|
||||
espeak-ng
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# use the installed TTS in $PYTHONPATH instead of the one from source to also have cython modules.
|
||||
mv TTS{,.old}
|
||||
export PATH=$out/bin:$PATH
|
||||
|
||||
# numba tries to write to HOME directory
|
||||
export HOME=$TMPDIR
|
||||
|
||||
for file in $(grep -rl 'python TTS/bin' tests); do
|
||||
substituteInPlace "$file" \
|
||||
--replace "python TTS/bin" "${python.interpreter} $out/lib/${python.libPrefix}/site-packages/TTS/bin"
|
||||
done
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# Requires network acccess to download models
|
||||
"test_synthesize"
|
||||
"test_run_all_models"
|
||||
# Mismatch between phonemes
|
||||
"test_text_to_ids_phonemes_with_eos_bos_and_blank"
|
||||
# Takes too long
|
||||
"test_parametrized_wavernn_dataset"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Requires network acccess to download models
|
||||
"tests/aux_tests/test_remove_silence_vad_script.py"
|
||||
# phonemes mismatch between espeak-ng and gruuts phonemizer
|
||||
"tests/text_tests/test_phonemizer.py"
|
||||
# no training, it takes too long
|
||||
"tests/aux_tests/test_speaker_encoder_train.py"
|
||||
"tests/tts_tests/test_align_tts_train.py"
|
||||
"tests/tts_tests/test_fast_pitch_speaker_emb_train.py"
|
||||
"tests/tts_tests/test_fast_pitch_train.py"
|
||||
"tests/tts_tests/test_glow_tts_d-vectors_train.py"
|
||||
"tests/tts_tests/test_glow_tts_speaker_emb_train.py"
|
||||
"tests/tts_tests/test_glow_tts_train.py"
|
||||
"tests/tts_tests/test_speedy_speech_train.py"
|
||||
"tests/tts_tests/test_tacotron2_d-vectors_train.py"
|
||||
"tests/tts_tests/test_tacotron2_speaker_emb_train.py"
|
||||
"tests/tts_tests/test_tacotron2_train.py"
|
||||
"tests/tts_tests/test_tacotron_train.py"
|
||||
"tests/tts_tests/test_vits_d-vectors_train.py"
|
||||
"tests/tts_tests/test_vits_multilingual_speaker_emb_train.py"
|
||||
"tests/tts_tests/test_vits_multilingual_train-d_vectors.py"
|
||||
"tests/tts_tests/test_vits_speaker_emb_train.py"
|
||||
"tests/tts_tests/test_vits_train.py"
|
||||
"tests/vocoder_tests/test_wavegrad_train.py"
|
||||
"tests/vocoder_tests/test_parallel_wavegan_train.py"
|
||||
"tests/vocoder_tests/test_fullband_melgan_train.py"
|
||||
"tests/vocoder_tests/test_hifigan_train.py"
|
||||
"tests/vocoder_tests/test_multiband_melgan_train.py"
|
||||
"tests/vocoder_tests/test_melgan_train.py"
|
||||
"tests/vocoder_tests/test_wavernn_train.py"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/coqui-ai/TTS";
|
||||
changelog = "https://github.com/coqui-ai/TTS/releases/tag/v${version}";
|
||||
description = "Deep learning toolkit for Text-to-Speech, battle-tested in research and production";
|
||||
license = licenses.mpl20;
|
||||
maintainers = teams.tts.members;
|
||||
};
|
||||
}
|
||||
44
pkgs/tools/audio/vgmtools/default.nix
Normal file
44
pkgs/tools/audio/vgmtools/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, unstableGitUpdater
|
||||
, cmake
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "vgmtools";
|
||||
version = "unstable-2022-05-23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vgmrips";
|
||||
repo = "vgmtools";
|
||||
rev = "e0df1511ddf7b1207b448487616ff18a9049c278";
|
||||
sha256 = "2nM3E/XeZ1OeOj3fPqvuJgQcPOtBerduGpVfpGLVhHQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
zlib
|
||||
];
|
||||
|
||||
# Some targets are not enabled by default
|
||||
makeFlags = [
|
||||
"all" "opt_oki" "optdac" "optvgm32"
|
||||
];
|
||||
|
||||
passthru.updateScript = unstableGitUpdater {
|
||||
url = "https://github.com/vgmrips/vgmtools.git";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/vgmrips/vgmtools";
|
||||
description = "A collection of tools for the VGM file format";
|
||||
license = licenses.gpl2; # Not clarified whether Only or Plus
|
||||
maintainers = with maintainers; [ OPNA2608 ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/audio/video2midi/default.nix
Normal file
35
pkgs/tools/audio/video2midi/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, fetchFromGitHub, pythonPackages, opencv3 }:
|
||||
|
||||
let
|
||||
opencv3_ = pythonPackages.toPythonModule (opencv3.override {
|
||||
inherit pythonPackages;
|
||||
enablePython = true;
|
||||
enableFfmpeg = true;
|
||||
});
|
||||
in pythonPackages.buildPythonApplication rec {
|
||||
pname = "video2midi";
|
||||
version = "0.4.6.5";
|
||||
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "svsdval";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0qzrxqhsxn0h71nfrsi9g78hx3pqm3b8sr6fjq01k4k6dd2nwfam";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with pythonPackages; [ opencv3_ midiutil pygame pyopengl ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 v2m.py $out/bin/v2m.py
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Youtube synthesia video to midi conversion tool";
|
||||
homepage = src.meta.homepage;
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = [ ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
56
pkgs/tools/audio/volctl/default.nix
Normal file
56
pkgs/tools/audio/volctl/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ lib, python3Packages, fetchFromGitHub, wrapGAppsHook, gobject-introspection, libpulseaudio, glib, gtk3, pango, xorg }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "volctl";
|
||||
version = "0.8.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "buzz";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1cx27j83pz2qffnzb85fbl1x6pp3irv1kbw7g1hri7kaw6ky4xiz";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace volctl/lib/xwrappers.py \
|
||||
--replace 'libXfixes.so' "${xorg.libXfixes}/lib/libXfixes.so" \
|
||||
--replace 'libXfixes.so.3' "${xorg.libXfixes}/lib/libXfixes.so.3"
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
export LD_LIBRARY_PATH=${libpulseaudio}/lib
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
gobject-introspection
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ pango gtk3 ] ++ (with python3Packages; [
|
||||
click
|
||||
pycairo
|
||||
pygobject3
|
||||
pyyaml
|
||||
]);
|
||||
|
||||
# with strictDeps importing "gi.repository.Gtk" fails with "gi.RepositoryError: Typelib file for namespace 'Pango', version '1.0' not found"
|
||||
strictDeps = false;
|
||||
|
||||
# no tests included
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "volctl" ];
|
||||
|
||||
preFixup = ''
|
||||
glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"}
|
||||
gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${libpulseaudio}/lib")
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "PulseAudio enabled volume control featuring per-app sliders";
|
||||
homepage = "https://buzz.github.io/volctl/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.romildo ];
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/audio/volumeicon/default.nix
Normal file
24
pkgs/tools/audio/volumeicon/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, fetchurl, lib, stdenv, gtk3, pkg-config, intltool, alsa-lib }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "volumeicon";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://softwarebakery.com/maato/files/volumeicon/volumeicon-0.5.1.tar.gz";
|
||||
sha256 = "182xl2w8syv6ky2h2bc9imc6ap8pzh0p7rp63hh8nw0xm38c3f14";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ gtk3 intltool alsa-lib ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A lightweight volume control that sits in your systray";
|
||||
homepage = "http://softwarebakery.com/maato/volumeicon.html";
|
||||
platforms = pkgs.lib.platforms.linux;
|
||||
maintainers = with maintainers; [ bobvanderlinden ];
|
||||
license = pkgs.lib.licenses.gpl3;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
140
pkgs/tools/audio/yabridge/default.nix
Normal file
140
pkgs/tools/audio/yabridge/default.nix
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
{ lib
|
||||
, multiStdenv
|
||||
, fetchFromGitHub
|
||||
, substituteAll
|
||||
, pkgsi686Linux
|
||||
, libnotify
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, wine
|
||||
, boost
|
||||
, libxcb
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
let
|
||||
# Derived from subprojects/bitsery.wrap
|
||||
bitsery = fetchFromGitHub {
|
||||
owner = "fraillt";
|
||||
repo = "bitsery";
|
||||
rev = "c0fc083c9de805e5825d7553507569febf6a6f93";
|
||||
sha256 = "sha256-VwzVtxt+E/SVcxqIJw8BKPO2q7bu/hkhY+nB7FHrZpY=";
|
||||
};
|
||||
|
||||
# Derived from subprojects/function2.wrap
|
||||
function2 = fetchFromGitHub {
|
||||
owner = "Naios";
|
||||
repo = "function2";
|
||||
rev = "02ca99831de59c7c3a4b834789260253cace0ced";
|
||||
sha256 = "sha256-wrt+fCcM6YD4ZRZYvqqB+fNakCNmltdPZKlNkPLtgMs=";
|
||||
};
|
||||
|
||||
# Derived from subprojects/tomlplusplus.wrap
|
||||
tomlplusplus = fetchFromGitHub {
|
||||
owner = "marzer";
|
||||
repo = "tomlplusplus";
|
||||
rev = "8e669aa6990e0ed219c169d491472d749f54c393";
|
||||
sha256 = "sha256-l8ckbCqjz3GUfwStcl3H2C+un5dZfT2uLtayvdu93D4=";
|
||||
};
|
||||
|
||||
# Derived from vst3.wrap
|
||||
vst3 = fetchFromGitHub {
|
||||
owner = "robbert-vdh";
|
||||
repo = "vst3sdk";
|
||||
rev = "v3.7.4_build_25-patched";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "sha256-oHRJZItw+he5M+beVZkUrhJir6rgFZ80ORzA73mJT2A=";
|
||||
};
|
||||
in multiStdenv.mkDerivation rec {
|
||||
pname = "yabridge";
|
||||
version = "3.8.1";
|
||||
|
||||
# NOTE: Also update yabridgectl's cargoHash when this is updated
|
||||
src = fetchFromGitHub {
|
||||
owner = "robbert-vdh";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-5Mi/aIjOKbn7guTj+AKGQRv+k7w4gzfdA9Mw4ocUlOE=";
|
||||
};
|
||||
|
||||
# Unpack subproject sources
|
||||
postUnpack = ''(
|
||||
cd "$sourceRoot/subprojects"
|
||||
cp -R --no-preserve=mode,ownership ${bitsery} bitsery
|
||||
cp packagefiles/bitsery/* bitsery
|
||||
cp -R --no-preserve=mode,ownership ${function2} function2
|
||||
cp packagefiles/function2/* function2
|
||||
cp -R --no-preserve=mode,ownership ${tomlplusplus} tomlplusplus
|
||||
cp -R --no-preserve=mode,ownership ${vst3} vst3
|
||||
)'';
|
||||
|
||||
patches = [
|
||||
# Hard code bitbridge & runtime dependencies
|
||||
(substituteAll {
|
||||
src = ./hardcode-dependencies.patch;
|
||||
boost32 = pkgsi686Linux.boost;
|
||||
libxcb32 = pkgsi686Linux.xorg.libxcb;
|
||||
inherit libnotify wine;
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
wine
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
libxcb
|
||||
];
|
||||
|
||||
# Meson is no longer able to pick up Boost automatically.
|
||||
# https://github.com/NixOS/nixpkgs/issues/86131
|
||||
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
|
||||
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
|
||||
|
||||
mesonFlags = [
|
||||
"--cross-file" "cross-wine.conf"
|
||||
"-Dwith-bitbridge=true"
|
||||
|
||||
# Requires CMake and is unnecessary
|
||||
"-Dtomlplusplus:generate_cmake_config=false"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out/bin" "$out/lib"
|
||||
cp yabridge-group*.exe{,.so} "$out/bin"
|
||||
cp yabridge-host*.exe{,.so} "$out/bin"
|
||||
cp libyabridge-vst2.so "$out/lib"
|
||||
cp libyabridge-vst3.so "$out/lib"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
# Hard code wine path in wrapper scripts generated by winegcc
|
||||
postFixup = ''
|
||||
for exe in "$out"/bin/*.exe; do
|
||||
substituteInPlace "$exe" \
|
||||
--replace 'WINELOADER="wine"' 'WINELOADER="${wine}/bin/wine"'
|
||||
done
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
attrPath = pname;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Yet Another VST bridge, run Windows VST2 plugins under Linux";
|
||||
homepage = "https://github.com/robbert-vdh/yabridge";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ kira-bruneau ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
43
pkgs/tools/audio/yabridge/hardcode-dependencies.patch
Normal file
43
pkgs/tools/audio/yabridge/hardcode-dependencies.patch
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index c71d4fdb..b3f381ba 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -201,6 +201,7 @@ if with_32bit_libraries or with_bitbridge
|
||||
'boost_filesystem',
|
||||
static : with_static_boost,
|
||||
dirs : [
|
||||
+ '@boost32@/lib',
|
||||
# Used by Arch based distros
|
||||
'/usr/local/lib32',
|
||||
'/usr/lib32',
|
||||
@@ -224,7 +225,7 @@ if is_64bit_system
|
||||
xcb_64bit_dep = dependency('xcb')
|
||||
endif
|
||||
if with_32bit_libraries or with_bitbridge
|
||||
- xcb_32bit_dep = winegcc.find_library('xcb')
|
||||
+ xcb_32bit_dep = winegcc.find_library('xcb', dirs: ['@libxcb32@/lib'])
|
||||
endif
|
||||
|
||||
# These are all headers-only libraries, and thus won't require separate 32-bit
|
||||
diff --git a/src/plugin/utils.cpp b/src/plugin/utils.cpp
|
||||
index fc2c8b25..c73249e3 100644
|
||||
--- a/src/plugin/utils.cpp
|
||||
+++ b/src/plugin/utils.cpp
|
||||
@@ -107,7 +107,7 @@ std::string PluginInfo::wine_version() const {
|
||||
access(wineloader_path.c_str(), X_OK) == 0) {
|
||||
wine_path = wineloader_path;
|
||||
} else {
|
||||
- wine_path = bp::search_path("wine").string();
|
||||
+ wine_path = "@wine@/bin/wine";
|
||||
}
|
||||
|
||||
bp::ipstream output;
|
||||
@@ -436,7 +436,7 @@ Configuration load_config_for(const fs::path& yabridge_path) {
|
||||
bool send_notification(const std::string& title,
|
||||
const std::string body,
|
||||
bool append_origin) {
|
||||
- const fs::path notify_send_path = bp::search_path("notify-send");
|
||||
+ const fs::path notify_send_path = "@libnotify@/bin/notify-send";
|
||||
if (notify_send_path.empty()) {
|
||||
return false;
|
||||
}
|
||||
39
pkgs/tools/audio/yabridgectl/default.nix
Normal file
39
pkgs/tools/audio/yabridgectl/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, yabridge
|
||||
, makeWrapper
|
||||
, wine
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "yabridgectl";
|
||||
version = yabridge.version;
|
||||
|
||||
src = yabridge.src;
|
||||
sourceRoot = "source/tools/yabridgectl";
|
||||
cargoSha256 = "sha256-ducF55d5OvCwlNFtt2r6pG5e9VevM2AzHSvPnWvIp1Y=";
|
||||
|
||||
patches = [
|
||||
# By default, yabridgectl locates libyabridge.so by using
|
||||
# hard coded distro specific lib paths. This patch replaces those
|
||||
# hard coded paths with lib paths from NIX_PROFILES.
|
||||
./libyabridge-from-nix-profiles.patch
|
||||
];
|
||||
|
||||
patchFlags = [ "-p3" ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram "$out/bin/yabridgectl" \
|
||||
--prefix PATH : ${lib.makeBinPath [ wine ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A small, optional utility to help set up and update yabridge for several directories at once";
|
||||
homepage = "https://github.com/robbert-vdh/yabridge/tree/master/tools/yabridgectl";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ kira-bruneau ];
|
||||
platforms = yabridge.meta.platforms;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
diff --git a/tools/yabridgectl/src/config.rs b/tools/yabridgectl/src/config.rs
|
||||
index bc5f6a81..0fcd38d3 100644
|
||||
--- a/tools/yabridgectl/src/config.rs
|
||||
+++ b/tools/yabridgectl/src/config.rs
|
||||
@@ -23,6 +23,7 @@ use std::collections::{BTreeMap, BTreeSet, HashSet};
|
||||
use std::env;
|
||||
use std::fmt::Display;
|
||||
use std::fs;
|
||||
+use std::iter;
|
||||
use std::path::{Path, PathBuf};
|
||||
use which::which;
|
||||
use xdg::BaseDirectories;
|
||||
@@ -235,34 +236,27 @@ impl Config {
|
||||
}
|
||||
}
|
||||
None => {
|
||||
- // Search in the system library locations and in `~/.local/share/yabridge` if no
|
||||
- // path was set explicitely. We'll also search through `/usr/local/lib` just in case
|
||||
- // but since we advocate against installing yabridge there we won't list this path
|
||||
- // in the error message when `libyabridge-vst2.so` can't be found.
|
||||
- let system_path = Path::new("/usr/lib");
|
||||
+ // Search through NIX_PROFILES & data home directory if no path was set explicitly.
|
||||
+ // NIX_PROFILES is iterated in reverse from the most specific (the user profile) to
|
||||
+ // the least specific (the system profile).
|
||||
+ let nix_profiles = env::var("NIX_PROFILES");
|
||||
let user_path = xdg_dirs.get_data_home();
|
||||
- let lib_directories = [
|
||||
- system_path,
|
||||
- // Used on Debian based distros
|
||||
- Path::new("/usr/lib/x86_64-linux-gnu"),
|
||||
- // Used on Fedora
|
||||
- Path::new("/usr/lib64"),
|
||||
- Path::new("/usr/local/lib"),
|
||||
- Path::new("/usr/local/lib/x86_64-linux-gnu"),
|
||||
- Path::new("/usr/local/lib64"),
|
||||
- &user_path,
|
||||
- ];
|
||||
+ let lib_directories = nix_profiles.iter()
|
||||
+ .flat_map(|profiles| profiles.split(' ')
|
||||
+ .rev()
|
||||
+ .map(|profile| Path::new(profile).join("lib")))
|
||||
+ .chain(iter::once(user_path.clone()));
|
||||
+
|
||||
let mut candidates = lib_directories
|
||||
- .iter()
|
||||
.map(|directory| directory.join(LIBYABRIDGE_VST2_NAME));
|
||||
+
|
||||
match candidates.find(|directory| directory.exists()) {
|
||||
Some(candidate) => candidate,
|
||||
_ => {
|
||||
return Err(anyhow!(
|
||||
- "Could not find '{}' in either '{}' or '{}'. You can override the \
|
||||
- default search path using 'yabridgectl set --path=<path>'.",
|
||||
+ "Could not find '{}' through 'NIX_PROFILES' or '{}'. You can override the \
|
||||
+ default search path using 'yabridgectl set --path=<path>'.",
|
||||
LIBYABRIDGE_VST2_NAME,
|
||||
- system_path.display(),
|
||||
user_path.display()
|
||||
));
|
||||
}
|
||||
diff --git a/tools/yabridgectl/src/main.rs b/tools/yabridgectl/src/main.rs
|
||||
index 48cce4fa..209e40e4 100644
|
||||
--- a/tools/yabridgectl/src/main.rs
|
||||
+++ b/tools/yabridgectl/src/main.rs
|
||||
@@ -151,7 +151,7 @@ fn main() -> Result<()> {
|
||||
.help("Path to the directory containing 'libyabridge-{vst2,vst3}.so'")
|
||||
.long_help(
|
||||
"Path to the directory containing 'libyabridge-{vst2,vst3}.so'. If this \
|
||||
- is not set, then yabridgectl will look in both '/usr/lib' and \
|
||||
+ is not set, then yabridgectl will look through 'NIX_PROFILES' and \
|
||||
'~/.local/share/yabridge' by default.",
|
||||
)
|
||||
.validator(validate_path)
|
||||
Loading…
Add table
Add a link
Reference in a new issue