2021-10-01 22:24:16 +02:00
|
|
|
{ lib, fetchFromGitHub, fetchpatch, python3Packages, wrapQtAppsHook }:
|
2019-09-28 17:50:30 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
py = python3Packages;
|
|
|
|
in py.buildPythonApplication rec {
|
|
|
|
pname = "friture";
|
2021-09-30 15:05:33 +02:00
|
|
|
version = "0.48";
|
2019-09-28 17:50:30 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tlecomte";
|
friture: 0.36 -> 0.37 (#71608)
* friture: 0.36 -> 0.37
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/friture/versions
* friture: restrict to Linux platforms
Fails on Darwin with:
Traceback (most recent call last):
File "nix_run_setup", line 8, in <module>
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
File "setup.py", line 13, in <module>
import sounddevice # to find the libportaudio.dylib path
File "/nix/store/2sr2xabfdkcijzkwg5ic99lprwd6slij-python3.7-sounddevice-0.3.13/lib/python3.7/site-packages/sounddevice.py", line 61, in <module>
_lib = _ffi.dlopen('/nix/store/gzy8haziv610wbalnllcjpf3gd9f5619-portaudio-190600-20161030/lib/libportaudio.so.2')
OSError: cannot load library '/nix/store/gzy8haziv610wbalnllcjpf3gd9f5619-portaudio-190600-20161030/lib/libportaudio.so.2': dlopen(/nix/store/gzy8haziv610wbalnllcjpf3gd9f5619-portaudio-190600-20161030/lib/libportaudio.so.2, 2): image not found
2019-10-22 16:49:14 +02:00
|
|
|
repo = pname;
|
2021-08-18 12:00:51 +02:00
|
|
|
rev = "v${version}";
|
2021-09-30 15:05:33 +02:00
|
|
|
sha256 = "sha256-oOH58jD49xAeSuP+l6tYUpwkYsnfeSGTt8x4DFzTY6g=";
|
2019-09-28 17:50:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = (with py; [ numpy cython scipy ]) ++
|
|
|
|
[ wrapQtAppsHook ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with py; [
|
|
|
|
sounddevice
|
|
|
|
pyopengl
|
2020-07-20 18:09:40 +02:00
|
|
|
pyopengl-accelerate
|
2019-09-28 17:50:30 +02:00
|
|
|
docutils
|
|
|
|
numpy
|
|
|
|
pyqt5
|
|
|
|
appdirs
|
|
|
|
pyrr
|
2020-07-20 18:09:40 +02:00
|
|
|
rtmixer
|
|
|
|
];
|
|
|
|
|
2021-10-01 22:24:16 +02:00
|
|
|
patches = [
|
|
|
|
# Backported fix that resolves an issue with setuptools packaging
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-setuptools-packaging.patch";
|
|
|
|
url = "https://github.com/tlecomte/friture/commit/ea7210dae883edf17de8fec82f9428b18ee138b6.diff";
|
|
|
|
sha256 = "sha256-Kv/vmC8kcqfOgfIPQyZN46sbV6bezhq6pyj8bvke6s8=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-10-01 19:13:20 +02: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 17:50:30 +02:00
|
|
|
|
2020-10-08 14:23:06 +02:00
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
2019-09-28 17:50:30 +02:00
|
|
|
'';
|
|
|
|
|
2021-09-08 13:45:52 +02: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 17:50:30 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A real-time audio analyzer";
|
2021-07-31 19:01:50 +02:00
|
|
|
homepage = "https://friture.org/";
|
2019-09-28 17:50:30 +02:00
|
|
|
license = licenses.gpl3;
|
friture: 0.36 -> 0.37 (#71608)
* friture: 0.36 -> 0.37
Semi-automatic update generated by
https://github.com/ryantm/nixpkgs-update tools. This update was made
based on information from
https://repology.org/metapackage/friture/versions
* friture: restrict to Linux platforms
Fails on Darwin with:
Traceback (most recent call last):
File "nix_run_setup", line 8, in <module>
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
File "setup.py", line 13, in <module>
import sounddevice # to find the libportaudio.dylib path
File "/nix/store/2sr2xabfdkcijzkwg5ic99lprwd6slij-python3.7-sounddevice-0.3.13/lib/python3.7/site-packages/sounddevice.py", line 61, in <module>
_lib = _ffi.dlopen('/nix/store/gzy8haziv610wbalnllcjpf3gd9f5619-portaudio-190600-20161030/lib/libportaudio.so.2')
OSError: cannot load library '/nix/store/gzy8haziv610wbalnllcjpf3gd9f5619-portaudio-190600-20161030/lib/libportaudio.so.2': dlopen(/nix/store/gzy8haziv610wbalnllcjpf3gd9f5619-portaudio-190600-20161030/lib/libportaudio.so.2, 2): image not found
2019-10-22 16:49:14 +02:00
|
|
|
platforms = platforms.linux; # fails on Darwin
|
2021-09-30 15:07:55 +02:00
|
|
|
maintainers = with maintainers; [ laikq alyaeanyx ];
|
2019-09-28 17:50:30 +02:00
|
|
|
};
|
|
|
|
}
|