diff --git a/dev/tests/eval-tests.nix b/dev/tests/eval-tests.nix index 077edb1..a338e25 100644 --- a/dev/tests/eval-tests.nix +++ b/dev/tests/eval-tests.nix @@ -83,6 +83,18 @@ rec { }; }; + bundlersExample = mkFlake + { inputs.self = { }; } + { + imports = [ flake-parts.flakeModules.bundlers ]; + systems = [ "a" "b" ]; + perSystem = { system, ... }: { + packages.hello = pkg system "hello"; + bundlers.toTarball = drv: pkg system "tarball-${drv.name}"; + bundlers.toAppImage = drv: pkg system "appimage-${drv.name}"; + }; + }; + modulesFlake = mkFlake { inputs.self = { }; @@ -251,6 +263,9 @@ rec { }; }; + assert bundlersExample.bundlers.a.toTarball (pkg "a" "hello") == pkg "a" "tarball-hello"; + assert bundlersExample.bundlers.b.toAppImage (pkg "b" "hello") == pkg "b" "appimage-hello"; + # - exported package becomes part of overlay. # - perSystem is invoked for the right system, when system is non-memoized assert nixpkgsWithEasyOverlay.hello == pkg "x86_64-linux" "hello";