From bddc521fbe20a23787d31ad61bd64d014e876e78 Mon Sep 17 00:00:00 2001 From: Defelo Date: Tue, 4 Feb 2025 01:57:19 +0100 Subject: [PATCH 1/2] pamix: refactor --- pkgs/by-name/pa/pamix/package.nix | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/pa/pamix/package.nix b/pkgs/by-name/pa/pamix/package.nix index 1c8ebe94ace8..fc933336f340 100644 --- a/pkgs/by-name/pa/pamix/package.nix +++ b/pkgs/by-name/pa/pamix/package.nix @@ -7,17 +7,18 @@ cmake, libpulseaudio, ncurses, + nix-update-script, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "pamix"; version = "1.6"; src = fetchFromGitHub { owner = "patroclos"; repo = "pamix"; - rev = version; - sha256 = "1d44ggnwkf2gff62959pj45v3a2k091q8v154wc5pmzamam458wp"; + tag = finalAttrs.version; + hash = "sha256-l6NCqqrq11sYJyVshEMCU6ixC5E3lSSMc0+4ye17hLQ="; }; patches = [ @@ -35,24 +36,28 @@ stdenv.mkDerivation rec { ]; 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"; }; -} +}) From 3d382942301fa18d6fd5a58ce94f756ee6a4dc3e Mon Sep 17 00:00:00 2001 From: Defelo Date: Tue, 4 Feb 2025 01:57:51 +0100 Subject: [PATCH 2/2] pamix: 1.6 -> 2.0 --- pkgs/by-name/pa/pamix/package.nix | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pkgs/by-name/pa/pamix/package.nix b/pkgs/by-name/pa/pamix/package.nix index fc933336f340..251a21337621 100644 --- a/pkgs/by-name/pa/pamix/package.nix +++ b/pkgs/by-name/pa/pamix/package.nix @@ -2,7 +2,6 @@ lib, stdenv, fetchFromGitHub, - fetchpatch, pkg-config, cmake, libpulseaudio, @@ -12,29 +11,15 @@ stdenv.mkDerivation (finalAttrs: { pname = "pamix"; - version = "1.6"; + version = "2.0"; src = fetchFromGitHub { owner = "patroclos"; repo = "pamix"; tag = finalAttrs.version; - hash = "sha256-l6NCqqrq11sYJyVshEMCU6ixC5E3lSSMc0+4ye17hLQ="; + 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-fail "/etc" "$out/etc/xdg" '';