apptainer, singularity: warn abuot argument deprecation

Warn when arguments newuidmapPath and newgidmapPath is used.
This commit is contained in:
Yueh-Shun Li 2024-04-25 15:06:46 +08:00
parent dbcf7cf697
commit c3026ac986

View File

@ -116,11 +116,15 @@ let
if ((newuidmapPath == null) && (newgidmapPath == null)) then
null
else
runCommandLocal "privileged-un-utils" { } ''
mkdir -p "$out/bin"
ln -s ${lib.escapeShellArg newuidmapPath} "$out/bin/newuidmap"
ln -s ${lib.escapeShellArg newgidmapPath} "$out/bin/newgidmap"
'';
lib.warn
"${pname}: arguments newuidmapPath and newgidmapPath is deprecated in favour of systemBinPaths."
(
runCommandLocal "privileged-un-utils" { } ''
mkdir -p "$out/bin"
ln -s ${lib.escapeShellArg newuidmapPath} "$out/bin/newuidmap"
ln -s ${lib.escapeShellArg newgidmapPath} "$out/bin/newgidmap"
''
);
# Backward compatibility for privileged-un-utils.
# TODO(@ShamrockLee): Remove after Nixpkgs 24.05 branch-off.