nixpkgs/pkgs/by-name/co/corrscope/package.nix

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

88 lines
2.0 KiB
Nix
Raw Normal View History

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
, ffmpeg
2024-03-13 15:38:35 +00:00
, libsForQt5
, 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
};
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 = [
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+=(
--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
2021-03-15 12:50:06 +00:00
"''${qtWrapperArgs[@]}"
)
'';
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;
mainProgram = "corr";
2021-03-15 12:50:06 +00:00
};
}