-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
40 lines (35 loc) · 1.14 KB
/
default.nix
File metadata and controls
40 lines (35 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ pkgs, appimageTools, copyDesktopItems, makeDesktopItem, ... }:
let
pname = "beeper";
version = "4.2.692";
src = pkgs.fetchurl {
url = "https://beeper-desktop.download.beeper.com/builds/Beeper-${version}-x86_64.AppImage";
hash = "sha256-h83tTulmb3HR1NClXyM2xp/5303adMwbouCQHiOG3MM=";
};
appimageContents = pkgs.appimageTools.extract { inherit pname version src; };
in
appimageTools.wrapType2 rec {
inherit pname version src;
pkgs = pkgs;
nativeBuildInputs = [
copyDesktopItems
];
desktopItem = ( makeDesktopItem {
name = "beeper";
desktopName = "Beeper";
exec = "${pname} %u";
icon = "beepertexts.png";
type = "Application";
terminal = false;
comment= "The ultimate messaging app";
categories = [ "Network" "Chat" ];
mimeTypes =[ "x-scheme-handler/beeper" ];
});
extraInstallCommands = ''
mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/*.desktop $out/share/applications/
cp -r ${appimageContents}/usr/share/icons $out/share
# unless linked, the binary is placed in $out/bin/beeper-someVersion
# ln -s $out/bin/${pname}-${version} $out/bin/${pname}
'';
}