Add drop appimage.
This commit is contained in:
39
appimages/drop.nix
Normal file
39
appimages/drop.nix
Normal 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;})
|
||||
];
|
||||
}
|
||||
11
nodes/hosts/common/programs/drop.nix
Normal file
11
nodes/hosts/common/programs/drop.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ pkgs, lib, inputs, ... }:
|
||||
|
||||
let
|
||||
dropApp = import ../../../appimages/drop.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
# ...
|
||||
environment.systemPackages = [
|
||||
pkgs.dropApp
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user