Change:
Describe the bug A clear and concise description of what the bug is. The current version singularity 3.2.1 may be out-dated, so that it work abnormally. Should be upgraded to 3.5.3 To Reproduce Steps to reproduce the behavior: Expected behavior A clear and concise description of what you expected to happen. Start a shell normally Screenshots If applicable, add screenshots to help explain your problem. Additional context According to This is because that the singularity 3.2.1 is out-dated, "This issue is due to a mount option passed, which is not ignored on newer kernels and leads to an error. Please use Singularity 3.5.3 to address this issue." Notify maintainers <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. --Metadata Please run and paste the result. system: host os: multi-user?: sandbox: version: channels(root): channels(astrojhgu): nixpkgs: Maintainer information:
cc
Working on this jbedo/nixpkgs Haven't fully tested yet.

Discussion:
{stdenv , removeReferencesTo , lib <del> , fetchFromGitHub </del> <ins> , fetchurl </ins> , utillinux <ins> , gpgme </ins> , openssl <ins> , libuuid </ins> , coreutils , go , which , makeWrapper <ins> , cryptsetup </ins> , squashfsTools , buildGoPackage}:

buildGoPackage rec { pname = "singularity"; <del> version = "3.2.1"; </del> <ins> version = "3.6.1"; </ins> <del> src = fetchFromGitHub { owner = "sylabs"; repo = "singularity"; rev = "v${version}"; sha256 = "14lhxwy21s7q081x7kbnvkjsbxgsg2f181qlzmlxcn6n7gfav3kj"; </del> <ins> src = fetchurl { url = "https://github.com/hpcng/singularity/releases/download/v${version}/singularity-${version}.tar.gz"; sha256 = "070jj6kbiw23sd2p4xhvmyb8gd83imwgisdf18ahkwp7dq85db3c"; </ins> }; goPackagePath = "github.com/sylabs/singularity"; goDeps = ./deps.nix; <del> buildInputs = [ openssl utillinux ]; nativeBuildInputs = [ removeReferencesTo which makeWrapper ]; </del> <ins> buildInputs = [ gpgme openssl libuuid ]; nativeBuildInputs = [ removeReferencesTo utillinux which makeWrapper cryptsetup ]; </ins> propagatedBuildInputs = [ coreutils squashfsTools ]; <del> prePatch = '' substituteInPlace internal/pkg/build/copy/copy.go  </del> <ins> postPatch = '' substituteInPlace internal/pkg/build/files/copy.go  </ins> --replace /bin/cp ${coreutils}/bin/cp '';

# Don't install SUID binaries sed -i 's/-m 4755/-m 755/g' builddir/Makefile ''; buildPhase = '' <ins> runHook preBuild </ins> make -C builddir <ins> runHook postBuild </ins> ''; installPhase = '' <ins> runHook preInstall </ins> make -C builddir install LOCALSTATEDIR=$out/var chmod 755 $out/libexec/singularity/bin/starter-suid <del> wrapProgram $out/bin/singularity --prefix PATH : ${stdenv.lib.makeBinPath propagatedBuildInputs} </del> <ins> # Explicitly configure paths in the config file sed -i 's|^# mksquashfs path =.*$|mksquashfs path = ${stdenv.lib.makeBinPath [squashfsTools]}/mksquashfs|' $out/etc/singularity/singularity.conf sed -i 's|^# cryptsetup path =.*$|cryptsetup path = ${stdenv.lib.makeBinPath [cryptsetup]}/cryptsetup|' $out/etc/singularity/singularity.conf runHook postInstall </ins> ''; postFixup = '' find $out/libexec/ -type f -executable -exec remove-references-to -t ${go} '{}' + || true <del> # These etc scripts shouldn't have their paths patched cp etc/actions/* $out/etc/singularity/actions/ </del> ''; meta = with stdenv.lib; {

cd .. mkdir -p /var/singularity/mnt/{container,final,overlay,session,source} echo "root:x:0:0:System administrator:/root:/bin/sh" > /etc/passwd <ins> echo > /etc/resolv.conf </ins> TMPDIR=$(pwd -P) singularity build $out ./img '');