diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2019-07-11 09:40:10 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2019-07-11 09:40:10 +0200 |
commit | 22cb7f25f2f939a5e38f5e0c0920a743c37a9480 (patch) | |
tree | 0f40b2088d8ffcaab6d43cda6a4ee92931a35a83 /doc | |
parent | 6049c39bdb3d8bfc01e2a86d2fc6ef6e46f9b0be (diff) | |
parent | 08b828d1c5169c08bce148df53cb1215b58e64d0 (diff) |
Merge master into staging-next
Diffstat (limited to 'doc')
-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 00000000000..d58c98a65a2 --- /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 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"; + }; +} diff --git a/doc/functions/snaptools.xml b/doc/functions/snaptools.xml index a951c36730d..d0e3efdf6c6 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>. |