nixpkgs/pkgs/applications/audio/friture/default.nix

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

58 lines
1.5 KiB
Nix
Raw Normal View History

2022-03-21 21:01:47 +00:00
{ lib, fetchFromGitHub, python3Packages, wrapQtAppsHook }:
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";
2022-03-21 21:01:47 +00:00
version = "0.49";
2019-09-28 15:50:30 +00:00
src = fetchFromGitHub {
owner = "tlecomte";
repo = pname;
rev = "v${version}";
2022-03-21 21:01:47 +00:00
sha256 = "sha256-xKgyBV/Qc+9PgXyxcT0xG1GXLC6KnjavJ/0SUE+9VSY=";
2019-09-28 15:50:30 +00:00
};
2022-06-24 09:44:49 +00:00
nativeBuildInputs = (with python3Packages; [ numpy cython scipy ]) ++
2019-09-28 15:50:30 +00:00
[ wrapQtAppsHook ];
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
];
2021-10-01 17:13:20 +00:00
postPatch = ''
# Remove version constraints from Python dependencies in setup.py
sed -i -E "s/\"([A-Za-z0-9]+)(=|>|<)=[0-9\.]+\"/\"\1\"/g" setup.py
'';
2019-09-28 15:50:30 +00:00
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 = "A real-time audio analyzer";
homepage = "https://friture.org/";
2019-09-28 15:50:30 +00:00
license = licenses.gpl3;
platforms = platforms.linux; # fails on Darwin
2021-09-30 13:07:55 +00:00
maintainers = with maintainers; [ laikq alyaeanyx ];
2019-09-28 15:50:30 +00:00
};
}