mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-28 19:00:46 +00:00
apptainer, singularity: add passthru.tests.image-hello-cowsay
Add image-building tests with singularity-tools
This commit is contained in:
@@ -46,6 +46,10 @@ in
|
||||
, openssl
|
||||
, squashfsTools
|
||||
, squashfuse
|
||||
# Test dependencies
|
||||
, singularity-tools
|
||||
, cowsay
|
||||
, hello
|
||||
# Overridable configurations
|
||||
, enableNvidiaContainerCli ? true
|
||||
# Compile with seccomp support
|
||||
@@ -83,7 +87,7 @@ let
|
||||
ln -s ${lib.escapeShellArg newgidmapPath} "$out/bin/newgidmap"
|
||||
'');
|
||||
in
|
||||
buildGoModule {
|
||||
(buildGoModule {
|
||||
inherit pname version src;
|
||||
|
||||
# Override vendorHash with the output got from
|
||||
@@ -235,4 +239,14 @@ buildGoModule {
|
||||
maintainers = with maintainers; [ jbedo ShamrockLee ];
|
||||
mainProgram = projectName;
|
||||
} // extraMeta;
|
||||
}
|
||||
}).overrideAttrs (finalAttrs: prevAttrs: {
|
||||
passthru = prevAttrs.passthru or { } // {
|
||||
tests = {
|
||||
image-hello-cowsay = singularity-tools.buildImage {
|
||||
name = "hello-cowsay";
|
||||
contents = [ hello cowsay ];
|
||||
singularity = finalAttrs.finalPackage;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user