1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-09 09:36:20 +09:00

capacities: init at 1.48.7 (#360002)

This commit is contained in:
Yohann Boniface 2025-05-29 21:19:28 +02:00 committed by GitHub
commit 7e617bb536
Signed by: github
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,66 @@
{
fetchurl,
appimageTools,
makeWrapper,
imagemagick,
lib,
}:
let
pname = "capacities";
version = "1.48.7";
name = "${pname}-${version}";
src = fetchurl {
url = "https://web.archive.org/web/20250519011655/https://capacities-desktop-app.fra1.cdn.digitaloceanspaces.com/capacities-${version}.AppImage";
hash = "sha256-fa1Wk3w+f467n0JtRz+Zjw9QKDKKnhS23biEtNqO17Y=";
};
appimageContents = appimageTools.extractType2 {
inherit
pname
src
version
;
};
in
appimageTools.wrapType2 {
inherit
pname
src
version
;
extraInstallCommands = ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/capacities \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
# Check for required desktop file
if [ ! -f ${appimageContents}/capacities.desktop ]; then
echo "Error: Missing .desktop file in ${appimageContents}"
exit 1
else
# Install and modify the desktop file
install -m 444 -D ${appimageContents}/capacities.desktop $out/share/applications/capacities.desktop
fi
# Check for required icon file
if [ ! -f ${appimageContents}/capacities.png ]; then
echo "Error: Missing icon file in ${appimageContents}"
exit 1
else
# Resize and install the icon
${lib.getExe imagemagick} ${appimageContents}/capacities.png -resize 512x512 capacities_512.png
install -m 444 -D capacities_512.png $out/share/icons/hicolor/512x512/apps/capacities.png
fi
'';
meta = {
description = "Calm place to make sense of the world and create amazing things";
homepage = "https://capacities.io/";
platforms = [ "x86_64-linux" ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
license = lib.licenses.unfree;
mainProgram = "capacities";
};
}