Files
nixpkgs/pkgs/by-name/co/corrscope/package.nix
OPNA2608 9005a98422 corrscope: Add explicit passthru.updateScript
Whatever updateScript this was inheriting from being a Python package produced changes that were nonsense.
(attempts to bump from 0.11.0 (2025) to python5-macos (2023))
2026-06-03 14:52:37 +02:00

109 lines
2.3 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
gitUpdater,
ffmpeg,
python3Packages,
qt6Packages,
testers,
corrscope,
}:
python3Packages.buildPythonApplication (finalAttrs: {
pname = "corrscope";
version = "0.11.0";
pyproject = true;
src = fetchFromGitHub {
owner = "corrscope";
repo = "corrscope";
tag = finalAttrs.version;
hash = "sha256-76qa4jOSncK1eDly/uXJzpWWdsEz7Hg3DyFb7rmrQBc=";
};
nativeBuildInputs = with qt6Packages; [
wrapQtAppsHook
];
build-system = with python3Packages; [
hatchling
];
buildInputs = [
ffmpeg
]
++ (
with qt6Packages;
[
qtbase
]
++ lib.optionals stdenv.hostPlatform.isLinux [
qtwayland
]
);
dependencies = (
with python3Packages;
[
appdirs
atomicwrites
attrs
click
colorspacious
matplotlib
numpy
qtpy
pyqt6
ruamel-yaml
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
appnope
]
);
pythonRelaxDeps = [
"ruamel-yaml"
];
dontWrapQtApps = true;
preFixup = ''
makeWrapperArgs+=(
--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
"''${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";
};
updateScript = gitUpdater {
allowedVersions = "^[0-9.]+$";
};
};
meta = {
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";
changelog = "https://github.com/corrscope/corrscope/releases/tag/${finalAttrs.version}";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ OPNA2608 ];
platforms = lib.platforms.all;
mainProgram = "corr";
};
})