xdg_open_ng: add DesktopItem

This commit is contained in:
Emery Hemingway 2022-04-10 21:23:47 -05:00
parent 596580748f
commit 18c63d8619
1 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ lib, buildNimPackage, fetchFromGitea, syndicate }:
{ lib, buildNimPackage, fetchFromGitea, makeDesktopItem, syndicate }:
buildNimPackage rec {
pname = "xdg_open_ng";
@ -15,7 +15,17 @@ buildNimPackage rec {
propagatedBuildInputs = [ syndicate ];
postInstall = "mv $out/bin/xdg_open $out/bin/xdg-open";
desktopItem = makeDesktopItem rec {
name = "xdg-open";
desktopName = "Syndicate URI dispatcher (xdg-open)";
exec = "${name} %U";
mimeTypes = [ "all/all" ];
};
postInstall = ''
mv $out/bin/xdg_open $out/bin/xdg-open
cp -a $desktopItem/* $out/
'';
meta = src.meta // {
description = "Replacement for xdg-open that uses Syndicate for messaging.";