32 lines
1.1 KiB
Nix
32 lines
1.1 KiB
Nix
self: super:
|
|
let
|
|
msmtp = super.msmtp.overrideAttrs (attrs: rec {
|
|
configureFlags = attrs.configureFlags ++ [ "--with-tls=openssl" ];
|
|
buildInputs = attrs.buildInputs ++ [ super.openssl ];
|
|
});
|
|
|
|
lib = super.lib;
|
|
squashfsTools = super.squashfsTools;
|
|
cryptsetup = super.cryptsetup;
|
|
|
|
singularity = super.singularity.overrideAttrs (attrs: rec {
|
|
installPhase = ''
|
|
runHook preInstall
|
|
make -C builddir install LOCALSTATEDIR=$out/var
|
|
chmod 755 $out/libexec/singularity/bin/starter-suid
|
|
|
|
# Explicitly configure paths in the config file
|
|
sed -i 's|^# mksquashfs path =.*$|mksquashfs path = ${lib.makeBinPath [squashfsTools]}/mksquashfs|' $out/etc/singularity/singularity.conf
|
|
sed -i 's|^# cryptsetup path =.*$|cryptsetup path = ${lib.makeBinPath [cryptsetup]}/cryptsetup|' $out/etc/singularity/singularity.conf
|
|
sed -i 's|^shared loop devices = no|shared loop devices = yes|' $out/etc/singularity/singularity.conf
|
|
|
|
runHook postInstall
|
|
'';
|
|
});
|
|
in
|
|
{
|
|
inherit singularity;
|
|
# inherit msmtp;
|
|
}
|
|
|