{ 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-VVDzotrgu68CAGr4EqpWlW8ZOhf4cbt4a46WHJTnxjo="; }; 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;}) ]; }