nixpkgs/pkgs/by-name/co/corrscope/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

99 lines
2.1 KiB
Nix

{
stdenv,
lib,
python3Packages,
fetchFromGitHub,
ffmpeg,
libsForQt5,
testers,
corrscope,
}:
python3Packages.buildPythonApplication rec {
pname = "corrscope";
version = "0.10.1";
pyproject = true;
src = fetchFromGitHub {
owner = "corrscope";
repo = "corrscope";
rev = "refs/tags/${version}";
hash = "sha256-WSv65jEu/w6iNrL/f5PN147FBjmR0j30H1D39dd+KN8=";
};
pythonRelaxDeps = [
"attrs"
"ruamel.yaml"
];
nativeBuildInputs =
(with libsForQt5; [
wrapQtAppsHook
])
++ (with python3Packages; [
poetry-core
]);
buildInputs =
[
ffmpeg
]
++ (
with libsForQt5;
[
qtbase
]
++ lib.optionals stdenv.hostPlatform.isLinux [
qtwayland
]
);
propagatedBuildInputs = with python3Packages; [
appdirs
appnope
atomicwrites
attrs
click
matplotlib
numpy
packaging
qtpy
pyqt5
ruamel-yaml
colorspacious
];
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";
};
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";
};
}