2024-03-13 15:37:37 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-03-15 12:50:06 +00:00
|
|
|
, python3Packages
|
2021-08-05 17:01:26 +01:00
|
|
|
, fetchFromGitHub
|
2024-04-11 22:43:15 +01:00
|
|
|
, ffmpeg
|
2024-03-13 15:38:35 +00:00
|
|
|
, libsForQt5
|
2023-03-28 15:01:28 +01:00
|
|
|
, testers
|
|
|
|
, corrscope
|
2021-03-15 12:50:06 +00:00
|
|
|
}:
|
|
|
|
|
2024-03-13 15:38:35 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2021-03-15 12:50:06 +00:00
|
|
|
pname = "corrscope";
|
2024-06-08 09:42:40 +01:00
|
|
|
version = "0.9.1";
|
2024-03-13 15:37:37 +00:00
|
|
|
pyproject = true;
|
2021-03-15 12:50:06 +00:00
|
|
|
|
2021-08-05 17:01:26 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "corrscope";
|
|
|
|
repo = "corrscope";
|
2024-06-08 09:42:40 +01:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-SKsPe68CNaoUzGjMZn4azGFM3SbBipHK8gJcrm4+T+I=";
|
2021-03-15 12:50:06 +00:00
|
|
|
};
|
|
|
|
|
2024-01-17 20:19:50 +00:00
|
|
|
pythonRelaxDeps = [ "attrs" "ruamel.yaml" ];
|
2022-09-23 13:09:03 +01:00
|
|
|
|
2024-03-13 15:38:35 +00:00
|
|
|
nativeBuildInputs = (with libsForQt5; [
|
2021-11-29 23:34:13 +00:00
|
|
|
wrapQtAppsHook
|
2024-03-13 15:38:35 +00:00
|
|
|
]) ++ (with python3Packages; [
|
2021-11-29 23:34:13 +00:00
|
|
|
poetry-core
|
2023-03-27 17:57:46 +01:00
|
|
|
pythonRelaxDepsHook
|
2021-11-29 23:34:13 +00:00
|
|
|
]);
|
2021-03-15 12:50:06 +00:00
|
|
|
|
2021-11-29 23:34:13 +00:00
|
|
|
buildInputs = [
|
2024-04-11 22:43:15 +01:00
|
|
|
ffmpeg
|
2024-03-13 15:38:35 +00:00
|
|
|
] ++ (with libsForQt5; [
|
2021-11-29 23:34:13 +00:00
|
|
|
qtbase
|
2024-03-13 15:37:37 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
|
|
qtwayland
|
2024-03-13 15:38:35 +00:00
|
|
|
]);
|
2021-03-15 12:50:06 +00:00
|
|
|
|
2021-11-29 23:34:13 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
appdirs
|
2023-03-27 17:57:46 +01:00
|
|
|
appnope
|
2021-11-29 23:34:13 +00:00
|
|
|
atomicwrites
|
|
|
|
attrs
|
|
|
|
click
|
|
|
|
matplotlib
|
|
|
|
numpy
|
|
|
|
packaging
|
2022-03-23 07:14:17 +00:00
|
|
|
qtpy
|
2021-11-29 23:34:13 +00:00
|
|
|
pyqt5
|
|
|
|
ruamel-yaml
|
2022-03-23 07:14:17 +00:00
|
|
|
colorspacious
|
2021-11-29 23:34:13 +00:00
|
|
|
];
|
2021-03-15 12:50:06 +00:00
|
|
|
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=(
|
2024-04-11 22:43:15 +01:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
|
2021-03-15 12:50:06 +00:00
|
|
|
"''${qtWrapperArgs[@]}"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2023-03-28 15:01:28 +01:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = corrscope;
|
|
|
|
# Tries writing to
|
|
|
|
# - $HOME/.local/share/corrscope on Linux
|
|
|
|
# - $HOME/Library/Application Support/corrscope on Darwin
|
|
|
|
command = "env HOME=$TMPDIR ${lib.getExe corrscope} --version";
|
|
|
|
};
|
|
|
|
|
2021-03-15 12:50:06 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Render wave files into oscilloscope views, featuring advanced correlation-based triggering algorithm";
|
|
|
|
longDescription = ''
|
|
|
|
Corrscope renders oscilloscope views of WAV files recorded from chiptune (game music from
|
|
|
|
retro sound chips).
|
|
|
|
|
|
|
|
Corrscope uses "waveform correlation" to track complex waves (including SNES and Sega
|
|
|
|
Genesis/FM synthesis) which jump around on other oscilloscope programs.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/corrscope/corrscope";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ OPNA2608 ];
|
|
|
|
platforms = platforms.all;
|
2023-03-28 15:01:28 +01:00
|
|
|
mainProgram = "corr";
|
2021-03-15 12:50:06 +00:00
|
|
|
};
|
|
|
|
}
|