From 17f32f37425f7bbe6719f3c8c36320c5483178fb Mon Sep 17 00:00:00 2001 From: Jared Baur Date: Wed, 18 Dec 2024 10:02:06 -0800 Subject: [PATCH] pinentry-rofi: add rofi and coreutils to runtime PATH This program wants to call `env rofi`, however when pinentry-rofi is configured as the pinentry program for gpg-agent via a systemd service, these dependencies might not be available in the service's PATH. --- pkgs/by-name/pi/pinentry-rofi/package.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/pi/pinentry-rofi/package.nix b/pkgs/by-name/pi/pinentry-rofi/package.nix index a67ab511a00c..b97c8548c129 100644 --- a/pkgs/by-name/pi/pinentry-rofi/package.nix +++ b/pkgs/by-name/pi/pinentry-rofi/package.nix @@ -7,7 +7,9 @@ autoconf-archive, guile, texinfo, + makeWrapper, rofi, + coreutils, }: stdenv.mkDerivation rec { @@ -26,11 +28,20 @@ stdenv.mkDerivation rec { autoreconfHook pkg-config texinfo + makeWrapper ]; buildInputs = [ guile ]; - propagatedBuildInputs = [ rofi ]; + # pinentry-rofi wants to call `env rofi` (https://github.com/plattfot/pinentry-rofi/blob/fde8e32b8380512e2ba02961ccc99765575e2c89/pinentry-rofi.scm#L338) + postInstall = '' + wrapProgram $out/bin/pinentry-rofi --prefix PATH : ${ + lib.makeBinPath [ + rofi + coreutils + ] + } + ''; meta = with lib; { description = "Rofi frontend to pinentry";