syndicate-flake/xdg_open_ng/default.nix

43 lines
1.0 KiB
Nix
Raw Normal View History

2022-04-11 02:23:47 +00:00
{ lib, buildNimPackage, fetchFromGitea, makeDesktopItem, syndicate }:
2022-03-17 19:41:42 +00:00
buildNimPackage rec {
pname = "xdg_open_ng";
version = "20220625";
2022-03-17 19:41:42 +00:00
nimBinOnly = true;
src = fetchFromGitea {
domain = "git.syndicate-lang.org";
owner = "ehmry";
repo = pname;
rev = version;
hash = "sha256-yOuR4KYAMxlRc4AIr3ud0HzidHDQPeIiN3dzlnphLug=";
2022-03-17 19:41:42 +00:00
};
propagatedBuildInputs = [ syndicate ];
2022-04-11 02:23:47 +00:00
desktopItem = makeDesktopItem rec {
name = "xdg-open";
desktopName = "Syndicate URI dispatcher (xdg-open)";
exec = "${name} %U";
2022-05-19 17:12:15 +00:00
mimeTypes = [
2022-07-11 12:31:18 +00:00
"application/vnd.mozilla.xul+xml"
2022-05-19 17:12:15 +00:00
"application/xhtml+xml"
"text/html"
"text/xml"
"x-scheme-handler/http"
"x-scheme-handler/https"
];
2022-04-11 02:23:47 +00:00
};
postInstall = ''
mv $out/bin/xdg_open $out/bin/xdg-open
cp -a $desktopItem/* $out/
'';
2022-03-17 19:41:42 +00:00
meta = src.meta // {
description = "Replacement for xdg-open that uses Syndicate for messaging.";
maintainers = [ lib.maintainers.ehmry ];
license = lib.licenses.unlicense;
};
}