Test bundlers
This commit is contained in:
parent
2b8cc3634d
commit
3d1f905760
1 changed files with 15 additions and 0 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue