2020-10-07 09:15:18 +00:00
|
|
|
{ python3Packages
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeDesktopItem
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2020-10-07 09:15:18 +00:00
|
|
|
, gtk3
|
|
|
|
, gobject-introspection
|
|
|
|
, sox
|
|
|
|
, pulseaudio
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "lyrebird";
|
|
|
|
exec = "lyrebird";
|
|
|
|
icon = "${placeholder "out"}/share/lyrebird/icon.png";
|
|
|
|
desktopName = "Lyrebird";
|
|
|
|
genericName = "Voice Changer";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "AudioVideo" "Audio" ];
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "lyrebird";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "1.2.0";
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
format = "other";
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chxrlt";
|
|
|
|
repo = "lyrebird";
|
2024-01-25 14:12:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-VIYcOxvSpzRvJMzEv2i5b7t0WMF7aQxB4Y1jfvuZN/Y=";
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [ toml pygobject3 ];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
buildInputs = [ gtk3 sox ];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
dontWrapGApps = true;
|
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix 'PATH' ':' '${lib.makeBinPath [ sox pulseaudio ]}'"
|
|
|
|
"--prefix 'PYTHONPATH' ':' '${placeholder "out"}/share/lyrebird'"
|
2022-04-27 09:35:20 +00:00
|
|
|
"--chdir '${placeholder "out"}/share/lyrebird'"
|
2020-10-07 09:15:18 +00:00
|
|
|
''"''${gappsWrapperArgs[@]}"''
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{bin,share/{applications,lyrebird}}
|
|
|
|
cp -at $out/share/lyrebird/ app icon.png
|
|
|
|
cp -at $out/share/applications/ ${desktopItem}
|
|
|
|
install -Dm755 app.py $out/bin/lyrebird
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple and powerful voice changer for Linux, written in GTK 3";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "lyrebird";
|
2020-10-07 09:15:18 +00:00
|
|
|
homepage = "https://github.com/chxrlt/lyrebird";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|