From e5d007e86a5226aa6a10690e85c0e423ad6f547c Mon Sep 17 00:00:00 2001 From: Eric Norris Date: Sat, 18 Jan 2020 15:59:30 -0500 Subject: [PATCH] rpm: fix helper script paths --- pkgs/tools/package-management/rpm/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/package-management/rpm/default.nix b/pkgs/tools/package-management/rpm/default.nix index ae0259e65fcd..05d293b5bf12 100644 --- a/pkgs/tools/package-management/rpm/default.nix +++ b/pkgs/tools/package-management/rpm/default.nix @@ -50,6 +50,11 @@ stdenv.mkDerivation rec { sed -i $out/lib/rpm/macros -e "s/^%__$tool.*/%__$tool $tool/" done + # Avoid helper scripts pointing to absolute paths + for tool in find-provides find-requires; do + sed -i $out/lib/rpm/$tool -e "s#/usr/lib/rpm/#$out/lib/rpm/#" + done + # symlinks produced by build are incorrect ln -sf $out/bin/{rpm,rpmquery} ln -sf $out/bin/{rpm,rpmverify}