Skip to content

Commit

Permalink
pamix: 1.6 -> 2.0 and refactor (NixOS#379220)
Browse files Browse the repository at this point in the history
  • Loading branch information
donovanglover authored Feb 6, 2025
2 parents ad55580 + 3d38294 commit dac4c0e
Showing 1 changed file with 15 additions and 25 deletions.
40 changes: 15 additions & 25 deletions pkgs/by-name/pa/pamix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,47 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
pkg-config,
cmake,
libpulseaudio,
ncurses,
nix-update-script,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "pamix";
version = "1.6";
version = "2.0";

src = fetchFromGitHub {
owner = "patroclos";
repo = "pamix";
rev = version;
sha256 = "1d44ggnwkf2gff62959pj45v3a2k091q8v154wc5pmzamam458wp";
tag = finalAttrs.version;
hash = "sha256-7UPz6YpsnZHpW7sOJdJU2wQ5jyFPWTHxoknago0W+Ss=";
};

patches = [
# ncurses-6.3 support, included in next release
(fetchpatch {
name = "ncurses-6.3-p1.patch";
url = "https://github.com/patroclos/PAmix/commit/3400b9c048706c572373e4617b4d5fcdb8dd2505.patch";
sha256 = "0rw56a844pz876ad9p8hfvn2fkd5rh29gpp47h55g08spf0vwb2z";
})
(fetchpatch {
name = "ncurses-6.3-p2.patch";
url = "https://github.com/patroclos/PAmix/commit/5ef67fc5ef6fc0dc0b48ff07ba48093881561d9c.patch";
sha256 = "0f8shpdv2swxdz04bkqgmkvl6c17r5mn4slzr7xd6pvw8hh51p4h";
})
];

preConfigure = ''
substituteInPlace CMakeLists.txt --replace "/etc" "$out/etc/xdg"
substituteInPlace CMakeLists.txt --replace-fail "/etc" "$out/etc/xdg"
'';

nativeBuildInputs = [
cmake
pkg-config
];

buildInputs = [
libpulseaudio
ncurses
];

meta = with lib; {
passthru.updateScript = nix-update-script { };

meta = {
description = "Pulseaudio terminal mixer";
homepage = "https://github.com/patroclos/PAmix";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ ericsagnes ];
changelog = "https://github.com/patroclos/PAmix/releases/tag/${finalAttrs.version}";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ ericsagnes ];
mainProgram = "pamix";
};
}
})

0 comments on commit dac4c0e

Please sign in to comment.