Skip to content

Commit

Permalink
apptainer, singularity: warn abuot argument deprecation
Browse files Browse the repository at this point in the history
Warn when arguments newuidmapPath and newgidmapPath is used.

(cherry picked from commit c3026ac)
  • Loading branch information
ShamrockLee authored and github-actions[bot] committed Jul 3, 2024
1 parent 8993f1f commit 77442cf
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions pkgs/applications/virtualization/singularity/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 77442cf

Please sign in to comment.