From d736c68268eb7cfb40522d2eb0d88604f4b60a55 Mon Sep 17 00:00:00 2001 From: aleksana Date: Thu, 29 Feb 2024 02:31:21 +0800 Subject: [PATCH] chromatic: init at 0-unstable-2023-08-05 --- pkgs/by-name/ch/chromatic/package.nix | 69 +++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 pkgs/by-name/ch/chromatic/package.nix diff --git a/pkgs/by-name/ch/chromatic/package.nix b/pkgs/by-name/ch/chromatic/package.nix new file mode 100644 index 000000000000..7eaae7818543 --- /dev/null +++ b/pkgs/by-name/ch/chromatic/package.nix @@ -0,0 +1,69 @@ +{ lib +, stdenv +, fetchFromGitHub +, rustPlatform +, meson +, ninja +, pkg-config +, rustc +, cargo +, wrapGAppsHook4 +, desktop-file-utils +, libxml2 +, libadwaita +, portaudio +, libpulseaudio +}: + +stdenv.mkDerivation rec { + pname = "chromatic"; + version = "0-unstable-2023-08-05"; + + src = fetchFromGitHub { + owner = "nate-xyz"; + repo = "chromatic"; + rev = "ffaeb50dcce74bf3ba1b05f98423cf48f205f55e"; + hash = "sha256-E3v3UoQumBBYDOiXMfCRh5J7bfUCkettHth7SAresCE="; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-M3UMeGkLf57/I/9BIkyiMpOvjbKQJrOk+axf05vRoW0="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + rustPlatform.cargoSetupHook + rustc + cargo + wrapGAppsHook4 + desktop-file-utils + libxml2.bin # xmllint + ]; + + buildInputs = [ + libadwaita + portaudio + libpulseaudio + ]; + + meta = with lib; { + description = "Fine-tune your instruments"; + longDescription = '' + Fine-tune your instruments with Chromatic. Chromatic + detects the frequency of audio input, converts it to + a musical note with the correct semitone and octave, + and displays the cents error. Cents are displayed on + an analog gauge to make tuning more visually intuitive. + Requires PulseAudio or PipeWire. + ''; + homepage = "https://github.com/nate-xyz/chromatic"; + license = licenses.gpl3Plus; + mainProgram = "chromatic"; + maintainers = with maintainers; [ aleksana ]; + platforms = platforms.linux; + }; +}