Add drop appimage.

This commit is contained in:
jay
2025-08-15 21:52:49 -04:00
parent a5e7cd1513
commit 00cfc16503
2 changed files with 50 additions and 0 deletions

39
appimages/drop.nix Normal file
View File

@@ -0,0 +1,39 @@
{ pkgs, ... }: let
pname = "drop";
version = "0.3.0";
src = pkgs.fetchurl {
url = "https://github.com/Drop-OSS/drop-app/releases/download/v0.3.0/Drop.Desktop.Client_0.3.0_amd64.AppImage";
hash = "sha256-CD6bQ4T8DhJidiOxNRgRDL4obfEZx7hnO0VotVb6lDc=";
};
appimageContents = pkgs.appimageTools.extract {inherit pname version src;};
in
pkgs.appimageTools.wrapType2 {
inherit pname version src;
pkgs = pkgs;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
# unless linked, the binary is placed in $out/bin/cursor-someVersion
# ln -s $out/bin/${pname}-${version} $out/bin/${pname}
'';
extraBwrapArgs = [
"--bind-try /etc/nixos/ /etc/nixos/"
];
# vscode likes to kill the parent so that the
# gui application isn't attached to the terminal session
dieWithParent = false;
extraPkgs = pkgs: with pkgs; [
unzip
autoPatchelfHook
asar
# override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651
(buildPackages.wrapGAppsHook.override {inherit (buildPackages) makeWrapper;})
];
}

View File

@@ -0,0 +1,11 @@
{ pkgs, lib, inputs, ... }:
let
dropApp = import ../../../appimages/drop.nix { inherit pkgs; };
in
{
# ...
environment.systemPackages = [
pkgs.dropApp
];
}