Skip to content

Commit

Permalink
singularity, apptainer: adjust dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ShamrockLee committed Apr 5, 2023
1 parent 1f32cee commit 7463c0e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
17 changes: 14 additions & 3 deletions pkgs/applications/virtualization/singularity/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ in
, conmon
, coreutils
, cryptsetup
, e2fsprogs
, fakeroot
, fuse2fs ? e2fsprogs.fuse2fs
, go
, gpgme
, libseccomp
Expand Down Expand Up @@ -117,15 +119,19 @@ in
which
];

# See the `control` file of the Debian package from upstream repos
# for build-time dependencies and run-time utilities
# apptainer/apptainer: https://github.com/apptainer/apptainer/blob/main/dist/debian/control
# sylabs/singularity: https://github.com/sylabs/singularity/blob/main/debian/control

buildInputs = [
bash # To patch /bin/sh shebangs.
conmon
cryptsetup
gpgme
libuuid
openssl
squashfsTools
squashfuse
squashfsTools # Required at build time by SingularityCE
]
++ lib.optional enableNvidiaContainerCli nvidia-docker
++ lib.optional enableSeccomp libseccomp
Expand All @@ -148,6 +154,7 @@ in
bash
coreutils
cryptsetup # cryptsetup
fuse2fs # Mount ext3 filesystems
go
privileged-un-utils
squashfsTools # mksquashfs unsquashfs # Make / unpack squashfs image
Expand Down Expand Up @@ -197,7 +204,11 @@ in
wrapProgram "$out/bin/${projectName}" \
--prefix PATH : "${lib.makeBinPath [
fakeroot
squashfsTools # Singularity (but not Apptainer) expects unsquashfs from the host PATH
fuse2fs # Apptainer uses fuse2fs to mount ext3 filesystems
squashfsTools
# Apptainer expect squashfuse from the host PATH to mount squashfs
# or it will fall back to extracting.
squashfuse
]}"
# Make changes in the config file
${lib.optionalString enableNvidiaContainerCli ''
Expand Down
5 changes: 5 additions & 0 deletions pkgs/applications/virtualization/singularity/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ let
extraMeta.homepage = "https://sylabs.io/";
})
{
# Unneeded for SingularityCE
e2fsprogs = null; # for e2fsprogs.f2fs only
fuse2fs = null;
squashfuse = null;

defaultToSuid = true;
};

Expand Down

0 comments on commit 7463c0e

Please sign in to comment.