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.

99 lines
2.1 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 16:01:26 +00: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-09-25 20:47:14 +00:00
version = "0.10.1";
2024-03-13 15:37:37 +00:00
pyproject = true;
2021-03-15 12:50:06 +00:00
2021-08-05 16:01:26 +00:00
src = fetchFromGitHub {
owner = "corrscope";
repo = "corrscope";
2024-06-08 08:42:40 +00:00
rev = "refs/tags/${version}";
2024-09-25 20:47:14 +00:00
hash = "sha256-WSv65jEu/w6iNrL/f5PN147FBjmR0j30H1D39dd+KN8=";
2021-03-15 12:50:06 +00:00
};
pythonRelaxDeps = [
"attrs"
"ruamel.yaml"
];
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
]);
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 16:57:46 +00: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
};
}