From 2207adf4f7d9fa2535bdf77deccf59f74c102a21 Mon Sep 17 00:00:00 2001 From: paumr Date: Sat, 28 Oct 2023 20:23:03 +0200 Subject: [PATCH] ncpamixer: 1.3.3.3 -> 1.3.7 --- pkgs/applications/audio/ncpamixer/default.nix | 22 +++++++++++++++---- .../ncpamixer/remove_dynamic_download.patch | 16 ++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 pkgs/applications/audio/ncpamixer/remove_dynamic_download.patch diff --git a/pkgs/applications/audio/ncpamixer/default.nix b/pkgs/applications/audio/ncpamixer/default.nix index fe642d8167f9..b503f5308b82 100644 --- a/pkgs/applications/audio/ncpamixer/default.nix +++ b/pkgs/applications/audio/ncpamixer/default.nix @@ -1,17 +1,31 @@ -{ lib, stdenv, fetchFromGitHub, cmake, ncurses, libpulseaudio, pkg-config }: +{ lib, stdenv, fetchFromGitHub, fetchurl, cmake, ncurses, libpulseaudio, pandoc, pkg-config }: stdenv.mkDerivation rec { pname = "ncpamixer"; - version = "1.3.3.5"; + version = "1.3.7"; src = fetchFromGitHub { owner = "fulhax"; repo = "ncpamixer"; rev = version; - sha256 = "sha256-iwwfuMZn8HwnTIEBgTuvnJNlRlPt4G+j/piXO8S7mPc="; + sha256 = "sha256-GJ2zSIxSnL53nFZ2aeGlVI7i4APt+aALVEhNP5RkpMc="; }; - nativeBuildInputs = [ cmake pkg-config ]; + patches = [ + ./remove_dynamic_download.patch + ]; + + postPatch = let + PandocMan = fetchurl { + url = "https://github.com/rnpgp/cmake-modules/raw/387084811ee01a69911fe86bcc644b7ed8ad6304/PandocMan.cmake"; + hash = "sha256-KI55Yc2IuQtmbptqkk6Hzr75gIE/uQdUbQsm/fDpaWg="; + }; + in '' + substituteInPlace src/CMakeLists.txt \ + --replace "include(PandocMan)" "include(${PandocMan})" + ''; + + nativeBuildInputs = [ cmake pandoc pkg-config ]; buildInputs = [ ncurses libpulseaudio ]; diff --git a/pkgs/applications/audio/ncpamixer/remove_dynamic_download.patch b/pkgs/applications/audio/ncpamixer/remove_dynamic_download.patch new file mode 100644 index 000000000000..af98369983a8 --- /dev/null +++ b/pkgs/applications/audio/ncpamixer/remove_dynamic_download.patch @@ -0,0 +1,16 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 8aac546..ec809e8 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -14,11 +14,9 @@ if(USE_WIDE) + set(CURSES_NEED_WIDE TRUE) + endif() + +-include(FetchContent) + include(GNUInstallDirs) + + if (BUILD_MANPAGES) +- include("${CMAKE_CURRENT_SOURCE_DIR}/cmake.deps/FetchPandocMan.cmake") + include(PandocMan) + add_pandoc_man("${CMAKE_CURRENT_SOURCE_DIR}/man/ncpamixer.1.md") + endif()