c7e6337bd0
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
29 lines
782 B
Nix
29 lines
782 B
Nix
{ appimageTools, buildFHSEnv, makeDesktopItem, extraPkgs ? pkgs: [], appimage-run-tests ? null }:
|
|
|
|
let
|
|
name = "appimage-run";
|
|
|
|
fhsArgs = appimageTools.defaultFhsEnvArgs;
|
|
|
|
desktopItem = makeDesktopItem {
|
|
inherit name;
|
|
exec = name;
|
|
desktopName = name;
|
|
genericName = "AppImage runner";
|
|
noDisplay = true;
|
|
mimeTypes = ["application/vnd.appimage" "application/x-iso9660-appimage"];
|
|
categories = ["PackageManager" "Utility"];
|
|
};
|
|
in buildFHSEnv (fhsArgs // {
|
|
inherit name;
|
|
|
|
targetPkgs = pkgs: [ appimageTools.appimage-exec ]
|
|
++ fhsArgs.targetPkgs pkgs ++ extraPkgs pkgs;
|
|
runScript = "appimage-exec.sh";
|
|
|
|
extraInstallCommands = ''
|
|
cp --recursive "${desktopItem}/share" "$out/"
|
|
'';
|
|
|
|
passthru.tests.appimage-run = appimage-run-tests;
|
|
})
|