Commit Graph

7 Commits

Author SHA1 Message Date
Yueh-Shun Li
722948a942 singularity, apptainer: adjust dependencies 2023-04-08 17:13:35 +08:00
Yueh-Shun Li
f6e7fccfa6 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.
2023-04-06 12:40:09 +08:00
Yueh-Shun Li
1f32cee4d4 apptainer, singularity: add passthru.tests.image-hello-cowsay
Add image-building tests with singularity-tools
2023-04-05 04:08:29 +08:00
Felix Buehler
d10e69c86b treewide: deprecate isNull
https://nixos.org/manual/nix/stable/language/builtins.html#builtins-isNull
2023-03-06 22:40:04 +01:00
Yueh-Shun Li
6e9902c7f6 apptainer: always specify either --with-suid or --without-suid build flag 2023-02-19 07:55:10 +00:00
Yueh-Shun Li
71a89291ee apptainer, singularity: enable non-FHS --fakeroot support
This patch provides input arguments `newuidmapPath` and `newgidmapPath`
for apptainer and singularity to specify the path to the SUID-ed executables
newuidmap and newgidmap where they are not available from the FHS PATH.

As NixOS places those suided executables in a non-FHS position
(/run/wrapper/bin), this patch provides
programs.singularity.enableFakeroot option and implement with the above
input parameters.
2023-02-08 18:04:05 +08:00
Yueh-Shun Li
50788d2fb0 apptainer, singularity: fix defaultPath and reflect upstream changes
Upstream changes:
singularity 3.8.7 (the legacy) -> apptainer 1.1.3 (the renamed) / singularity 3.10.4 (Sylabs's fork)

Build process:
*   Share between different sources
*   Fix the sed regexp to make defaultPath patch work
*   allowGoReference is now true
*   Provied input parameter removeCompat (default to false)
    that removes the compatible "*singularity*" symbolic links
    and related autocompletion files when projectName != "singularity"
*   Change localstatedir to /var/lib
*   Format with nixpkgs-fmt
*   Fix the defaultPath patching
    and use it instead of the `<executable> path` config directive
    deprecated in Apptainer
*   Provide dependencies for new functionalities such as
    squashfuse (unprivileged squashfs mount)
*   Provide an attribute `defaultPathInputs` to override
    prefix of container runtime default PATH

NixOS module programs.singularity:
*   Allow users to specify packages
*   Place related directories to /var/lib
*   Format with nixpkgs-fmt

singularity-tools:
*   Allow users to specify packages
*   Place related directories to /var/lib when building images in VM
2023-02-08 18:03:11 +08:00