doc/build-helpers: fix appimage example where postExtract is used
This commit is contained in:
@@ -129,11 +129,16 @@ appimageTools.wrapType2 {
|
||||
The argument passed to `extract` can also contain a `postExtract` attribute, which allows you to execute additional commands after the files are extracted from the AppImage.
|
||||
`postExtract` must be a string with commands to run.
|
||||
|
||||
:::{.warning}
|
||||
When specifying `postExtract`, you should use `appimageTools.wrapAppImage` instead of `appimageTools.wrapType2`.
|
||||
Otherwise `wrapType2` will extract the AppImage contents without respecting the `postExtract` instructions.
|
||||
:::
|
||||
|
||||
:::{.example #ex-extracting-appimage-with-postextract}
|
||||
|
||||
# Extracting an AppImage to install extra files, using `postExtract`
|
||||
|
||||
This is a rewrite of [](#ex-extracting-appimage) to use `postExtract`.
|
||||
This is a rewrite of [](#ex-extracting-appimage) to use `postExtract` and `wrapAppImage`.
|
||||
|
||||
```nix
|
||||
{ appimageTools, fetchurl }:
|
||||
@@ -153,8 +158,10 @@ let
|
||||
'';
|
||||
};
|
||||
in
|
||||
appimageTools.wrapType2 {
|
||||
inherit pname version src;
|
||||
appimageTools.wrapAppImage {
|
||||
inherit pname version;
|
||||
|
||||
src = appimageContents;
|
||||
|
||||
extraPkgs = pkgs: [ pkgs.at-spi2-core ];
|
||||
|
||||
@@ -164,6 +171,9 @@ appimageTools.wrapType2 {
|
||||
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/irccloud.png \
|
||||
$out/share/icons/hicolor/512x512/apps/irccloud.png
|
||||
'';
|
||||
|
||||
# specify src archive for nix-update
|
||||
passthru.src = src;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user