push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
{
lib,
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 (
lib.recursiveUpdate 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;
meta.mainProgram = "appimage-run";
}
)

View File

@@ -0,0 +1,50 @@
{
runCommand,
fetchurl,
appimage-run,
glibcLocales,
file,
xdg-utils,
}:
let
# any AppImage usable on cli, really
sample-appImage = fetchurl {
url = "https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage";
sha256 = "04ws94q71bwskmhizhwmaf41ma4wabvfgjgkagr8wf3vakgv866r";
};
owdtest = fetchurl {
url = "https://github.com/NixOS/nixpkgs/files/10099048/owdtest.AppImage.gz";
sha256 = "sha256-EEp9dxz/+l5XkNaVBFgv5v64sizQILnljRAzwXv/yV8=";
};
in
runCommand "appimage-run-tests"
{
buildInputs = [
appimage-run
glibcLocales
file
xdg-utils
];
meta.platforms = [ "x86_64-linux" ];
}
''
export HOME=$(mktemp -d)
set -x
# regression test for #101137, must come first
LANG=fr_FR appimage-run ${sample-appImage} --list ${sample-appImage}
# regression test for #108426
cp ${sample-appImage} foo.appImage
LANG=fr_FR appimage-run ${sample-appImage} --list foo.appImage
cp ${owdtest} owdtest.AppImage.gz
gunzip owdtest.AppImage.gz
appimage-run owdtest.AppImage
# Verify desktop entry
XDG_DATA_DIRS="${appimage-run}/share"
[[ "$(xdg-mime query default application/vnd.appimage)" == '${appimage-run.name}.desktop' ]]
set +x
touch $out
''