diff options
Diffstat (limited to 'tests/pure-deploy.nix')
| -rw-r--r-- | tests/pure-deploy.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/pure-deploy.nix b/tests/pure-deploy.nix new file mode 100644 index 0000000..6e34706 --- /dev/null +++ b/tests/pure-deploy.nix @@ -0,0 +1,22 @@ +# writeDeploy of krops' flake, with the arguments args, given krops' and +# nixpkgs' sources: what the flake ./pure.nix makes evaluates purely, and +# what the host builds. nixpkgs is a flake with lib and legacyPackages, +# without nixpkgs' configuration and overlays, which differ between the +# two, and which pure evaluation can't read anyway. +{ krops, nixpkgs, system, args }: + +let + nixpkgs' = { + lib = import "${nixpkgs}/lib"; + legacyPackages.${system} = import nixpkgs { + inherit system; + config = {}; + overlays = []; + }; + }; + kropsFlake = (import "${krops}/flake.nix").outputs { + self = kropsFlake; + nixpkgs = nixpkgs'; + }; +in + kropsFlake.lib.${system}.writeDeploy "deploy" args |
