diff options
author | Silvan Mosberger <contact@infinisil.com> | 2024-03-14 16:46:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-14 16:46:22 +0100 |
commit | f60515ddea75f772f61624f72ea06fd1471cc647 (patch) | |
tree | 67b3710925e38d65de393a078a63fa5c1c20d760 /doc/build-helpers | |
parent | ef4a46d82e5aecfa069d00e81207dcbb8be4602c (diff) | |
parent | 1d85557b5025a67d94d31c3c0508253c26b90f07 (diff) |
Merge pull request #293416 from DanielSidhion/remove-makesnap
snapTools: remove
Diffstat (limited to 'doc/build-helpers')
-rw-r--r-- | doc/build-helpers/images.md | 1 | ||||
-rw-r--r-- | doc/build-helpers/images/snaptools.section.md | 71 |
2 files changed, 0 insertions, 72 deletions
diff --git a/doc/build-helpers/images.md b/doc/build-helpers/images.md index 5596784bfa48..033891fcef48 100644 --- a/doc/build-helpers/images.md +++ b/doc/build-helpers/images.md @@ -6,7 +6,6 @@ This chapter describes tools for creating various types of images. images/appimagetools.section.md images/dockertools.section.md images/ocitools.section.md -images/snaptools.section.md images/portableservice.section.md images/makediskimage.section.md images/binarycache.section.md diff --git a/doc/build-helpers/images/snaptools.section.md b/doc/build-helpers/images/snaptools.section.md deleted file mode 100644 index 259fa1b06180..000000000000 --- a/doc/build-helpers/images/snaptools.section.md +++ /dev/null @@ -1,71 +0,0 @@ -# pkgs.snapTools {#sec-pkgs-snapTools} - -`pkgs.snapTools` is a set of functions for creating Snapcraft images. Snap and Snapcraft is not used to perform these operations. - -## The makeSnap Function {#ssec-pkgs-snapTools-makeSnap-signature} - -`makeSnap` takes a single named argument, `meta`. This argument mirrors [the upstream `snap.yaml` format](https://docs.snapcraft.io/snap-format) exactly. - -The `base` should not be specified, as `makeSnap` will force set it. - -Currently, `makeSnap` does not support creating GUI stubs. - -## Build a Hello World Snap {#ssec-pkgs-snapTools-build-a-snap-hello} - -The following expression packages GNU Hello as a Snapcraft snap. - -``` {#ex-snapTools-buildSnap-hello .nix} -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"; - }; -} -``` - -`nix-build` this expression and install it with `snap install ./result --dangerous`. `hello` will now be the Snapcraft version of the package. - -## Build a Graphical Snap {#ssec-pkgs-snapTools-build-a-snap-firefox} - -Graphical programs require many more integrations with the host. This example uses Firefox as an example because it is one of the most complicated programs we could package. - -``` {#ex-snapTools-buildSnap-firefox .nix} -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"; - }; -} -``` - -`nix-build` this expression and install it with `snap install ./result --dangerous`. `nix-example-firefox` will now be the Snapcraft version of the Firefox package. - -The specific meaning behind plugs can be looked up in the [Snapcraft interface documentation](https://docs.snapcraft.io/supported-interfaces). |