mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-08 14:23:40 +00:00
apptainer, singularity: unify the PATH prefix to defaultPath and wrapProgram
Use defaultPathInputs to control both path prefixes, reducing the number of input lists to maintain.
This commit is contained in:
@@ -148,6 +148,7 @@ in
|
||||
bash
|
||||
coreutils
|
||||
cryptsetup # cryptsetup
|
||||
fakeroot
|
||||
go
|
||||
privileged-un-utils
|
||||
squashfsTools # mksquashfs unsquashfs # Make / unpack squashfs image
|
||||
@@ -195,10 +196,7 @@ in
|
||||
substituteInPlace "$out/bin/run-singularity" \
|
||||
--replace "/usr/bin/env ${projectName}" "$out/bin/${projectName}"
|
||||
wrapProgram "$out/bin/${projectName}" \
|
||||
--prefix PATH : "${lib.makeBinPath [
|
||||
fakeroot
|
||||
squashfsTools # Singularity (but not Apptainer) expects unsquashfs from the host PATH
|
||||
]}"
|
||||
--prefix PATH : "''${defaultPathInputs// /\/bin:}"
|
||||
# Make changes in the config file
|
||||
${lib.optionalString enableNvidiaContainerCli ''
|
||||
substituteInPlace "$out/etc/${projectName}/${projectName}.conf" \
|
||||
|
||||
Reference in New Issue
Block a user