diff options
author | notgne2 | 2020-10-05 19:46:28 -0700 |
---|---|---|
committer | notgne2 | 2020-10-05 19:46:28 -0700 |
commit | 7c00fd2761e6efffe763ece5d08d9a6d3fb95092 (patch) | |
tree | 9d4030bd4788bec3eb4783adc38130536d8fa696 /examples/simple/flake.nix | |
parent | 5674670a59168fb05f26e5b4fb41dd2662810e94 (diff) |
Add interface with json schema, fix flake-less issues, put setActivate and jsonSchema check in flake lib
Diffstat (limited to 'examples/simple/flake.nix')
-rw-r--r-- | examples/simple/flake.nix | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/examples/simple/flake.nix b/examples/simple/flake.nix index f53352b..d44b888 100644 --- a/examples/simple/flake.nix +++ b/examples/simple/flake.nix @@ -5,7 +5,9 @@ { description = "Deploy GNU hello to localhost"; - outputs = { self, nixpkgs }: + inputs.deploy-rs.url = "github:serokell/deploy-rs"; + + outputs = { self, nixpkgs, deploy-rs }: let setActivate = base: activate: nixpkgs.legacyPackages.x86_64-linux.symlinkJoin { name = ("activatable-" + base.name); @@ -29,16 +31,10 @@ hostname = "localhost"; profiles.hello = { user = "balsoft"; - path = setActivate nixpkgs.legacyPackages.x86_64-linux.hello "./bin/hello"; + path = deploy-rs.lib.x86_64-linux.setActivate nixpkgs.legacyPackages.x86_64-linux.hello "./bin/hello"; }; }; - checks = builtins.mapAttrs - (_: pkgs: { - jsonschema = pkgs.runCommandNoCC "jsonschema-deploy-simple" { } - "${pkgs.python3.pkgs.jsonschema}/bin/jsonschema -i ${ - pkgs.writeText "deploy.json" (builtins.toJSON self.deploy) - } ${../../interface/deploy.json} && touch $out"; - }) - nixpkgs.legacyPackages; + + checks = { "x86_64-linux" = { jsonSchema = deploy-rs.lib.x86_64-linux.checkSchema self.deploy; }; }; }; } |