nixpkgs/pkgs/by-name/fr/friture/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.6 KiB
Nix
Raw Normal View History

2024-07-09 11:53:08 +00:00
{
lib,
fetchFromGitHub,
python3Packages,
qt5,
2024-07-09 11:53:08 +00:00
}:
2019-09-28 15:50:30 +00:00
2022-06-24 09:44:49 +00:00
python3Packages.buildPythonApplication rec {
2019-09-28 15:50:30 +00:00
pname = "friture";
version = "0.51";
pyproject = true;
2019-09-28 15:50:30 +00:00
src = fetchFromGitHub {
owner = "tlecomte";
repo = "friture";
rev = "v${version}";
hash = "sha256-1Swkk7bhQTSo17Gj0i1VNiIt+fSXgDIeWfJ9LpoUEHg=";
2019-09-28 15:50:30 +00:00
};
postPatch = ''
sed -i -e 's/==.*"/"/' -e '/packages=\[/a "friture.playback",' pyproject.toml
'';
2024-07-09 11:53:08 +00:00
nativeBuildInputs =
(with python3Packages; [
numpy
cython
scipy
setuptools
2024-07-09 11:53:08 +00:00
])
++ (with qt5; [ wrapQtAppsHook ]);
buildInputs = with qt5; [ qtquickcontrols2 ];
2019-09-28 15:50:30 +00:00
2022-06-24 09:44:49 +00:00
propagatedBuildInputs = with python3Packages; [
2019-09-28 15:50:30 +00:00
sounddevice
pyopengl
2020-07-20 16:09:40 +00:00
pyopengl-accelerate
2019-09-28 15:50:30 +00:00
docutils
numpy
pyqt5
appdirs
pyrr
2020-07-20 16:09:40 +00:00
rtmixer
];
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
2019-09-28 15:50:30 +00:00
'';
postInstall = ''
substituteInPlace $out/share/applications/friture.desktop --replace usr/bin/friture friture
for size in 16 32 128 256 512
do
mkdir -p $out/share/icons/hicolor/$size\x$size
cp $src/resources/images/friture.iconset/icon_$size\x$size.png $out/share/icons/hicolor/$size\x$size/friture.png
done
mkdir -p $out/share/icons/hicolor/scalable/apps/
cp $src/resources/images-src/window-icon.svg $out/share/icons/hicolor/scalable/apps/friture.svg
'';
2019-09-28 15:50:30 +00:00
meta = with lib; {
description = "Real-time audio analyzer";
mainProgram = "friture";
homepage = "https://friture.org/";
2019-09-28 15:50:30 +00:00
license = licenses.gpl3;
platforms = platforms.linux; # fails on Darwin
2024-07-09 11:53:08 +00:00
maintainers = with maintainers; [
laikq
alyaeanyx
];
2019-09-28 15:50:30 +00:00
};
}