nixpkgs/pkgs/applications/video/corrscope/default.nix

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

96 lines
2.2 KiB
Nix
Raw Normal View History

2021-03-15 13:50:06 +01:00
{ lib
, mkDerivationWith
, python3Packages
2021-08-05 18:01:26 +02:00
, fetchFromGitHub
, fetchpatch
2021-03-15 13:50:06 +01:00
, wrapQtAppsHook
, ffmpeg
, qtbase
, testers
, corrscope
2021-03-15 13:50:06 +01:00
}:
mkDerivationWith python3Packages.buildPythonApplication rec {
pname = "corrscope";
2023-03-27 18:57:46 +02:00
version = "0.8.1";
2021-11-30 00:34:13 +01:00
format = "pyproject";
2021-03-15 13:50:06 +01:00
2021-08-05 18:01:26 +02:00
src = fetchFromGitHub {
owner = "corrscope";
repo = "corrscope";
rev = version;
hash = "sha256-pS7upOYZAjgR3lWxny8TNZEj3Rrbg+L90ANZWFO9UPQ=";
2021-03-15 13:50:06 +01:00
};
patches = [
# https://github.com/corrscope/corrscope/pull/446
(fetchpatch {
name = "remove-setuptools-dependency.patch";
url = "https://github.com/corrscope/corrscope/commit/70b123173a7a012d9f29d6d3a8960b85caf6cc79.patch";
hash = "sha256-YCtb7v8cGP0pdceAKeoempnRzw+LRKQqDb3AfN0z/9s=";
})
];
pythonRelaxDeps = [ "attrs" "ruamel.yaml" ];
2022-09-23 14:09:03 +02:00
2021-11-30 00:34:13 +01:00
nativeBuildInputs = [
wrapQtAppsHook
] ++ (with python3Packages; [
poetry-core
2023-03-27 18:57:46 +02:00
pythonRelaxDepsHook
2021-11-30 00:34:13 +01:00
]);
2021-03-15 13:50:06 +01:00
2021-11-30 00:34:13 +01:00
buildInputs = [
ffmpeg
qtbase
];
2021-03-15 13:50:06 +01:00
2021-11-30 00:34:13 +01:00
propagatedBuildInputs = with python3Packages; [
appdirs
2023-03-27 18:57:46 +02:00
appnope
2021-11-30 00:34:13 +01:00
atomicwrites
attrs
click
matplotlib
numpy
packaging
2022-03-23 08:14:17 +01:00
qtpy
2021-11-30 00:34:13 +01:00
pyqt5
ruamel-yaml
2022-03-23 08:14:17 +01:00
colorspacious
2021-11-30 00:34:13 +01:00
];
2021-03-15 13:50:06 +01:00
dontWrapQtApps = true;
preFixup = ''
makeWrapperArgs+=(
2021-08-08 01:49:08 +02:00
--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
2021-03-15 13:50:06 +01: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 13:50:06 +01: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 13:50:06 +01:00
};
}