diff options
author | Graham Christensen <graham@grahamc.com> | 2019-07-10 08:01:45 -0700 |
---|---|---|
committer | Graham Christensen <graham@grahamc.com> | 2019-07-10 08:02:14 -0700 |
commit | dc336293a166a474d236256f9e196c435d5266a5 (patch) | |
tree | 1cac44186e41b966e11ba85aed9ff297050a4082 /doc/functions | |
parent | 93db55bde5ef7d405c45e76f7304eb3559e80fc4 (diff) |
doc: fix after snaptools merge
Diffstat (limited to 'doc/functions')
-rw-r--r-- | doc/functions/snap/example-firefox.nix | 28 | ||||
-rw-r--r-- | doc/functions/snap/example-hello.nix | 12 | ||||
-rw-r--r-- | doc/functions/snaptools.xml | 4 |
3 files changed, 42 insertions, 2 deletions
diff --git a/doc/functions/snap/example-firefox.nix b/doc/functions/snap/example-firefox.nix new file mode 100644 index 000000000000..d58c98a65a2e --- /dev/null +++ b/doc/functions/snap/example-firefox.nix @@ -0,0 +1,28 @@ +let + inherit (import <nixpkgs> { }) snapTools firefox; +in snapTools.makeSnap { + meta = { + name = "nix-example-firefox"; + summary = firefox.meta.description; + architectures = [ "amd64" ]; + apps.nix-example-firefox = { + command = "${firefox}/bin/firefox"; + plugs = [ + "pulseaudio" + "camera" + "browser-support" + "avahi-observe" + "cups-control" + "desktop" + "desktop-legacy" + "gsettings" + "home" + "network" + "mount-observe" + "removable-media" + "x11" + ]; + }; + confinement = "strict"; + }; +} diff --git a/doc/functions/snap/example-hello.nix b/doc/functions/snap/example-hello.nix new file mode 100644 index 000000000000..123da80c5477 --- /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"; + }; +} diff --git a/doc/functions/snaptools.xml b/doc/functions/snaptools.xml index a951c36730d3..d0e3efdf6c67 100644 --- a/doc/functions/snaptools.xml +++ b/doc/functions/snaptools.xml @@ -38,7 +38,7 @@ <para> The following expression packages GNU Hello as a Snapcraft snap. </para> -<programlisting><xi:include href="../../pkgs/build-support/snap/example-hello.nix" parse="text" /></programlisting> +<programlisting><xi:include href="./snap/example-hello.nix" parse="text" /></programlisting> <para> <command>nix-build</command> this expression and install it with <command>snap install ./result --dangerous</command>. @@ -57,7 +57,7 @@ example uses Firefox as an example, because it is one of the most complicated programs we could package. </para> -<programlisting><xi:include href="../../pkgs/build-support/snap/example-firefox.nix" parse="text" /></programlisting> +<programlisting><xi:include href="./snap/example-firefox.nix" parse="text" /></programlisting> <para> <command>nix-build</command> this expression and install it with <command>snap install ./result --dangerous</command>. |