aboutsummaryrefslogtreecommitdiff
path: root/doc/functions/snap/example-hello.nix
diff options
context:
space:
mode:
Diffstat (limited to 'doc/functions/snap/example-hello.nix')
-rw-r--r--doc/functions/snap/example-hello.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/functions/snap/example-hello.nix b/doc/functions/snap/example-hello.nix
new file mode 100644
index 00000000000..123da80c547
--- /dev/null
+++ b/doc/functions/snap/example-hello.nix
@@ -0,0 +1,12 @@
+let
+ inherit (import <nixpkgs> { }) snapTools hello;
+in snapTools.makeSnap {
+ meta = {
+ name = "hello";
+ summary = hello.meta.description;
+ description = hello.meta.longDescription;
+ architectures = [ "amd64" ];
+ confinement = "strict";
+ apps.hello.command = "${hello}/bin/hello";
+ };
+}