base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / nc / ncpamixer / package.nix
blob77519fde31c597081505199e28b599c0900c1fa1
1 { lib, stdenv, fetchFromGitHub, fetchurl, cmake, ncurses, libpulseaudio, pandoc, pkg-config }:
3 stdenv.mkDerivation rec {
4   pname = "ncpamixer";
5   version = "1.3.7";
7   src = fetchFromGitHub {
8     owner = "fulhax";
9     repo = "ncpamixer";
10     rev = version;
11     sha256 = "sha256-GJ2zSIxSnL53nFZ2aeGlVI7i4APt+aALVEhNP5RkpMc=";
12   };
14   patches = [
15     ./remove_dynamic_download.patch
16   ];
18   postPatch = let
19     PandocMan = fetchurl {
20       url = "https://github.com/rnpgp/cmake-modules/raw/387084811ee01a69911fe86bcc644b7ed8ad6304/PandocMan.cmake";
21       hash = "sha256-KI55Yc2IuQtmbptqkk6Hzr75gIE/uQdUbQsm/fDpaWg=";
22     };
23   in ''
24     substituteInPlace src/CMakeLists.txt \
25       --replace "include(PandocMan)" "include(${PandocMan})"
26   '';
28   nativeBuildInputs = [ cmake pandoc pkg-config ];
30   buildInputs = [ ncurses libpulseaudio ];
32   configurePhase = ''
33     make PREFIX=$out USE_WIDE=1 RELEASE=1 build/Makefile
34   '';
36   meta = with lib; {
37     description = "Terminal mixer for PulseAudio inspired by pavucontrol";
38     homepage = "https://github.com/fulhax/ncpamixer";
39     license = licenses.mit;
40     platforms = platforms.linux;
41     maintainers = teams.c3d2.members;
42     mainProgram = "ncpamixer";
43   };