diff --git a/pkgs/applications/video/corrscope/default.nix b/pkgs/applications/video/corrscope/default.nix new file mode 100644 index 000000000000..d691882a2c6f --- /dev/null +++ b/pkgs/applications/video/corrscope/default.nix @@ -0,0 +1,55 @@ +{ lib +, mkDerivationWith +, python3Packages +, wrapQtAppsHook +, ffmpeg +, qtbase +}: + +mkDerivationWith python3Packages.buildPythonApplication rec { + pname = "corrscope"; + version = "0.7.0"; + + src = python3Packages.fetchPypi { + inherit pname version; + sha256 = "0m62p3jlbx5dlp3j8wn1ka1sqpffsxbpsgv2h5cvj1n1lsgbss2s"; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace 'attrs>=18.2.0,<19.0.0' 'attrs>=18.2.0' \ + --replace 'numpy>=1.15,<2.0,!=1.19.4' 'numpy>=1.15,<2.0' + ''; + + nativeBuildInputs = [ wrapQtAppsHook ]; + + buildInputs = [ ffmpeg qtbase ]; + + propagatedBuildInputs = with python3Packages; [ appdirs attrs click matplotlib numpy pyqt5 ruamel_yaml ]; + + dontWrapQtApps = true; + + preFixup = '' + makeWrapperArgs+=( + --prefix PATH : ${ffmpeg}/bin + "''${qtWrapperArgs[@]}" + ) + ''; + + preCheck = "export HOME=$TEMP"; + + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2491770364c6..9f591552a8e5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21906,6 +21906,8 @@ in inherit (gnome2) libgnomeui GConf; }; + corrscope = libsForQt5.callPackage ../applications/video/corrscope { }; + csa = callPackage ../applications/audio/csa { }; csound = callPackage ../applications/audio/csound {