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

59 lines
1.4 KiB
Nix
Raw Normal View History

2019-09-28 18:50:30 +03:00
{ lib, fetchFromGitHub, python3Packages, wrapQtAppsHook }:
let
py = python3Packages;
in py.buildPythonApplication rec {
pname = "friture";
2021-09-30 16:05:33 +03:00
version = "0.48";
2019-09-28 18:50:30 +03:00
src = fetchFromGitHub {
owner = "tlecomte";
repo = pname;
rev = "v${version}";
2021-09-30 16:05:33 +03:00
sha256 = "sha256-oOH58jD49xAeSuP+l6tYUpwkYsnfeSGTt8x4DFzTY6g=";
2019-09-28 18:50:30 +03:00
};
nativeBuildInputs = (with py; [ numpy cython scipy ]) ++
[ wrapQtAppsHook ];
propagatedBuildInputs = with py; [
sounddevice
pyopengl
2020-07-20 19:09:40 +03:00
pyopengl-accelerate
2019-09-28 18:50:30 +03:00
docutils
numpy
pyqt5
appdirs
pyrr
2020-07-20 19:09:40 +03:00
rtmixer
];
patches = [
./unlock_constraints.patch
2019-09-28 18:50:30 +03:00
];
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
2019-09-28 18:50:30 +03: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 18:50:30 +03:00
meta = with lib; {
description = "A real-time audio analyzer";
homepage = "https://friture.org/";
2019-09-28 18:50:30 +03:00
license = licenses.gpl3;
platforms = platforms.linux; # fails on Darwin
2019-09-28 18:50:30 +03:00
maintainers = [ maintainers.laikq ];
};
}