about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/ch/chromatic/package.nix
blob: 7eaae78185433eb6a4429ab72af91a602627a76d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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;
  };
}