mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 06:33:42 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
65 lines
1.6 KiB
Nix
65 lines
1.6 KiB
Nix
{ python3Packages
|
|
, lib
|
|
, fetchFromGitHub
|
|
, makeDesktopItem
|
|
, wrapGAppsHook3
|
|
, gtk3
|
|
, gobject-introspection
|
|
, sox
|
|
, pulseaudio
|
|
}:
|
|
let
|
|
desktopItem = makeDesktopItem {
|
|
name = "lyrebird";
|
|
exec = "lyrebird";
|
|
icon = "${placeholder "out"}/share/lyrebird/icon.png";
|
|
desktopName = "Lyrebird";
|
|
genericName = "Voice Changer";
|
|
categories = [ "AudioVideo" "Audio" ];
|
|
};
|
|
in
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "lyrebird";
|
|
version = "1.2.0";
|
|
|
|
format = "other";
|
|
doCheck = false;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "chxrlt";
|
|
repo = "lyrebird";
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "sha256-VIYcOxvSpzRvJMzEv2i5b7t0WMF7aQxB4Y1jfvuZN/Y=";
|
|
};
|
|
|
|
propagatedBuildInputs = with python3Packages; [ toml pygobject3 ];
|
|
|
|
nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ];
|
|
|
|
buildInputs = [ gtk3 sox ];
|
|
|
|
dontWrapGApps = true;
|
|
makeWrapperArgs = [
|
|
"--prefix 'PATH' ':' '${lib.makeBinPath [ sox pulseaudio ]}'"
|
|
"--prefix 'PYTHONPATH' ':' '${placeholder "out"}/share/lyrebird'"
|
|
"--chdir '${placeholder "out"}/share/lyrebird'"
|
|
''"''${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";
|
|
mainProgram = "lyrebird";
|
|
homepage = "https://github.com/chxrlt/lyrebird";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|