nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 82 lines 1.8 kB view raw
1{ 2 python3Packages, 3 lib, 4 fetchFromGitHub, 5 makeDesktopItem, 6 wrapGAppsHook3, 7 gtk3, 8 gobject-introspection, 9 sox, 10 pulseaudio, 11}: 12let 13 desktopItem = makeDesktopItem { 14 name = "lyrebird"; 15 exec = "lyrebird"; 16 icon = "${placeholder "out"}/share/lyrebird/icon.png"; 17 desktopName = "Lyrebird"; 18 genericName = "Voice Changer"; 19 categories = [ 20 "AudioVideo" 21 "Audio" 22 ]; 23 }; 24in 25python3Packages.buildPythonApplication rec { 26 pname = "lyrebird"; 27 version = "1.2.0"; 28 29 pyproject = false; 30 doCheck = false; 31 32 src = fetchFromGitHub { 33 owner = "lyrebird-voice-changer"; 34 repo = "lyrebird"; 35 tag = "v${version}"; 36 sha256 = "sha256-VIYcOxvSpzRvJMzEv2i5b7t0WMF7aQxB4Y1jfvuZN/Y="; 37 }; 38 39 propagatedBuildInputs = with python3Packages; [ 40 toml 41 pygobject3 42 ]; 43 44 nativeBuildInputs = [ 45 wrapGAppsHook3 46 gobject-introspection 47 ]; 48 49 buildInputs = [ 50 gtk3 51 sox 52 ]; 53 54 dontWrapGApps = true; 55 makeWrapperArgs = [ 56 "--prefix 'PATH' ':' '${ 57 lib.makeBinPath [ 58 sox 59 pulseaudio 60 ] 61 }'" 62 "--prefix 'PYTHONPATH' ':' '${placeholder "out"}/share/lyrebird'" 63 "--chdir '${placeholder "out"}/share/lyrebird'" 64 ''"''${gappsWrapperArgs[@]}"'' 65 ]; 66 67 installPhase = '' 68 mkdir -p $out/{bin,share/{applications,lyrebird}} 69 cp -at $out/share/lyrebird/ app icon.png 70 cp -at $out/share/applications/ ${desktopItem} 71 install -Dm755 app.py $out/bin/lyrebird 72 ''; 73 74 meta = { 75 description = "Simple and powerful voice changer for Linux, written in GTK 3"; 76 mainProgram = "lyrebird"; 77 homepage = "https://github.com/lyrebird-voice-changer/lyrebird"; 78 license = lib.licenses.mit; 79 maintainers = with lib.maintainers; [ OPNA2608 ]; 80 platforms = lib.platforms.linux; 81 }; 82}